[MEncoder-users] Audio goes slowly out of sync while recording from tv://

ezzetabi ezzetabi at gawab.com
Sat Aug 22 19:42:04 CEST 2009


I wanted to convert some of my VHSes, so I bought an Easycap
DC60+
because I read it works fine in linux(1).

In fact it seems working, once modified
/etc/modprobe.d/tvcard.conf as
the page suggest I can use mplayer to see my VCR output.

Here is the command line I use to see:

mplayer -tv \
width=704:height=576:fps=25:driver=v4l2:device=/dev/video1\
:norm=PAL:input=0:forceaudio:alsa:adevice=dc60_plus:immediatemode=0\
:amode=1:audiorate=48000 tv:// 

The only parameter that might seem strange is the value of
adevice:
dc60_plus is a pcm I made that uses the DC60+ capture device
with a
reduced period_size(2).

It works fine. I can enjoy my tv using the VCR as tuner. :)

But I cannot record! Following the idea that mencoder can encode
anything
mplayer can play I made this command:

mencoder -oac copy -ovc lavc -lavcopts vcodec=ffvhuff -tv \
width=704:height=576:fps=25:driver=v4l2:device=/dev/video1\
:norm=PAL:input=0:forceaudio:alsa:adevice=dc60_plus:immediatemode=0\
:amode=1:audiorate=48000 tv:// -o my_movie.avi

A lossless compression uses of course lots of space, but I
intended to
make a double pass high quality compression using x264 later.

Unfortunately, it does not work well. The input framerate is
irregular:
it continuously changes from 23 to 25 fps and while mencoder
tries to
compensate duplicating or skipping frames the output movie
always is
a little faster than the sound.  The problem is grave, at the
end of a
100 minutes movie the audio is delayed of two seconds or so.

I tried many combinations of -mc 0 and -noskip with no avail;
I tried with another container format (the asf), but it does not
help;
immediatemode=1 gives no sound at all.

I also tried using mplayer directly:
mplayer -tv width=704:height=576:fps=25:driver=v4l2\
:device=/dev/video1:norm=PAL:input=0:forceaudio:alsa:adevice=dc60_plus\
:immediatemode=0:amode=1:audiorate=48000 tv:// \
-ao pcm:file=audio.wav -vo yuv4mpeg:file=video.yuv

The video seems fine, but the audio is jerky and unusable: it
almost
seems that mplayer tries to dump too fast and so puts some
silence
to compensate...

Must I really register with '-mc 0 -noskip' demux audio and
video and
resync by hand using -speed? I hope hot, but this is what
I was thinking...

What can I try?
Greetings and thanks
etb

(1) See (Spanish, but google can translate it fine):
http://acdrtux.es/2009/06/comparativa-de-%C2%ABeasycap-dc60%C2%BB-e-%C2%ABeasycap-dc60%C2%BB-en-ubuntu/
(2) See (This ML):
http://lists.mplayerhq.hu/pipermail/mencoder-users/2008-April/008590.html
-----------------------------------------------------------------------------------------------------------------------
Send big files for free. Simple steps. No registration.
Visit now http://www.nawelny.com


More information about the MEncoder-users mailing list