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

Marc MERLIN marc_mplayer at merlins.org
Wed Feb 24 08:49:16 CET 2010


I have an mp4/avc1 file I recovered from an sd card where it was deleted
by mistake.
I recovered the file by scanning the sd card for the file header and
then copying 600MB's worth of blocks, which should cover the entire
video length.
Because the files get removed each time I copy them off, I was somehow
hoping that the blocks were contiguous on the card, and not fragmented.

Sample of the file I can't decode and re-encode:
ftp://marc.merlins.org/sd_short.mov


The problem is that the file I recovered isn't quite playable and I
don't know h264/avc1 file formats well enough to see if there is an easy
fix or if my file is just hosed and gone.
I actually tried to take the h264 file header from the good file shown
below and attach the possibly broken file to that, but didn't get far
since I just don't know the h264 headers.

Could someone who's familiar with that format have a quick look and
maybe give me a hint of what I could do to get mencoder to read and
re-encode/fix the file?

If you can somehow help me fix the video, I would owe you *big* time.


This is a good file in exactly the same format and resolution than the
file I'm trying to recover (I truncated it at 12MB)
ftp://marc.merlins.org/GOPR0001_short.MP4

STREAM: Description: File
STREAM: Author: Albeu
LAVF_check: QuickTime/MPEG-4/Motion JPEG 2000 format
libavformat file format detected.
==> Found video stream: 0
[lavf] Video stream found, -vid 0
======= VIDEO Format ======
 biSize 103
 biWidth 1280
 biHeight 720
 biPlanes 0
 biBitCount 24
 biCompression 828601953='avc1'
 biSizeImage 2764800
Unknown extra header dump: [1] [4d] [0] [28] [ff] [e1] [0] [30] [27] [4d] [0] [28] [9a] [62] [80] [a0] [b] [76] [2] [20] [0] [0
] [20] [0] [1d] [4c] [1d] [c] [0] [3d] [a] [0] [1] [12] [a9] [5d] [e5] [c6] [86] [0] [1e] [85] [0] [0] [89] [54] [ae] [f2] [e1]
 [88] [45] [1e] [0] [0] [1] [0] [4] [28] [ee] [3c] [80]
(...)
VIDEO:  [avc1]  1920x1080  24bpp  29.970 fps    0.0 kbps ( 0.0 kbyte/s)
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)


This is the file that I recreated by copying the blocks from the sd card:
ftp://marc.merlins.org/sd.mov
It's 600MB but you can get the shorter version if you just want to see
the headers:
ftp://marc.merlins.org/sd_short.mov
mplayer can see the h264 header and the 1920x1080 size, but that's about it:

STREAM: [file] sd.mov
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
LAVF_check: QuickTime/MPEG-4/Motion JPEG 2000 format
libavformat file format detected.
stream_seek: WARNING! Can't seek to 0x25800000 !
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8fc69d0]Could not find codec parameters (Video: h264, 1920x1080)
LAVF_header: av_find_stream_info() failed
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for REAL
Checking for SMJPEG
Checking for Nullsoft Streaming Video
Checking for MOV
ISO: Unknown File Type Major Brand: avc1
ISO: File Type Minor Version: 0
ISO: File Type Compatible Brand #0: avc1
ISO: File Type Compatible Brand #1: isom
ISO: File Type Compatible Brand #2:
ISO: File Type Compatible Brand #3:
MOV: Movie header found!
MOV: unknown chunk: p 930516780
stream_seek: WARNING! Can't seek to 0x377B8F2C !
MOV: missing data (mdat) chunk! Maybe broken file...
Checking for VIVO
header block 1 size: 0
AVS: avs_check_file - attempting to open file sd.mov
AVS: File is too big, aborting...
Checking for PVA
Checking for MPEG-TS...
TRIED UP TO POSITION 66160, FOUND 47, packet_size= 0, SEEMS A TS? 0
Checking for LMLM4 Stream Format
Invalid packet in LMLM4 stream: ch=0 size=1718909288
LMLM4 Stream Format not found
sync_mpeg_ps: seems to be ES/PES stream...
MPEG Stream reached EOF
ds_fill_buffer: EOF reached (stream: video)
MPEG packet stats: p100: 3965  p101: 1 p1B6: 0 p12x: 0 sli: 1 a: 0 b: 0 c: 0 id
: 0 sps: 0 pps: 0 PES: 51  MP3: 11688, synced: 0
sync_mpeg_ps: seems to be ES/PES stream...
MPEG Stream reached EOF
ds_fill_buffer: EOF reached (stream: video)
MPEG packet stats: p100: 3964  p101: 1 p1B6: 0 p12x: 0 sli: 1 a: 0 b: 0 c: 0 id
: 0 sps: 0 pps: 0 PES: 51  MP3: 11688, synced: 0
==> Found video stream: 0
ds_fill_buffer: EOF reached (stream: video)
LAVF_check: QuickTime/MPEG-4/Motion JPEG 2000 format
libavformat file format detected.
stream_seek: WARNING! Can't seek to 0x25800000 !
LAVF_header: av_find_stream_info() failed
demux_aac_probe, failed to detect an AAC stream

Thanks for any help you could provide,
Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/


More information about the MEncoder-users mailing list