1

Background

I have recovered some large videos as explained here:

Many smaller images/videos are recovered from a formatted drive, except one specific big video larger than 2 or 3 GB

There are 3 videos of almost the same size with the same content, apparently:

> ls recoverit-Wondershare/ -lh
total 23G
-rw-r--r-- 1 m3 users 3.7G Nov 25 20:03 00000084.mp4
-rw-r--r-- 1 m3 users 3.3G Nov 25 18:10 39289942016.mp4
-rw-r--r-- 1 m3 users 3.3G Nov 25 20:30 5142605824.mp4

Problem

The problem is all of the 3 videos could only be played up to 27m. I'm playing by VLC media player. But the video duration according to reported duration by ffprobe is 1h27m:

> ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 -sexagesimal recoverit-Wondershare/00000084.mp4 
1:27:14.640000

Also, right-click details/properties menu shows that the 1h27m is the duration.

No fatal erros

I double-check video integrity by the method here:

https://superuser.com/a/100290/571029

By this command:

> ffmpeg -v fatal -i recoverit-Wondershare/00000084.mp4 -f null - 2>error-fatal.log

But there are no fatal error reported in error-fatal.log.

Question

What else can I do to fix/play the videos?

Update

Opening the video by Avidemux, frame analysis continues to around %32 and then suddenly jumps to finish. Indicating that something goes wrong at around %32 of video duration.

Avidemux: processing video frames

MPV log

Trying to play the video by MPV, the video plays fine, but if I jump to frames after 27m, this log is received:

> mpv recoverit-Wondershare/00000084.mp4 
 (+) Video --vid=1 (*) (h264 1920x1080 50.000fps)
 (+) Audio --aid=1 --alang=eng (*) (aac 2ch 48000Hz)
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 1920x1080 yuv420p
AV: 00:23:54 / 01:27:14 (27%) A-V:  0.000
[ffmpeg/video] h264: Found reference and non-reference fields in the same frame, which is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[ffmpeg/video] h264: If you want to help, upload a sample of this file to https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
[ffmpeg/video] h264: decode_slice_header error
AV: 00:23:54 / 01:27:14 (27%) A-V:  0.000
[ffmpeg/video] h264: mmco: unref short failure
AV: 00:23:56 / 01:27:14 (27%) A-V:  0.000


Exiting... (End of file)

MPV logs

Re-saving file with Avidemux

By Avidemux, I re-saved the video with MKV suffix. The saving goes to around 32% and then jumps to finish. The main point is that the re-saved file size is the same as the input file!

> ls -lh recoverit-Wondershare/
total 26G
-rw-r--r-- 1 m3 users 3.7G Nov 26       00000084.mkv
-rw-r--r-- 1 m3 users 3.7G Nov 25       00000084.mp4

Analyzing with FFMPEG

I tried to analyze the video file by this command:

 > ffmpeg -i recoverit-Wondershare/00000084.mp4 -f null - 

The analysis is fine up to 27m time. Then these errors are thrown:

[aac @ 0x560ec12d36c0] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x560ec12d36c0] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x560ec12d36c0] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x560ec12d36c0] channel element 0.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x560ec12d6ac0] Invalid NAL unit size (0 > 124102).
[h264 @ 0x560ec12d6ac0] Error splitting the input into NAL units.
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x560ec19a5180] Invalid NAL unit size (-1676108775 > 73339).
[h264 @ 0x560ec19a5180] Error splitting the input into NAL units.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x560ec12a1cc0] Packet corrupt (stream = 0, dts = 84810).
recoverit-Wondershare/00000084.mp4: corrupt input packet in stream 0
Error while decoding stream #0:0: Invalid data found when processing input
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x560ec12a1cc0] stream 0, offset 0xe8d711da: partial file
recoverit-Wondershare/00000084.mp4: Invalid data found when processing input
[h264 @ 0x560ec12dd240] Invalid NAL unit size (2013396992 > 15690).
[h264 @ 0x560ec12dd240] Error splitting the input into NAL units.
Error while decoding stream #0:0: Invalid data found when processing input
    Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x560ec12a1cc0] stream 0, offset 0xe8d7ec2d: partial file
recoverit-Wondershare/00000084.mp4: Invalid data found when processing input
Error while decoding stream #0:0: Invalid data found when processing input
    Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x560ec12a1cc0] stream 0, offset 0xe8db8bd3: partial file
recoverit-Wondershare/00000084.mp4: Invalid data found when processing input
frame=40826 fps=129 q=-0.0 Lsize=N/A time=00:27:13.06 bitrate=N/A speed=5.16x    
video:21370kB audio:306204kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

FFMPEG Analysis log

FFMPEG copy

Running this command:

> ffmpeg -i 00000084.mp4 -c copy 00000084--copy-by-ffmpeg.mp4

Gives this output:

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x557f3798ecc0] Packet corrupt (stream = 0, dts = 84810).speed=20.5x    
00000084.mp4: corrupt input packet in stream 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x557f3798ecc0] stream 0, offset 0xe8d711da: partial file
00000084.mp4: Invalid data found when processing input
frame=84813 fps=1028 q=-1.0 Lsize= 3808738kB time=00:28:16.20 bitrate=18394.8kbits/s speed=20.6x    
video:3727528kB audio:79510kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.044648%

