[MEncoder-users] audio sample rate alignment when capturing from tv

Robert Munro ml at robmunro.net
Mon Jul 12 18:29:28 CEST 2010


Hi All,

I am trying to use mencoder to capture the output stream the video is fine
but the audio is going wonky.

looks like the sampling rate from the sound device /dev/dsp1 is 32000. if i
use audiorate=32000 to capture audio then the audio is in sync but the pitch
is low. if i use audiorate=44100 the pitch is correct but the audio is out
of sync.
the command i have so far is:
mencoder tv:// -tv
channel=0:driver=v4l2:device=/dev/video0:normid=5:input=1:chanlist=us-cable:brightness=0:contrast=0:hue=0:saturation=0:adevice=/dev/dsp1:audiorate=32000
-oac pcm -ovc lavc -quiet -lavcopts vcodec=mpeg4:vbitrate=3000 -lameopts
cbr:br=128 -af resample=44100 -srate 44100 -o ./capture.avi

i have tried using -oac copy as well (same result) so it seems that there
must be a resampling taking place in the decoder or something.

anyone out there have ideas on the right line?

regards
rob


More information about the MEncoder-users mailing list