mumble-ruby
mumble-ruby copied to clipboard
FIFO Format
What format does the player.stream_named_pipe function expect? I've been playing around with concating raw files in various formats to a fifo pipe, but I've gotten nothing but noise out so far
When I remember right, you should use headerless wave format 16bit signed mono, Little Endian with 48kHz sample rate.
I've tryed that before, and still it comes out only as noise for a few seconds before crashing with the error: "/home/felix/.rvm/gems/ruby-2.2.0/gems/mumble-ruby-1.1.2/lib/mumble-ruby/audio_player.rb:63:in change_volume': undefined method
unpack' for nil:NilClass (NoMethodError)"
Maybe a look into ( http://wiki.natenom.com/w/Mumble_audio_bots ) will help you. In the guide howto setup a bot with mpd show's how it should work. Your FIFO must deliver sound in realtime. That means: not slower (stutter), but also not faster (garbaging).
Edit: Nevermind - switched to MPD and everything is working fine now.
I'm having the same issue - I've gotten ffmpeg to output to the FIFO pipe, yet it just gives me garbage.
ffmpeg -y -i mp3.mp3 -ar 48000 -f s16le -acodec pcm_s16le - > /tmp/fifo
is the command I'm using.
If I add the -re
option to make it "realtime", it plays the file albeit really slowly.
Any idea what I could do to fix this? Thanks!
If you want use mpd for it you only need -re
and -ac 1
to create a realtime mono stream.
So your command line look like that:
ffmpeg -re -y -i mp3.mp3 -ar 48000 -f s16le -acodec pcm_s16le -ac 1 - > /tmp/fifo
Or on systems with ffmpeg replacement avconv:
avconv -re -y -i mp3.mp3 -ar 48000 -f s16le -acodec pcm_s16le -ac 1 - > /tmp/fifo