View previous topic :: View next topic |
Author |
Message |
New User n00b
Joined: 12 Sep 2005 Posts: 57
|
Posted: Thu Oct 02, 2008 1:30 am Post subject: mplayer and MPEG-PS encoding problem workaround |
|
|
I have found that that when I use mplayer to create avi files using the -dumpstream command, it has trouble with MPEG-PS DVDs. After a simple dumpstream or a mencoder -ovc copy, the header reports a corrupted video codec.
on an identify, the video line of the original dvd comes out as:
Code: |
VIDEO: MPEG2 720x576 (aspect 3) 25.000 fps 7700.0 kbps (962.5 kbyte/s)
|
Say I dumpstream the to a file test.avi. When I get the details of that file with mplayer -identify, the video line looks like:
Code: |
VIDEO: [] 720x576 24bpp 25.000 fps 6320.4 kbps (771.5 kbyte/s)
|
Note the codec is just an unreadable character. Also note the difference in bitrate even on a dumpstream or a mencoder copy. These files play fine in mplayer, but when trying to play them in vlc, the video won't work.
The workaround for this is to open the avi file in a hex editor and changing the last 4 bytes of line x00b0 to 6d 70 67 32 (mpg2 on the text side). Once the file is saved with the new values, the codec in the header is changed to mpeg2. Why mplayer fails to put the proper codec in the header is up for discussion.
The next thing to do is to find a hex editor that is command line so I can script this. Anyone know of one? I'm new to hex editing so i'm just using khexeditor.
Anyway, I hope this is helpful to someone other than myself. I've had several DVDs that acted this way (mostly European or Australian). |
|
Back to top |
|
|
MotivatedTea Apprentice
Joined: 06 Nov 2006 Posts: 269 Location: Toronto, Canada
|
Posted: Thu Oct 02, 2008 7:04 pm Post subject: |
|
|
A suggestion for scripting it: Create a file that contains just the correct four-byte header, and use the "dd" command to copy the contents of the file to the desired offset in the dumped file. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|