maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   Recover corrupted video after phone reboot during recording (https://talk.maemo.org/showthread.php?t=84800)

denisx 2012-06-10 11:03

Recover corrupted video after phone reboot during recording
 
Hello,
was wondering if someone could help in recovering a corrupted video recorded on my Nokia n900. The phone did a random reboot during recording and now I'm stuck with a video file that is not playable(tried mpc, vlc ...).

I tried recovering using some tools i found on the internet but none of them worked.

From what I could gather, the video is lacking the moov segment at the end of the file, but I have no idea how to restore it or if it is even possible.

The file is a mp4 video with the following header information:
ftyp: mp42
isom:3gp6

I'd be grateful for any help (links to relevant info? maybe someone had to do this in the past?).

Thanks.

zimon 2012-06-10 11:27

Re: Recover corrupted video after phone reboot during recording
 
Have you tried to play with mplayer?

You could try to fix with mencoder:
Code:

mencoder -forceidx -oac copy -ovc copy /tmp/src.mp4 -o /tmp/dst.avi

qwazix 2012-06-10 11:27

Re: Recover corrupted video after phone reboot during recording
 
maybe use a commandline video splitter that will split the file without needing to display it first. That way maybe you end up with a playable and a non playable part.

Estel 2012-06-10 11:29

Re: Recover corrupted video after phone reboot during recording
 
I had to do (almost) exactly same thing, some time ago. I was able to recover video, although, results were not very satisfying - audio/video sync was PITA to repair (more precisely, frames per second on video), and somehow, keyframes were messed up - i don't know how it's possible in already recorder stream, but it looked like all keyframes stacked up together, so, periodically, You've had perfect picture for a few seconds, going gradually worse and worse... to the point of awful quality, then, PONG! awesome quality again, going gradually worse and worse... Everything over the same period of time (7-8 seconds), rinse and repeat.

Finding a tool was also a PITA - to my knowledge, there is only one freeware tool capable of doing so, and, to make things worse, company producing it made it payware starting from some version number, and carefully deleted prior version from almost everywhere. Newer version doesn't have any better functionality, and it's perfectly legal to use older, freeware version, but - no idea how they achieved that - links for downloading it doesn't seem to exist *anywhere*.

fortunately, I was able to get in contact with someone who used it during times of freeware, and wrote on his blog about it - he still had program on his hard drive, and was kind enough to send it to me.
---

So, here You have it:
Videorepair 1.5

I don't remember usage instructions, but, it was quite straightforward. After all, you can always check their website - new payware version uses same procedure, IIRC.

/Estel

denisx 2012-06-10 11:36

Re: Recover corrupted video after phone reboot during recording
 
Quote:

Originally Posted by zimon (Post 1220124)
Have you tried to play with mplayer?

You could try to fix with mencoder:
Code:

mencoder -forceidx -oac copy -ovc copy /tmp/src.mp4 -o /tmp/dst.avi

Yes i did try playing it with both media player and media player classic.

This is the error message that I get:
Code:

Media Type 0:
--------------------------
Unknown

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Stream {E436EB83-524F-11CE-9F53-0020AF0BA770}
subtype: Unknown GUID Name {08E22ADA-B715-45ED-9D20-7B87750301D4}
formattype: TIME_FORMAT_NONE {00000000-0000-0000-0000-000000000000}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 0


Media Type 1:
--------------------------
Unknown

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Stream {E436EB83-524F-11CE-9F53-0020AF0BA770}
subtype: TIME_FORMAT_NONE {00000000-0000-0000-0000-000000000000}
formattype: TIME_FORMAT_NONE {00000000-0000-0000-0000-000000000000}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 0


denisx 2012-06-10 12:23

Re: Recover corrupted video after phone reboot during recording
 
Quote:

Originally Posted by Estel (Post 1220126)
I had to do (almost) exactly same thing, some time ago. I was able to recover video, although, results were not very satisfying - audio/video sync was PITA to repair (more precisely, frames per second on video), and somehow, keyframes were messed up - i don't know how it's possible in already recorder stream, but it looked like all keyframes stacked up together, so, periodically, You've had perfect picture for a few seconds, going gradually worse and worse... to the point of awful quality, then, PONG! awesome quality again, going gradually worse and worse... Everything over the same period of time (7-8 seconds), rinse and repeat.

Finding a tool was also a PITA - to my knowledge, there is only one freeware tool capable of doing so, and, to make things worse, company producing it made it payware starting from some version number, and carefully deleted prior version from almost everywhere. Newer version doesn't have any better functionality, and it's perfectly legal to use older, freeware version, but - no idea how they achieved that - links for downloading it doesn't seem to exist *anywhere*.

fortunately, I was able to get in contact with someone who used it during times of freeware, and wrote on his blog about it - he still had program on his hard drive, and was kind enough to send it to me.
---

So, here You have it:
Videorepair 1.5

I don't remember usage instructions, but, it was quite straightforward. After all, you can always check their website - new payware version uses same procedure, IIRC.

/Estel

The link you provided has a damaged archive. I'll try and find another copy on the net.

Thanks for the reply.

Estel 2012-06-10 12:34

Re: Recover corrupted video after phone reboot during recording
 
No, it doesn't (just downloaded it myself). try downloading it another time - I think you might have started downloading it, while I was still uploading (and as a result, got only part of file).

As for searching anywhere else, of course, You may, but I really doubt You'll be able to.

/Estel

denisx 2012-06-10 12:45

Re: Recover corrupted video after phone reboot during recording
 
Quote:

Originally Posted by zimon (Post 1220124)
Have you tried to play with mplayer?

You could try to fix with mencoder:
Code:

mencoder -forceidx -oac copy -ovc copy /tmp/src.mp4 -o /tmp/dst.avi

Hi zimon,
I tried what you have sugested and this is what I get.

Code:

enis@ubuntu:/media/Nokia N900/DCIM$ mencoder -forceidx -oac copy -ovc copy 20120606_045.mp4 -o copy.avi
MEncoder svn r34540 (Ubuntu), built with gcc-4.6 (C) 2000-2012 MPlayer Team
success: format: 0  data: 0x0 - 0x7300000
libavformat version 53.21.0 (external)
Mismatching header version 53.19.0
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f091eb4d940]moov atom not found
LAVF_header: av_open_input_stream() failed
ISO: File Type Major Brand: ISO/IEC 14496-1 (MPEG-4 system) v2
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f091eb4d940]moov atom not found
LAVF_header: av_open_input_stream() failed
============ Sorry, this file format is not recognized/supported =============
=== If this file is an AVI, ASF or MPEG stream, please contact the author! ===
Cannot open demuxer.

Exiting...

Any sugestions?

denisx 2012-06-10 12:47

Re: Recover corrupted video after phone reboot during recording
 
Quote:

Originally Posted by Estel (Post 1220146)
No, it doesn't (just downloaded it myself). try downloading it another time - I think you might have started downloading it, while I was still uploading (and as a result, got only part of file).

As for searching anywhere else, of course, You may, but I really doubt You'll be able to.

/Estel

Yep, tried again and it downloaded fine.
I'll give it a go.

mihneasim 2013-02-21 09:07

Re: Recover corrupted video after phone reboot during recording
 
Quote:

Originally Posted by Estel (Post 1220126)

So, here You have it:
Videorepair 1.5

/Estel

Just registered to .. Thank you a million, Estel!! It worked flawlessly!! The secret is to start is as Administrator (Windows 7) and choose a healthy file as a reference file, recorded with the same device.

My iPhone 4 shut off exactly when saving the movie after recording it - low battery and very cold outside. I tried many ways to recover it, none worked until I tried your suggestion! Great job sharing this!!


All times are GMT. The time now is 20:16.

vBulletin® Version 3.8.8