VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. Member
    Join Date
    Mar 2011
    Location
    Paris, France
    Search PM
    Hello

    For some reason, I can't get ffmpeg to resize a 848x480 video (H264/AAC) to 640x480.

    I tried the following commands, but both end up with the same original size, although VLC says the output video is 640x480:

    Code:
    ffmpeg.exe -report -i input.mp4 -shortest -c:v libx264 -vf scale=640:480 -pix_fmt yuv420p -strict experimental -c:a aac -ab 128k -ar 48000 -strict -2 -f mp4 output.mp4
    
    ffmpeg.exe -report -i input.mp4 -shortest -c:v libx264 -s 640x480 -pix_fmt yuv420p -strict experimental -c:a aac -ab 128k -ar 48000 -strict -2 -f mp4 output.mp4
    Any idea why?

    Thank you.
    Last edited by yetanotherlogin; 21st Apr 2014 at 07:21.
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    What do you identity the video frame size with? ffmpeg, Mediainfo?
    Quote Quote  
  3. Member
    Join Date
    Mar 2011
    Location
    Paris, France
    Search PM
    I just play the output video in VLC and check Tools > Codec Information.

    Are "-vf scale=640:480" or "-s 640x480" the right switches to change the size of a video, or should I use something else?
    Quote Quote  
  4. I tried both your command lines and they both worked. A random 1280x720 video was resized to 640x480. It was properly flagged to play back at the original 16:9 aspect ratio. Are you looking to squish the video so it plays 4:3 instead of 16:9?
    Quote Quote  
  5. Member
    Join Date
    Mar 2011
    Location
    Paris, France
    Search PM
    Thanks for the feedback.

    I was just trying to convert a video so that it would go from 848x480 to a more standard 640x480. I'll investigate further.
    Quote Quote  
  6. 848x480 is a ~16:9 aspect ratio. 640x480 is a 4:3 aspect ratio. The issue isn't what frame size you want, ffmpeg is giving you that, it's what aspect ratio you want the video displayed at.
    Quote Quote  
  7. Member
    Join Date
    Mar 2011
    Location
    Paris, France
    Search PM
    Thanks for the info. I'll read up about changing aspect ratio.
    Quote Quote  
  8. If you want the resulting video to display 4:3 add "-aspect 4:3". For example:

    Code:
    ffmpeg.exe -report -i input.mp4 -shortest -c:v libx264 -vf scale=640:480 -aspect 4:3 -pix_fmt yuv420p -strict experimental -c:a aac -ab 128k -ar 48000 -strict -2 -f mp4 output.mp4
    Quote Quote  
  9. Member
    Join Date
    Mar 2011
    Location
    Paris, France
    Search PM
    Thank you.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!