Log in

View Full Version : recovery of a partial mpeg file


Booji Boy
1st January 2004, 15:48
Hi everyone.

I'd like to know if someone knows of a tool to recover a partial mpeg file. Partial meaning in my case the beginning is missing.

thx and a happy new year

fccHandler
1st January 2004, 19:42
Well, conceptually an MPEG is an endless stream; it doesn't necessarily have a clear-cut beginning or ending. In theory you can jump into an MPEG anywhere and begin decoding as soon as you find a sync header. Sync headers appear very frequently, for exactly that reason (think of a continuous digital broadcast).

But WMP (and probably others) expect a sync header at the beginning of the file, and may reject the whole file if it doesn't begin with a sync header. VirtualDub-MPEG2 (http://fcchandler.home.comcast.net/stable) will search about 200K for sync before rejecting the file, so that may work for transcoding.

To fix the actual file, you might try using a hex editor to search for the first appearance of the four-byte sequence: 0x00, 0x00, 0x01, 0xBA, then delete everything before that sequence.

Booji Boy
4th January 2004, 15:51
Originally posted by fccHandler

But WMP (and probably others) expect a sync header at the beginning of the file, and may reject the whole file if it doesn't begin with a sync header. VirtualDub-MPEG2 (http://fcchandler.home.comcast.net/stable) will search about 200K for sync before rejecting the file, so that may work for transcoding.

To fix the actual file, you might try using a hex editor to search for the first appearance of the four-byte sequence: 0x00, 0x00, 0x01, 0xBA, then delete everything before that sequence.

Thank you, that info about the byte sequence is exactly what I needed.

mustardman
28th February 2008, 00:44
Will this procedure also work for other than MPEG? For example, Xvid?
Is the frame size & frame rate (and any other important stuff needed) stored in every keyframe?

MM

Ranguvar
28th February 2008, 05:54
Not sure about the hex editing, but try VLC Media Player and DivFix. Both can recover AVIs well. Or you could open in VDub, if it does open, choose Direct stream copy, and save as a new AVI.

Ar3d
28th February 2008, 09:08
How about using adobe premiere i think it has that kind of features..

Ranguvar
28th February 2008, 13:22
I'm not sure if it can do that, but I'd stay away from bloated and pricey software, as least for simple operations that there are tiny freeware tools for :)

hkazemi
5th March 2008, 06:26
mpeg2repair (for fixing damaged .ts files) and VideoRedo Plus (for mpeg files of many types) are commonly used tools to fix broken streams and attempt to fix sync.