-
-
Notifications
You must be signed in to change notification settings - Fork 78
ffmpeg on openbsd #116
Comments
Can you try placing the -f at different places ? : |
Sorry, this doesn't change anything. Same result. |
I have sound when I redirect the pipe to the audio device like this: |
Wait that the exact same command the bot use : Line 371 in 112564b
|
Yes it's strange. I hear sound but it's really too speedy, not the normal speed and only aucat can read something. |
I can get a good sound at normal speed with this : play command is part of sox audio tool. |
Did you tried different streams or music files? I suppose that maybe this problem only occurs on some files or streams. |
Yes I've tried different streams, youtube links, different web radios. Youtube links don't work either, so this may not be a ffmpeg problem. |
Sorry but probably no, we use ffmpeg to handle youtube as well. The bot will invoke youtube-dl to download files first and feeds its path into ffempg to play. We constantly fetch bytes from stdout of ffmpeg and send it to your murmur server. Can you try a local file? Something like xxxxx.mp3. And, I'm still confused by your description.
Each of these problems points to different parts that may be wrong. |
Hello, |
Thanks for your reply. Just to be sure, did the bot move to the next song? Or it just got stuck at one song without moving on? |
As you can test different ffmpeg command, you can try to modify them here : Can you try with removing the |
@TerryGeng it seems to be stuck. |
Ok. Now I suppose this is the problem of your ffmpeg build. I suggest you try If you can see If one of the steps above fails, I think you'd better rebuild your ffmpeg with raw format support. |
|
Yes it is well converted. I can play the output.wav file |
Can you try Can you see things coming out from the console? |
Yes it displays a lot of characters as expected. |
Okay.... maybe ffmpeg is running correctly? Have you tried enable
in your configuration.ini file? Maybe the debug log of ffmpeg will provide more clues. |
Ok this is what I get:
It's stuck here. |
It looks that something wrong with the pipe. I use Mac(also one of the BSD family) to test and everything works. Currently, I'm not sure what is wrong. Whether ffmpeg failed to write to pipe, or python didn't read from pipe successfully. But I can't rule out other possibilities since the bot can also get stuck by many other reasons, Lines 409 to 434 in eeaa09b
It may get stuck while waiting for buffer (L413), or while fetching contains in the pipe (L426). To be certain, can you please add Then, you can know from the log that where is wrong. |
Ok this is what I did:
Then when I start playing something: ... |
Thanks. So the problem comes from this little pipe huh? It may also be insightful if you can add |
the last size displayed is 52800 |
Another test can help. |
argh... it doesn't take the CTRL+C... |
What ? It should (I've test it) botamusique and pymumble don't catch KeyboardInterrupt if you have remove the line. |
I tried multiple press but same result. I've also tried a : kill -INT process_id (which is the same signal as CTRL+C) without success... |
...but if I had the line again, the CTRL+C works... |
that is really strange. So last try is : you keep that line, and you run the bot like that :
|
Ok this a part of the output:
|
oh I forgot to say, it's a loop |
If this loop keeps going on, you would surely hear something. And I didn't see mumbleBot.py in this log. Can you see mumbleBot.py from it? |
I'm sorry that I don't have a device with openbsd installed on it. If you can join IRC channel #mumble at Freenode, I think we can investigate this problem in a more efficient way. |
Can you try to replace these 2 lines
This is an alternative pipe on some OS. |
It works ! Bravo ! :) |
ok, I should add this exception into the code. What's your |
print(os.name) --> posix |
I think I'm going to work on this part later. Thank @azlux @comete-geek for the solution! |
Sorry but this change doesn't work for me. If I start playing something like "!radio jazz" or a file, the bot crashes with this error: |
Can you run
in your terminal, so we can know the platform code of your system? It seems that we have missed this in our code. |
And, I know this kind of (sad) things will happen. So I add a switch in the config file. If you are busy making the bot work, just set
in the |
Oh you have already provided it. This post has become so long and sorry that I have missed this information. |
Thanks a lot ! it works now. |
No sound on openbsd with the bot. Look like an issue related to the ffmpeg command.
Summary:
First test :
ffmpeg -y -v warning -nostdin -i http://jazz-wr04.ice.infomaniak.ch/jazz-wr04-128.mp3 -ac 1 -f s16le -ar 48000 -
Second test :
ffmpeg -y -v warning -nostdin -i http://jazz-wr04.ice.infomaniak.ch/jazz-wr04-128.mp3 -ac 1 -ar 48000 -
The text was updated successfully, but these errors were encountered: