[MPlayer-users] Mencoder as realtime frameserver

Jeff Garneau garneau.jeff at gmail.com
Mon Dec 7 19:54:25 CET 2009


Hi,

I'm trying to put together a realtime video installation that can
seamlessly switch between different videos.  I have been trying to use
mencoder essentially as a frameserver piping to mplayer but I've run
into a bunch of problems, to wit:

1) Using rawvideo and rawaudio rapidly causes desync.  It seems
impossible to know beforehand how many video frames mencoder is going
to pipe out--it drops frames from the stream to keep time with the
(ignored) audio stream and -rawaudio/-rawvideo will output different
amounts of data anyways--see the difference in seconds for the two
commands below (the example file is 29.970 fps):

mencoder -of rawvideo -oac pcm -ovc raw Tape_004-12.mov -frames 30 -o video.raw
... Video stream: 667799.375 kbit/s  (83474925 B/s)  size: 83558400
bytes  1.001 secs  31 frames
mencoder -of rawaudio -oac pcm -ovc copy Tape_004-12.mov -frames 30 -o audio.raw
... Audio stream:  768.000 kbit/s  (96000 B/s)  size: 92892 bytes  0.968 secs

I may be able to solve this by getting video in a different format
(which has natively perfect sync between audio and video) but I have
no idea what codec I should be looking into.

2) There doesn't seem to be a muxed stream format which can both be
concatenated easily (i.e. cat video_1.stream video_2.stream >
video_1_and_video_2.stream) and doesn't degrade video quality (I'm
trying to maintain the quality of the input video, which will be at
least 1280x1080).  MPEG1 and MPEG2 degrade quality and I simply can't
get vcodec=dvvideo to work regardless of what I throw at it.

Does anyone have any suggestions?  I am open to using software other
than mencoder/mplayer, but traditional frameserver solutions are
problematic as I need to be able to stack additional videos into its
queue on the fly.

Thanks for your time & patience,
Jeff

-- 
Jeff Garneau
(919) 225-9579


More information about the MPlayer-users mailing list