0

My SanDisk micro SD card with some GoPro Hero 8 HEVC footage had to be formatted, but the video files (MP4) were recovered using a tool called RescuePro Deluxe. But these recovered files couldn't be played in any player.

When I use the ffplay command to play them (for example, a file named bad.mp4), I'm getting the following error:

[mov,mp4,m4a,3gp,3g2,mj2 @ 0672e5a0] moov atom not found 0B f=0/0
bad.mp4: Invalid data found when processing input

I have also tried to use the recovery_MP4.exe command line tool, provided in the restore.media web site.

Following their guidelines, I have executed the below:

# good.mp4 is a sample file shot with the same camera/settings
recover_mp4.exe good.mp4 --analyze

Which was instructing me to use the two commands below:

# Now run the following command to start recovering:
recover_mp4.exe bad.mp4 result.hevc result.aac --hevc

# Then use ffmpeg to mux the final file:
ffmpeg.exe -r 24000/1001 -i result.hevc -i result.aac -bsf:a aac_adtstoasc -c:v copy -c:a copy result.mp4

The first command runs with the following output:

> recover_mp4.exe bad.mp4 result.hevc result.aac --hevc

recover_mp4 v1.92 (C) 2011-2017 Dmitry Vasilyev <slydiman@mail.ru>
http://slydiman.me

Writing HEVC video file 'result.hevc'...
Video format: HEVC
Unexpected HEVC Configuration ID 0xa0
Unexpected HEVC Configuration ID 0xa1
Unexpected HEVC Configuration ID 0xa2
Assuming max AVC/HEVC NAL unit size (IDR) 0x7FFFFF, (non IDR) 0x1FFFFF
Used HEVC templates: Generic HEVC
Writing audio file 'result.aac'...
Audio format: Assuming audio stream is AAC, 48000Hz, 2ch, profile 2
Assuming min AAC chunk size 0x9E
Searching 'mdat' atom in 'bad.mp4'...
mdat (32-bit) payload from 0x1C to 0xEF15004F
%0.000
?big: 0x0000001C [0xEF150033] ???           {47 50 52 4F 6C 02}
%100.000
%100.000
Complete!
Video=0.000
'result.hevc' created, size 93 (0.000%)
Audio=0.000
'result.aac' created, size 0 (0.000%)

The second command runs with the following output:

> ffmpeg.exe -r 24000/1001 -i result.hevc -i result.aac -bsf:a aac_adtstoasc -c:v copy -c:a copy result.mp4   

ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
[hevc @ 03b1a3c0] Format hevc detected only with low score of 1, misdetection possible!
[hevc @ 05141100] missing picture in access unit
    Last message repeated 1 times
[hevc @ 03b1a3c0] decoding for stream 0 failed
[hevc @ 03b1a3c0] Could not find codec parameters for stream 0 (Video: hevc, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, hevc, from 'result.hevc':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: hevc, none, 25 tbr, 1200k tbn, 25 tbc
[aac @ 03b1dce0] Format aac detected only with low score of 1, misdetection possible!
result.aac: Invalid data found when processing input

At this point, I only want to recover the video. Looking at the errors, I guess the result.aac: Invalid data found when processing input error message corresponds to the audio.

Is there a way that I can modify the above ffmpeg command to obtain a .MP4 file from the result.hevc file, that only contains video?

1
  • I don't have a 'corrupted' file to test with, but -err_detect ignore should ignore the corrupted stream. Oct 13 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.