Log in

View Full Version : Change aspect ratio mpeg 1 without demux


marr
1st May 2007, 15:43
I have a MPEG 1 file (320:240), but it's incorrectly encoded with aspect ratio at 1.980:1 (GSpot says sar: 1.33, par: 1.485 dar: 1.980). It must be changed to 4:3.

ReStream and DVDPatcher only work mith MPEG 2, but I need for MPEG 1.

I only want to change (patch) the display aspect ratio without reencoding.

AlanHK
5th May 2007, 11:27
A couple of suggestions, not tested I'm afraid.

TMPGenc. The demo version lets you edit MPEG1 (but not MPEG2 after a few weeks).
I can't guarantee it won't reencode, but it can change the aspect ratio.

mpgtx, a command line tool.
You can get it here (http://mpgtx.sourceforge.net/)

The full command codes are:
mpgtx.exe : manipulate mpeg files
Usage : mpgtx.exe [command] [options] [mpegfile [mpegfile | range]...
Commands :
-i print infos about following files.
-s split following files according to the specified ranges.
-j join following files (ranges may be specified).
-d demultiplex elementary streams from following file
-T modify id3 tag.
-h print this help screen.
-v print version informations.
-# where # is a number, split the following file in #.
Options :
-N Do not print out excessive information while processing
If you use MacOS Classic, this is RECOMMENDED
Otherwise mpgtx will be dead slow!
-f force overwriting of files, don't ask for confirmation
-P keep headers of mpegs which sometimes is usefull
-X Try to search for a valid PACK header in the whole file
This may result in an endless loop if not successfull!
-An While joining or splitting, aspect ratio will be forced to:
n=1 -> 1:1, n=2 -> 4:3, n=3 -> 16:9, n=4 -> 2.21:1
All Numbers from 0 - 16 will be accepted but the above are valid!
-b NAME set the basename for the output files
-o FILE set the output file name (join implied)
if FILE is - , standard output will be used
--force force joining of incompatible files
--no-parachute don't try to catch SIGSEGV (usefull for debugging)
Ranges :
Ranges must follow an mpeg file
[a-b] from 'a' inclusive to 'b' inclusive. If you want half opened
ranges, you may want to use ]a-b], [a-b[ or ]a-b[ instead
[num/total] the 'num' part if the mpeg file was split in 'total'.
[1/4] would result in the first quarter of the mpeg file.
{a-b-...} where 'a', 'b', ... are in ascending order. Split the file
at given values. {700M} is therefore equivalent to ranges
[-700M] ]700M-]
Values :
Values can be time or offsets in the mpeg file
Time Format HH:MM:SS where the HH: part can be omited
Offset Format a number optionally followed by:
M : offset is in Megabytes
k : offset is in Kilobytes
An empty value means the corresponding file boundary:
[-10M] the first 10 Megabytes of file
[500M-] from 500 Megabytes to the end of file

Notice the "-An" setting.
That looks like what you want.

marr
5th May 2007, 13:15
Thanks, this was the right idea. TMPGEnc doesn't work, it reencodes. But mpgtx can manipulate these bits without reencoding. "mpgtx -s -A1 Video.mpg" changes par to 1.0 and no changes to sar, so dar correctly results in 1.33, now MediaPlayerClassic and VLC display correct.

SeeMoreDigital
18th June 2007, 11:07
mpgtx, a command line tool.
You can get it here (http://mpgtx.sourceforge.net/)

The full command codes are:
mpgtx.exe : manipulate mpeg files
Usage : mpgtx.exe [command] [options] [mpegfile [mpegfile | range]...
Commands :
-i print infos about following files.
-s split following files according to the specified ranges.
-j join following files (ranges may be specified).
-d demultiplex elementary streams from following file
-T modify id3 tag.
-h print this help screen.
-v print version informations.
-# where # is a number, split the following file in #.
Options :
-N Do not print out excessive information while processing
If you use MacOS Classic, this is RECOMMENDED
Otherwise mpgtx will be dead slow!
-f force overwriting of files, don't ask for confirmation
-P keep headers of mpegs which sometimes is usefull
-X Try to search for a valid PACK header in the whole file
This may result in an endless loop if not successfull!
-An While joining or splitting, aspect ratio will be forced to:
n=1 -> 1:1, n=2 -> 4:3, n=3 -> 16:9, n=4 -> 2.21:1
All Numbers from 0 - 16 will be accepted but the above are valid!
-b NAME set the basename for the output files
-o FILE set the output file name (join implied)
if FILE is - , standard output will be used
--force force joining of incompatible files
--no-parachute don't try to catch SIGSEGV (usefull for debugging)
Ranges :
Ranges must follow an mpeg file
[a-b] from 'a' inclusive to 'b' inclusive. If you want half opened
ranges, you may want to use ]a-b], [a-b[ or ]a-b[ instead
[num/total] the 'num' part if the mpeg file was split in 'total'.
[1/4] would result in the first quarter of the mpeg file.
{a-b-...} where 'a', 'b', ... are in ascending order. Split the file
at given values. {700M} is therefore equivalent to ranges
[-700M] ]700M-]
Values :
Values can be time or offsets in the mpeg file
Time Format HH:MM:SS where the HH: part can be omited
Offset Format a number optionally followed by:
M : offset is in Megabytes
k : offset is in Kilobytes
An empty value means the corresponding file boundary:
[-10M] the first 10 Megabytes of file
[500M-] from 500 Megabytes to the end of file

Notice the "-An" setting.
That looks like what you want.Anybody out there fancy making a GUI for this?


Cheers

Abond
18th June 2007, 12:53
Restream is working with mpeg1, no problem.