Take the 2-minute tour ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

I have a movie in AVI format from a toy helicopter that reports an corrupt or missing index but still plays in VLC very wide and short. When I click Video -> Aspect Ratio -> 4:3 the file plays as it should, but I have to do this each time I open a file.

Video file info: Video: mjpeg, yuvj422p, 720x240, 59.94 fps, 59.94 tbr, 60 tbn

The video dimensions are 720x240 and according to the instructions the video should be 720x480

I am looking for suggestions for video conversion software that will allow me to change the aspect ratio. I am using a Mac, but have access to Windows PC as well. Freeware is preferred.

I have tried Handbrake 0.9.9 on Mac, but I can't seem to find a method of increasing the vertical size beyond the original 240.

share|improve this question

2 Answers 2

FFMpeg has an option to modify the aspect ratio of a video file without actually modifying the video, see http://www.ffmpeg.org/ffmpeg-all.html#Video-Options

For example, in your case, the desired aspect ratio is 720 / 480 = 1.5 (3:2) (which is NOT 4:3, it should be 540 in that case)

So your command line may look like:

ffmpeg -i input_file.avi -c copy -aspect 1.5 output_file.avi

This copies both audio and video streams unchanged to the output file, and specify into the file's metadata that the aspect ratio is 1.5 as a hint for video players.

share|improve this answer
    
+1 for using -aspect with stream copy mode. –  LordNeckbeard Dec 18 '13 at 7:53
    
Most likely the video is 4:3 with non-square pixels. It sounds like it's interlaced DV-sized footage and each sample (field) is actually 720x240, which is normal standard def NTSC with a pixel (not picture) aspect ratio of 10/11ths. (See here for example.) –  user1118321 Nov 12 at 5:33
    
@user1118321 most probably true, but if, as the OP says, there are "missing index" messages, it is probably corrupted or muxed incorrectly. Manually fixing the video using the technique described in my answer will not hurt. In truth, ffmpeg can set the PAR (aka SAR) as well as the DAR, but this involves using video filters, which do not allow the "copy" codec. –  SirDarius Nov 13 at 9:29

AVIdemux can do that when encoding, but i cannot remember if it allows you to do that when you chose to copy the stream without reencoding (you don't want to reencode, since it will not only be time consuming, but also lossy).

If you are willing to change it from AVI to MKV (VLC and most other players will have no problem playing it) you can do that with MKV-merge with no problem. It will be in the settings of your video stream, just set the display resolution to what you want it to be.

I am not 100% sure, but i would bet that both these are compiled for both Windows and Mac.

If you are not afraid of the command line, i would recommend avconv from libav package. It not only allows one to set the display aspect ratio with the -aspect parameter (just like ffmpeg did), but also to manipulate the pixel (aka sample) aspect ratio, which then recalculates the display aspect ratio automatically. That second approach, however, would require the stream to be decoded and reencoded again. So you you have:

No reencoding:

avconv -i input.avi -aspect 4:3 -c:a copy -c:v copy output.avi

With reencoding:

avconv -i input.avi -vf dar=4:3 -c:v libxvid -c:a copy output.avi

or

avconv -i input.avi -vf sar=1:1 -c:v libxvid -c:a copy output.avi

Keep in mind that unless you are doing something very creative, it makes little sense to specify both dar and sar, since the last one you mention will basically override the settings set by the previous one.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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