[MEncoder-users] composite input a/v sync issue

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Nov 10 11:28:28 CET 2009


On Tue, Nov 10, 2009 at 01:07:03AM +0100, Miroslav Rovis wrote:
> BTW, -forceidx on an avi, I think I tried it earlier on, and, if you
> take a look, I wrote, that's not seeking on the file itself, but copying
> over and only then searching though a copy of it. So "-o mpeg" is
> necessary for seekable file on the fly.

Not, "mplayer -forceidx incomplete.avi" works just fine to enable
seeking on an AVI file that was not completely written.
There is no need to make a copy.

> Yes, reappear, as those ugly spots, intervals that I spent a few lines
> of prose to desccribe in my first post, I think, still cause problems,
> but, But!
> It's all back in sync after a second or two, which is nearly what I can
> leave with, giving the absolutely incomparable quality which I get with
> my Gentoo Linux with nicely compiled recent MPlayer...

That "sync slowly correcting itself" is usually due to MPlayer limiting
the sync correction and most of the time can be improved with e.g. -mc 100
(as I already suggested).

> Note also in the command that I put: "vpass=1" in there. That is beacuse
> the size that I got so far (and it is nearly two (2) hours now, is 16GB.
> Of course I have to further work on it.

Not sure what you are trying to say.
If the size is too big, try using vqscale=3 instead of vqscale=2, also
try adding something like nr=100 (particularly if the video is noisy).

> #!/bin/bash
> # This is my script Make_avi_h264_00.sh
> mencoder $1.avi -o $1_p1_`date +%H%M%S`.avi -ss 0 -ovc x264 \
> -x264encopts pass=1:turbo:bitrate=900:bframes=1:\
> me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300
> \
> -vf harddup \
> -oac faac -faacopts br=192:mpeg=4:object=2 -channels 2 -srate 48000 \
> -ofps 24000/1001
> mencoder $1.avi -o $1_p2_`date +%H%M%S`.avi -ss 0 -ovc x264 \
> -x264encopts pass=2:turbo:bitrate=900:frameref=5:bframes=1:\
> me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300
> \
> -vf harddup \
> -oac faac -faacopts br=192:mpeg=4:object=2 -channels 2 -srate 48000 \
> -ofps 24000/1001

Particularly with x264 unless you need to target a specific hardware
play or file size you should use quality-based encoding (similar to
vqscale) with something like crf=22 instead of setting bitrate.
(note that in both cases 2-pass only makes sense with bitrate setting,
you only need one pass with crf or vqscale).
Unless you still have a system with only one CPU you also should be
using the "threads" option.


More information about the MEncoder-users mailing list