Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.


Go Back   Doom9's Forum > Video Encoding > MPEG-2 Encoding

Thread Tools Search this Thread Display Modes
Old 12th December 2008, 00:39   #1  |  Link
Registered User
Join Date: Jun 2008
Posts: 10
How to set/edit the PAR in MPEG files?

My NTSC camcorder produces MPG files with resolution 704x480, intended for 16:9 AR.

Unfortunately when I try to encode them, the aspect ratio is reported to the encoding tool (handbrake in this case) as 2.32.

That's way too wide, and results in the output files also having the Pixel Aspect Ratio set incorrectly.

Instead of messing around at the encoding stage, how can I correct the PAR of my source files? Is there some kind of tool that allows setting the correct aspect ratio to 16:9?

edit: If I use MPlayer or VLC to display the source MPG files I get the ultra wide stretched look. If I use MPC, it actually displays with the correct aspect ratio, until I switch off "Override Aspect Ratio" in which case it also displays the ultra wide image.

edit2: I found a program called "restream" that supposedly can change mpeg stream tags. I demuxed my mpeg file, ran the m2v through restream with new aspect ratio set, and the result is a bit-for-bit similar file. Obviously, it doesn't work as intended, unless I'm using it wrongly.

edit3: If I use restream to set a 1:1 aspect ratio, ALL the players display the file correctly, as in squeezed dvd-like format. However, if I set the flag to 16:9, I get the identical file from edit3, where the players all display it way too wide. It's really odd.

Last edited by nnezz; 12th December 2008 at 03:09. Reason: add more info
nnezz is offline   Reply With Quote
Old 12th December 2008, 06:42   #2  |  Link
Registered User
Join Date: Jun 2008
Posts: 10
Well, I fixed it myself.

No thanks to any of the several programs out there that apparently do not work.

Instead I found the hex string 01 B3 2C 01 E0 34

Where 34 is wrong. It should be 24. This will need to be replaced throughout the file, but it's a relatively simple process with a decent search/replace program.

Apparently the "wide screen" flag had been incorrectly set in the transfer process from camcorder to PC, thanks to using a little program known as "sdcopy" which claims to actually set the flag correctly. I don't know, but my files came out perfectly after turning that feature off. It may have some other obscure use that I cannot divine at this point.

Unfortunately there is NO way to undo the widescreen flag once it's been done, using sdcopy, except for doing it manually through hex editing. Or at least nobody has been sharing any methods for doing so.

Restream and Dvdpatcher both do not work.
nnezz is offline   Reply With Quote
Old 12th December 2008, 18:42   #3  |  Link
Registered User
Join Date: May 2007
Posts: 109
Restream & DvdPatcher set correct aspect ratio for MPEG-2 type. Maybe your file is MPEG-1 type, that is, why your encoding tool reports a strange value - 2.32 ??
ANGEL_SU is offline   Reply With Quote

aspect, mpeg, ratio

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 18:45.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.