[MEncoder-users] Need help fixing/decoding a recovered h264 file

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Mar 3 19:38:22 CET 2010


On Tue, Mar 02, 2010 at 03:42:00PM -0800, Marc MERLIN wrote:
> On Tue, Mar 02, 2010 at 11:45:38PM +0100, Reimar Döffinger wrote:
> > On Tue, Mar 02, 2010 at 11:04:01PM +0100, Moritz Barsnick wrote:
> > > On Fri, Feb 26, 2010 at 23:11:24 -0800, Marc MERLIN wrote:
> > > > thanks to your detailled info, it worked!!!
> > > 
> > > Interestingly, this just popped up on freshmeat.net:
> > > http://freshmeat.net/projects/recoverjpeg
> > > Version 2.0:
> > > "Support for recovery of MOV as well as JPEG files has been added."
> > > 
> > > I have no idea if it would have come close to what you guys achieved in
> > > the discussions here. (My respect by the way.)
> > 
> > Well, the process I used can be automated, I'd happily explain to someone
> > who wants to write code to automate it.
> 
> I mentioned it to Christophe GRENIER, and PhotoRec 6.12-WIP actually already 
> recovers the necessary pieces, but it creates 2 files. 
> One is a .mp4, one is a .mov.
> 
> If you cat the .mp4 with the .mov you actually get a working file.
> 
> With a little luck he'll find a way to have PhotoRec do this automatically
> in some future version.

Well, due to the padding it is probably non-obvious which header belongs to
which mdat chunk etc.
However in principle it should be possible to find out by looking at the index
and checking if the offsets there match a start of e.g. a H.264 or AAC frame.
It's would be much easier to do though if mov used the bitstream syntax of
H.264 one instead of their own NAL format (though I admit that one is nicer
for other use cases).


More information about the MEncoder-users mailing list