[MEncoder-users] is this possible

Lobster lobo at lobs.sytes.net
Sun Feb 27 21:07:36 CET 2011


On 28/02/2011 2:06 a.m., Daniel Harris wrote:
> Hello
>
> I am trying to record some vhf tape to dvd but after trying what seems
> like hundreds of combinations I still end up with a/v sync issues.
> Over an hour the sync only seems to go out by about 100ms so I was
> thinking about recording in 5 to 10 minute intervals and then cutting
> and splicing the whole video back together again using scene changes
> as markers.  Is that possible and is there a way to make mencoder
> record for 5 or ten minutes and then fire up a second instance say
> about 30 seconds before the first one ends.  I guess this would
> require some sort of shell script?
>
> Would this be the best way to do this or is their a better way?
>
> Thanks in advance
>
> Dan
>
> ps this is the command I am using to record the input
>
> mencoder -tv norm=PAL:driver=v4l2:width=720:height=576:input=1:device=/dev/video0:alsa:adevice=hw.0,0:audiorate=48000:forceaudio:immediatemode=0:fps=25
>   tv:// -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf
> pp=lb/ha/va/dr,hqdn3d,harddup -srate 48000 -af lavcresample=48000
> -lavcopts vcodec=mpeg2video:vrc_buf_size=1500:vrc_maxrate=8000:vbitrate=7000:keyint=15:acodec=mp2:abitrate=192:aspect=4/3
> -mc 0 -noskip -o output.mpg

If I was you I would remove the -mc 0 and -noskip options  (if you have 
not done so already),
Sometimes frames need to be skipped or duplicated to keep av sync, -mc 0 
prevents all of this,
and -noskip prevents skipping of frames.

I would also check your cpu load, it could be a case you cant encode as 
fast as real time with the
video codec being used. If you have a multi-core system try adding the 
threads option to your
lavcopts, I.E threads=2 will use 2 threads/cores to encode
Also using all those video filters (except harddup) will use a lot more 
cpu, so to begin with I would
remove them all except harddup (needed to duplicate frames for av sync) 
then if all is good add
them back one by one. (always keep harddup as the last video filter in 
the chain)





More information about the MEncoder-users mailing list