VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. Member
    Join Date: Jul 2014
    Location: Indonesia
    Search Comp PM
    Hi all,

    I 've tried some command line given in some thread about changing aspect ration of MP4 using ffmpeg.

    Too bad that all of them is through re encoding process.

    Do anyone know what line used to change aspect ration of MP4 video without re encode using ffmpeg?

    Thanks in advanced
    Quote Quote  
  2. Member
    Join Date: Jun 2012
    Location: USA
    Search Comp PM
    -i input.mp4 -vcodec copy -acodec copy -aspect x:y output.mp4
    Quote Quote  
  3. Not all players will obey aspect ratio flags.
    Quote Quote  
  4. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    You might want to consider mp4box, since its more reliable for changing AR than ffmpeg
    Quote Quote  
  5. Member
    Join Date: Jul 2014
    Location: Indonesia
    Search Comp PM
    Originally Posted by smrpix View Post
    -i input.mp4 -vcodec copy -acodec copy -aspect x:y output.mp4
    Thanks it works perfectly Name:  smiley_beer.gif
Views: 871
Size:  5.7 KB

    Originally Posted by poisondeathray View Post
    You might want to consider mp4box, since its more reliable for changing AR than ffmpeg
    May I know how come ffmpeg is less reliable in AR changing?
    Last edited by morsh; 15th Jul 2014 at 20:09.
    Quote Quote  
  6. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Originally Posted by morsh View Post

    May I know how come ffmpeg is less reliable in AR changing?


    It's ok , as long as it worked for you

    1) ffmpeg's -aspect x:y is really affecting the DAR (display aspect ratio) at the container level, mp4box writes data as PAR (pixel aspect ratio), also known as SAR (sample aspect ratio) at the bitstream level in the header as a VUI parameter. So you demux it, changes are gone with ffmpeg, but stay with mp4box. Out of the players that accept either, more players tend to accept stream level changes than container level changes (more reliable) . Also , there is more control with PAR values, you can distinguish between ITU vs. non ITU aspect ratios more easily (The short version is basically there are cases where you need to acknowledge different ways of AR interpretation)

    2) ffmpeg's MP4 muxer seems less reliable , at least in the past. Sometimes muxes did not play correctly on some devices, yet the same mux with mp4box, or l-smash works fine. This has to do with MP4 muxes in general, not necessarily AR changing only
    Quote Quote