mumble-ruby icon indicating copy to clipboard operation
mumble-ruby copied to clipboard

FIFO Format

Open Jess3Jane opened this issue 10 years ago • 5 comments

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

Jess3Jane avatar Dec 30 '14 10:12 Jess3Jane

When I remember right, you should use headerless wave format 16bit signed mono, Little Endian with 48kHz sample rate.

dafoxia avatar Dec 30 '14 20:12 dafoxia

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 methodunpack' for nil:NilClass (NoMethodError)"

Jess3Jane avatar Dec 30 '14 21:12 Jess3Jane

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).

dafoxia avatar Dec 30 '14 22:12 dafoxia

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!

williammck avatar Jan 10 '15 03:01 williammck

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

dafoxia avatar Jan 10 '15 18:01 dafoxia