[MEncoder-users] Is it possible to make Mencoder encode video file DAR(Display Aspect Ratio) same as ffmpeg does?

littlebat dashing.meng at gmail.com
Wed Dec 12 13:58:18 CET 2012


On Wed, 12 Dec 2012 12:47:15 +0100
Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:

> 
> 
> On 12 Dec 2012, at 10:53, littlebat <dashing.meng at gmail.com> wrote:
> 
> > Hi,
> > 
> > I have read all parameters in mencoder to deal with DAR of result
> > encoded file, but it seems can't set the result video's DAR
> > correctly as ffmpeg does. The result file encoded by mencoder has
> > two different DAR(detected by ffmpeg -i), but the file encoded by
> > ffmpeg has only one DAR value.(also detected by ffmpeg -i).
> > 
> > So:
> > 1, Is it possible to make Mencoder encode video file DAR (Display
> > Aspect Ratio) same as ffmpeg does? How to do that?
> > 
> > 2, What is the difference between the DAR in "[]" and outside "[]"
> > in "ffmpeg -i " information? such as:
> > Stream #0.0: Video: mpeg4, yuv420p, 176x144 [PAR 12:11 DAR 4:3],
> > PAR 1:1 DAR 11:9, 10 fps, 10 tbr, 1k tbn, 10 tbc (default) Stream
> > 
> > 
> > Below is my command line:
> > 1, Mencoder
> > mencoder \
> >  -noconfig all \
> >  -ovc lavc \
> >  -oac pcm \
> >  -lavcopts vcodec=mpeg4:vbitrate=256:aspect=4/3 \
> 
> That specifies only the aspect for the encoder, there isn't really a
> good reason to use that ever. -aspect or dsize video filter and
> possibly autoaspect in the encoder options are the only variants that
> usually make sense. 

No, neither -aspect nor dsize video filter can get a correct DAR result
(resolution: 176x144, DAR: 4:3).
Below is my command line:
1, Using -aspect(it seems only used in mplayer playing video file?):
/opt/custom/bin/mencoder \
  -noconfig all \
  -ovc lavc \
  -oac pcm \
  -lavcopts vcodec=mpeg4:vbitrate=256 \
  -vf harddup,scale=176:144 \
  -of lavf \
  -ofps 10 \
  -lavfopts format=mkv \
  -aspect 4:3 \
  -o "mm.mkv" \
  "108.flv" -ss 0 -endpos 10

2, Using dsize video filter:
/opt/custom/bin/mencoder \
  -noconfig all \
  -ovc lavc \
  -oac pcm \
  -lavcopts vcodec=mpeg4:vbitrate=256 \
  -vf harddup,scale=176:144,dsize=4/3 \
  -of lavf \
  -ofps 10 \
  -lavfopts format=mkv \
  -o "mmm.mkv" \
  "108.flv" -ss 0 -endpos 10

Any idea?


More information about the MEncoder-users mailing list