[FFmpeg-user] Changing DAR ?

Mike Martin mike at redtux.org.uk
Tue Oct 15 14:16:10 CEST 2013


This is what I use (retaining original AR) for mp4

-c:v libx264 -preset fast -crf 22 -g 20  -c:a  aac
 -b:a 32000  -threads 2 -af volume=2.5 -vf
 scale="352:trunc(ow/dar/2)*2",fps="fps= 20",setsar="1/1"
  -strict -2 -y

It also fixes SAR to be square

opts are
libx264
crf - values between 18-25 for good quality
scale - I resize to 352 width and adjust height to fit AR
fps - 20
audio - aac adjusted to 2.5 times output with bitrate of 32k
-g - sets GOP size to 1 second

hope this helps



On 11 October 2013 20:58, Ronald F. Guilmette <rfg at tristatelogic.com> wrote:

>
> In message <068B1B8693FF41FC93C7864BCE24927B at HPKANTOOR>,
> "Bouke \(VideoToolShed\)" <bouke at videotoolshed.com> wrote:
>
> >
> >----- Original Message -----
> >From: "Ronald F. Guilmette" <rfg at tristatelogic.com>
> >>
> >> So, just to be sure now, please confirm that it _is_ indeed the case
> that
> >> "-vcodec copy" is incompatible with the "-vf <anything>" option, yes?
> >
> >Perhaps i'm missing the point, but -vcodec copy -aspect 16:9 does work
> fine.
> >No need for -vf if you just want to change DAR.
>
> I agree that that combination _does_ in fact work for some subset of
> all of the video formats that ffmpeg handles... although it appeared
> to me that it does not work for all.  I may be wrong about that, but
> at this moment I don't think so.  I will need to do more experiments,
> I guess, and report hard facts and findings.
>
> As regards to the point which you may or may not be missing, as I said,
> as of 2.0.1, ffmpeg appears to allow both -vcodec copy and also -vf options
> to be used together, and it just silently ignores one of those, which in
> my opinion is rather entirely sub-optimal.
>
> Also, I believe that there may be cases where using -vf and setsar or
> setdar may cause unexpected effects, specifically on the aspect ratio
> that is _not_ being changed.  But I have to get in and dig around on the
> mediainfo sources and try to find out if some of the things it is telling
> me may be slightly less than true, at least for some video formats.  If
> so, then it is really mediainfo's fault for printing misleading output.
>
>
> Regards,
> rfg
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list