FFMPEG copy output

moov atom not found

In addition to 3 videos of around 3 GB recovered before:

Many smaller images/videos are recovered from a formatted drive, except one specific big video larger than 2 or 3 GB

One more video is recovered which is around 11 GB in size. It's not played whatsoever. When running this command on 11 GB vide:

> ffmpeg -i za.mp4 -c copy za--output.mp4

I receive this error:

moov atom not found

moov atom not found

My plan is to try to fix the moov atom not found error of 11 GB video. Let's forget about 3 GB videos.

Megidd
  • 261
  • 3
  • 15
  • 2
    It looks like the recovery software might have tried to work some magic and restore those files for you based on some advanced scan and merge method. Maybe the recovery process didnt go as well as hoped. Have you tried opening it in a video editor to take a closer look ? – Silbee Nov 26 '21 at 10:24
  • 1
    I wonder if ffmpeg checked the entire 1h27m, or also stopped after 27m. If the later, then the recovery wasn't really successful. – harrymc Nov 26 '21 at 10:33
  • 1
    I'm not entirely sure, but i think ffprobe just reads the container's header information. So an intact header will show 1h27 no matter how many frames are actually there to display. It might also be there's some lost information after the 27m mark which causes VLC to stop playing, but a video editor that actually scans the video stream looking for material even after (some) garbage information would be able to show and recover the remaining video. – Silbee Nov 26 '21 at 10:39
  • @Silbee Thanks :) I'm going to try a video editor. Do you have any in mind? Maybe one which works on Linux and is capable enough =) – Megidd Nov 26 '21 at 10:57
  • 1
    Avidemux is easy to use, free and opensource. So is Shotcut. Olive is slightly more difficult, and there's also the free version of Davinci Resolve... All of them should suffise to do the necessary thing, which is scan the actual video/audio stream to try and reconstruct as much video as possible. – Silbee Nov 26 '21 at 11:22
  • @Silbee Thanks, I'm going to try :) – Megidd Nov 26 '21 at 11:26
  • 1
    try `mpv` player and check what it outputs on the console – golimar Nov 26 '21 at 11:58
  • 1
    @user3405291 While there are other tools to try and recover MP4 containers (even VLC can try, quick google will show you how), there's a real possibility there's no other information in the file. You could try saving the file (without re-encoding !) with avidemux and check the size. If that too is 3.xGB, you can stop trying to recover more information this way, because there is none. If the file is (considerably) smaller, there might still be video frames left to recover, however it could also still be garbage data. – Silbee Nov 26 '21 at 12:04
  • @Silbee I updated the post with re-saving result. But I'm not quite sure what to do next :( – Megidd Nov 26 '21 at 12:26
  • 1
    Hey. I'm unfamiliar with that error, but it seems to indicate the metadata is incorrect. An online suggestion to fix it with ffmpeg was the following line "ffmpeg -i input_video_file.mp4 -vcodec copy -acodec copy -movflags faststart output_video_file.mp4". Another suggestion was this fork https://github.com/anthwlock/untrunc of untrunc. Also, try and open it with avidemux, it may try to rebuild the missing moov data. – Silbee Nov 26 '21 at 16:02
  • If your own answer links to an answer to another question then most likely the current question should be closed as duplicate. I'm voting to close as duplicate. If you disagree then please make your answer specific to the current question and not link-only. – Kamil Maciorowski Dec 03 '21 at 10:16
  • Does this answer your question? [Many smaller images/videos are recovered from a formatted drive, except one specific big video larger than 2 or 3 GB](https://superuser.com/questions/1686118/many-smaller-images-videos-are-recovered-from-a-formatted-drive-except-one-spec) – Kamil Maciorowski Dec 03 '21 at 10:16
  • @KamilMaciorowski The relationship between the posts is quite complex, *not* exactly duplicate! I'm not sure :) – Megidd Dec 03 '21 at 10:19
  • OK. I understand your point. If I could single-handedly close your question, I wouldn't. Fellow users will decide by reviewing my close vote. – Kamil Maciorowski Dec 03 '21 at 10:25

2 Answers2

0

I had already used Wondershare Recoverit to recover the lost videos. So, I tried Wondershare Repairit to repair the videos!

Wondershare Repairit processed the 3 GB videos. Its output preview is a 28min video. I can only preview it in low quality. To actually save it, I had to purchase the license.

Also, Wondershare Repairit processed the 11 GB video. Normal process was not enough. So, advanced process was done by providing a sample video. I used the 3 GB videos as sample video of 11 GB video! Well it worked. The process was complete and the output preview is a 43min video. Well, here is the disappointing thing: the 43min video is just a subset of 28min video which is repeated twice!

So, eventually, I have around 27 or 28 min of watchable video in my hands. I don't know what are my odds to go further. I'm going to checkout other approaches suggested by @Silbee .

Processing

Processing done

Megidd
  • 261
  • 3
  • 15
0

I was doing the recovering process in a wrong way. With a better way of recovering, now, 1h17m of the 1h27m video is recovered. Meaning only the last 10m is not recovered. The details are here:

https://superuser.com/a/1691027/571029

Megidd
  • 261
  • 3
  • 15