5

I have a video (.mpg) and currently it has the wrong aspect ratio (16:9). I now want to change it to the correct aspect ratio (5:4). How can I do this?

I know that on VLC player I can change the aspect ratio while the video is playing. However, I am wondering if there is a permanent way of changing the aspect ratio, such that each time this video is played, it is in the correct aspect ratio?

Thank you.

1

It's easy to do this with FFmpeg which is run from the command line.

Method 1 – this will size the video appropriately and encode the result in H.264 MP4 format:

ffmpeg.exe -i inputfile.mpg -vcodec h264 -s 720x576 -aspect 5:4 outputfile.mp4

Method 2 – this will set a hint in the file as to the size it should be displayed at (with no recompressing or quality loss). VLC should respect this although not all players/editors will:

ffmpeg.exe -i inputfile.mpg -vcodec copy -aspect 5:4 -acodec copy outputfile.mpg

Method 3 – if you detect a decrease in the quality of the MPEG you can compress it at a high-bitrate MPEG-2:

ffmpeg.exe -i inputfile.mpg -vcodec mpeg2video -aspect 5:4 -acodec pcm_s16le -b 30000k outputfile.mpg

Good luck!

  • If this doesn't work for you try to explain me better what doesn't work with the ffmpeg – BXS1001 Jan 6 '15 at 1:53
  • Thank you. Can someone please explain how to write these code? I am not very good with videos editing so I am a bit confused. Do these codes need to be run from a command line? – Head and toes Jan 19 '15 at 15:00
  • Yes! You must to download the FFmpeg from his homesite www.ffmpeg.org. After you download the binary you can put this code onto command line (cmd on windows or Bash in Linux), and execute it. If you have problems doing this, please, let me know. – BXS1001 Jan 20 '15 at 23:00
  • Thanks. So after downloading the zip file, which file do I need to open and what do you mean by download the binary? I have a windows computer. Thanks a lot for your help. – Head and toes Jan 22 '15 at 10:27
  • Ok! First of all sorry for my delay answering you. So, once you download ffmpeg.zip from www.ffmpeg.org you must to unzip all the content in a folder. After of this you must to navigate to this folder with the command line. You start the command line with cmd. When you have the command line opened you must to go to the ffmpeg/bin folder and start to write your instruction. for example: c:\ffmpeg\bin\ffmpeg.exe -i video.avi -vcodec h264 -s 720x576 -aspect 16:9 -acodec mp3liblame -b 1536k output.avi and press intro. The ffmpeg main program will start to work. And that's all folks! ;-) – BXS1001 Jan 31 '15 at 21:23
0

Probably the best way to go about this is to import the footage into an NLE like Premiere, Lightworks, Edius, or Final Cut, then export the footage with the correct aspect ratio. I imagine there is also an FFmpeg command to do this, but I am not familiar enough with it to tell you.

0

Most video editors and encoding applications will allow you to specify the pixel pitch when running the video through them. This does result in one more generation of loss, but would give the proper pixel pitch for the video. (In Premiere for example, you use Interpret footage.)

There may also be tools that can directly manipulate the pixel pitch listed in the video's meta-data, however I am not aware of any such tools off the top of my head and some brief searching didn't turn any up.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.