[FFmpeg-user] Capturing audio + video from mplayer
Jason Gullickson
jason.gullickson at gmail.com
Wed Jul 23 17:30:42 CEST 2014
Greetings,
I'm building an HTML5 DVD player that back-ends to mplayer & ffmpeg. At
this point I have it working for video, but I can't quite seem to figure
out how to get the audio portion working.
I'm using mplayer in "slave" mode to read and controle the DVD and send the
video to a named pipe using the following command line:
mplayer dvdnav:////dev/dvd -vo yuv4mpeg:file=video.y4m -slave
I then use the following ffmpeg to pick up the data from the pipe and
stream it to ffserver:
ffmpeg -f yuv4mpegpipe -i video.y4m -vcodec mpeg2video -me_method epzs
-threads 4 -r 29.97 -g 45 -b 2500k -bt 300
http://localhost:8090/dvdfeed.ffm
This works for video, but when I try to add the audio:
mplayer dvdnav:////dev/dvd -ao pcm:file=audio.wav -vo
yuv4mpeg:file=video.y4m -slave
ffmpeg -i audio.wav -f yuv4mpegpipe -i video.y4m -vcodec mpeg2video
-me_method epzs -threads 4 -r 29.97 -g 45 -b 2500k -bt 300
http://localhost:8090/dvdfeed.ffm
No joy.
Normally when I do the video-only set of commands ffmpeg starts spewing
data about the transcoding process (fps, etc.). When I add audio as shown
above, ffmpeg starts but then stops displaying output after it shows it's
configuration parameters and never gets to the transcoding status output
stage, like it's waiting for input.
I have tried many various contortions of this to try and get it working but
the end result is always the same. My guess is that I'm missing a
parameter that tells ffmpeg to start reading the audio pipe like a stream
instead of waiting for the end of input (akin to the yuv4mpegpipe parameter
but for audio?).
I'm open to trying a completely different approach so long as I can use
mplayer to control DVD playback (or something else that provides a means of
DVD menu navigation that can be controlled via standard input, etc.).
Thanks!
- Jason
More information about the ffmpeg-user
mailing list