Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIFO Format #41

Open
Jess3Jane opened this issue Dec 30, 2014 · 5 comments
Open

FIFO Format #41

Jess3Jane opened this issue Dec 30, 2014 · 5 comments

Comments

@Jess3Jane
Copy link

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

@dafoxia
Copy link
Contributor

dafoxia commented Dec 30, 2014

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

@Jess3Jane
Copy link
Author

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

@dafoxia
Copy link
Contributor

dafoxia commented Dec 30, 2014

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

@williammck
Copy link

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!

@dafoxia
Copy link
Contributor

dafoxia commented Jan 10, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants