[MPlayer-users] encode on the fly from camcorder (pipe issue?)

Razvan Cosma razvan.cosma at pronetis.ro
Tue Mar 20 08:34:55 CET 2007


 Hello,
I'm trying to capture video from a DV camera using firewire & compress
to mpeg2 in real time. The command line used is something like:

dvgrab --duration 30 --size 0 - | mencoder -cache 2048 -of lavf -ovc
lavc -oac lavc -lavfopts
format=qdv:i_certify_that_my_video_stream_does_not_use_b_frames
-lavcopts vcodec=mpeg2video:acodec=mp2:vbitrate=4600:abitrate=128 -o
test.mpeg -

dvgrab (kinodv.org) manages correctly the camera (playback, rewind,
capture) - I only had to modprobe raw1394.

mencoder can encode the output of dvgrab with no problems if I dump it
to a file first. Actually I had to search around for two dlls
(avisynth.dll and DevIL.dll) part of avisynth.sf.net, which then
depended on other dlls I copied from the XP install (AVIFIL32.dll,
GDI32.dll). Those are not included in any codecs pack on the
mplayerhq.hu site.

When trying to pipe the video stream though, mencoder exits with error
"Cannot seek backward in linear streams" if no "cache" option is
specified. If I specify any cache size, no errors are displayed, but no
encoding takes place. Also capture doesn't stop after 30 seconds as
expected. Killing any of the processes or pressing ctrl-c segfaults
mencoder.

My questions would be: is there some option I'm missing in mencoder? If
not, is it because of the 64k pipe buffer limit on Linux? If so
(hopefully not), can it be solved without modifying and recompiling the
kernel?

Cheers,
Razvan





More information about the MPlayer-users mailing list