[MEncoder-users] Accuracy of the -endpos option
Josef Wolf
jw at raven.inka.de
Wed Jun 30 10:34:51 CEST 2010
On Tue, Jun 29, 2010 at 03:36:12PM +0200, belcampo wrote:
> Josef Wolf wrote:
> >On Mon, Jun 28, 2010 at 10:32:24PM +0200, belcampo wrote:
> >>Josef Wolf wrote:
> >>>On Mon, Jun 28, 2010 at 04:38:29PM +0200, belcampo wrote:
> >>>>Josef Wolf wrote:
> >>>>>Hello,
> >>>>>
> >>>>>I have troubles with the accuracy of the -endpos option. Most of the time,
> >>>>>I get about 40 to 50 frames too much. When I adjust the value to get the
> >>>>>correct end position, then audio ends about 2 seconds too early.
> >>>>With ffmpeg -vframes ### you can exactly say how many frames you want.
> >>>>The problem with -endpos or -t when using ffmpeg, it uses recording
> >>>>duration, NOT video- or audio-duration but the smallest of them.
> >>>Hmmm... Does mencoder have a counterpart to -vframes? I have gone a long way
> >>>to optimize the codec settings for mencoder and would like to avoid to start
> >>>from scratch when moving to ffmpeg...
> >>If you post your command line settings, maybe it's easy translated
> >>to ffmpeg, or use the solution explained further.
> >
> >Sure, I can post them:
> >
> > mencoder \
> > -ss 00:00:01.880 -endpos 241.92 \
> > -vf yadif=0,crop=704:560:8:8,softskip,harddup \
> > -oac mp3lame -lameopts preset=medium -passlogfile \
> > -ovc x264 -x264encopts \
> > bitrate=800:pass=2:subq=7:frameref=15:me=umh:partitions=all:8x8dct:direct_pred=auto:me_range=64:trellis=2:bframes=5:weight_b:threads=auto:nr=1000:b_pyramid=normal:turbo=2 \
> > -passlogfile x264-800/2010-05-08-Tanz-Jan-3-Tanz.avi.log \
> > -o x264-800/2010-05-08-Tanz-Jan-3-Tanz.avi \
> > 2010-05-09-Tanz-Jan008.avi
> >
> >Whatever I tried, I get much bigger files with very bad quality from ffmpeg.
> All those -ovc x264 -x264encopts ... and there ffmpeg equivalents,
> they are the same, mencoder and ffmpeg use exactly the same x264
> libraries, so there can't be any difference in that part.
While the options are the same, the syntax how to specify them is very
different.
> http://rob.opendot.cl/index.php/useful-stuff/x264-to-ffmpeg-option-mapping/
Ah, thanks for this link. I think this was exactly what I was looking for.
> Could you provide a sample, an upload somewhere, of the source-file ?
I'll try to get the option mapping correct first. If I can't get it working,
I'll upload samples. IIRC there was an upload area somewhere at mplayyhq.hu?
> Some general thoughts, not knowing what kind of source yor dealing with.
> me_range=64 where mewiki.project357.com/wiki/X264_Settings says
> merange
>
> Default: 16
>
> merange controls the max range of the motion search in pixels. For
> hex and dia, the range is clamped to 4-16, with a default of 16. For
> umh and esa, it can be increased beyond the default 16 to allow for
> a wider-range motion search, which is useful on HD footage and for
> high-motion footage. Note that for umh, esa, and tesa, increasing
> merange will significantly slow down encoding.
>
> frameref=15
> Looks rather/very high to me
This is the highest possible value AFAIK. I am trying to get the highest
possible quality with file size as short as possible because I encode for
archival. I don't really care much about encoding time.
> >So demuxing, encoding/snipping, and muxing afterwards should also work fine?
> >Last time I tried, mencoder refused to process a video stream without audio or
> >an audio stream without video.
> I'm used to use more then 1 application, I try to pick 'the best'
> for a given task. Maybe it's not your piece of cake.
Normally, I also try to pick the best. But with video encoding it is very hard
to find the best. There are so many applications, all use different syntax,
and most of them use the same libraries under the hood. Selecting the "best"
quickly turns out to be a full-time-job.
More information about the MEncoder-users
mailing list