Incorrect aspect ratio in mp4 (H.264) generated by Samsung camcorder

3

1

I just bought a Samsung Camcorder (SMX-F30BP). It has the ability to capture in standard Aspect Ratio (I guess 4:3) or in 16:9 format. The problem is that the mp4 (H.264) file generated is always regarded as a 4:3 format in any player I tried (media player, MPlayer, VLC, etc.), despite the fact that the frames are actually 16:9. Only by manually setting the Aspect Ratio to 16:9 in the player, I get the movie right. Does someone has a clue on what is going on? Is it a bug in the cam software? Is there something I can do? Thank you for your answers.

Overflow

Posted 2009-10-28T10:06:48.450

Reputation: 225

VLC allows you to change the AR on-the-fly ... mine is an old version and uses 'A' as the AR-change-hotkey. keep pressing to cycle through the options. other decent players will let you change it while playing too. but for permanent change you want the article linked below. – quack quixote – 2009-10-28T11:43:36.650

Answers

2

There is simple way to correct spect ratio without re-encoding.

The Samsung MX20 does not tag its 16:9 files with the correct DAR. To fix this without a re-encode use Yamb (or mp4box), setting the aspect ratio to 64:45 for PAL videos. As in this test video of a round spray can top shot from above. No other editing was done before uploading to YouTube. Alternatively, install mp4box and use this batch file :

@ECHO OFF

:LOOP

"E:\Program Files\Yamb\mp4box.exe" -par 1=64:45 %1

SHIFT

IF [%1]==[] GOTO END

GOTO LOOP

:END

Replace the path to mp4box as appropriate. Then just drag and drop files to be fixed onto the bat file.

Source: http://www.youtube.com/watch?v=rg4pc2rQ9Rw

Aleksei

Posted 2009-10-28T10:06:48.450

Reputation:

That's what I just resolved to do! Unfortunately I have to process all the files however. Thanks, your answer is correct. By the way, I use the option -par 1=16:11 for PAL, as suggested by Yamb, not 64:45. – Overflow – 2010-03-04T15:23:29.327

I investigated a little deeper and found out that actually 64:45 is the correct PAR for the format 720x576 to obtain exactly 16:9 AR. – Overflow – 2010-03-05T15:57:39.783

3

You can modify the aspect ratio without re-encoding.

EDIT : For MP4 files see this article:
Change Aspect Ratio of .mp4 without re-encoding

See MPEG4 Modifier

Modifies MPEG-4 ASP videos (XviD, DivX) without re-encoding (change aspect ratio, edit userdata, remove or add packed bitstream, and change interlaced field order). It can also show information about the video such as the amount of I/P/S/B-VOPs used, whether or not QPel/GMC were used, etc. The video must be in an AVI container. More information can be found in this thread. There's also a command line version sharing most of the same features.

image

harrymc

Posted 2009-10-28T10:06:48.450

Reputation: 306 093

Nice. I knew there had to be a way. Still, weird that the camera itself doesn't already embed that information. – Joey – 2009-10-28T10:37:48.810

Sorry, but the clip format is MP4, not AVI, so I should have to convert it first, then modify the AR. @Johannes Rössel, why did you remove your previous answer? I think it was correct and I was going to "accept" it – Overflow – 2009-10-28T10:53:14.147

See the article I edited into my answer. – harrymc – 2009-10-28T11:31:33.820

0

The MPEG4-Modifier does only work for DIVX encoded files. For H264-encoded videos you could try to use the H264 Apect Ratio Modifier (H264ARM) from this thread:

http://forum.videohelp.com/threads/316259-Can-I-change-the-pixel-aspect-ratio-in-an-x264-AVI-without-reencoding

It works without reencoding but patches the values in the h264-stream instead.

someone

Posted 2009-10-28T10:06:48.450

Reputation: