Closed maxbiostat closed 5 years ago
I have this issue as well. According to ffmpeg it is an H264 - MPEG 4 - AVC avc1 part 10) recorded with 2,7k and 50 fps from a GoPro 6. Can I provide you with a small chunk of this file (first 10MB)?
@skoopy-de sure (e.g. via email). As long as the healthy one has its moov atom at front, you can also chop up the healthy one. If that's not the case, you can use tools like these first
@skoopy-de sure (e.g. via email). As long as the healthy one has its moov atom at front, you can also chop up the healthy one. If that's not the case, you can use tools like these first
@anthwlock fyi, if I tried with just a chunk (no matter the size) and run untrunc -a on it I get Info: version '' using ffmpeg '4.1' Info: reading unknown_codec.mp4 Info: parsing healthy moov atom ... Missing movie header atom
Only with the whole file it can be read until "No codec found!" message. Info: version '' using ffmpeg '4.1' Info: reading unknown_codec.mp4 Info: parsing healthy moov atom ... Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'unknown_codec.mp4': Metadata: major_brand : mp41 minor_version : 538120216 compatible_brands: mp41 creation_time : 2019-06-24T11:07:15.000000Z firmware : HD6.01.02.01.00 Duration: 00:00:16.79, start: 0.000000, bitrate: 66501 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 2704x1520 [SAR 1:1 DAR 169:95], 66276 kb/s, 50 fps, 50 tbr, 90k tbn, 100 tbc (default) Metadata: creation_time : 2019-06-24T11:07:15.000000Z handler_name : GoPro AVC encoder : GoPro AVC encoder timecode : 11:07:15:07 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default) Metadata: creation_time : 2019-06-24T11:07:15.000000Z handler_name : GoPro AAC timecode : 11:07:15:07 Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default) Metadata: creation_time : 2019-06-24T11:07:15.000000Z handler_name : GoPro TCD timecode : 11:07:15:07 Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 35 kb/s (default) Metadata: creation_time : 2019-06-24T11:07:15.000000Z handler_name : GoPro MET Stream #0:4(eng): Data: none (fdsc / 0x63736466), 12 kb/s (default) Metadata: creation_time : 2019-06-24T11:07:15.000000Z handler_name : GoPro SOS found avcC after: 121 remaining len:74 parsing avcC ... len_sps: 51 decoding SPS ... log2_max_frame_num: 6 Info: avcC got decoded No codec found!
@ollypsilon You can use for example qt-faststart <original.mp4> <original_out.mp4>
.
qt-faststart
ships with FFmpeg ships. There are also other tools which do the same.
After this you should be able to chop it up.
@anthwlock unfortunately result is the same, tried that already. Next I tried to just extract the video/audio part:
ffmpeg -y -i GH015334.MP4 -codec copy extract.mp4
Output #0, mp4, to 'extract.mp4':
Metadata:
major_brand : mp41
minor_version : 538120216
compatible_brands: mp41
firmware : HD6.01.02.01.00
encoder : Lavf58.20.100
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 2704x1520 [SAR 1:1 DAR 169:95], q=2-31, 66276 kb/s, 0.02 fps, 50 tbr, 90k tbn, 90k tbc (default)
Metadata:
creation_time : 2019-06-24T11:07:15.000000Z
handler_name : GoPro AVC
encoder : GoPro AVC encoder
timecode : 11:07:15:07
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
Metadata:
creation_time : 2019-06-24T11:07:15.000000Z
handler_name : GoPro AAC
timecode : 11:07:15:07
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 839 fps=0.0 q=-1.0 Lsize= 136160kB time=00:00:16.76 bitrate=66520.7kbits/s speed= 76x
video:135756kB audio:388kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.011446%
Then I ran untrunc with the new file:
Info: version '' using ffmpeg '4.1'
Info: reading extract.mp4
Info: parsing healthy moov atom ...
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'extract.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Duration: 00:00:16.79, start: 0.000000, bitrate: 66433 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 2704x1520 [SAR 1:1 DAR 169:95], 66276 kb/s, 50 fps, 50 tbr, 90k tbn, 100 tbc (default)
Metadata:
handler_name : GoPro AVC
timecode : 11:07:15:07
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
Metadata:
handler_name : GoPro AAC
Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s
Metadata:
handler_name : GoPro AVC
timecode : 11:07:15:07
found avcC after: 102
remaining len:90
parsing avcC ...
len_sps: 51
decoding SPS ...
log2_max_frame_num: 6
Info: avcC got decoded
No codec found!
@ollypsilon @skoopy-de So what's up with the samples? Will you send some or not? I currently only have 1 working GoPro Video, the more the better.
@anthwlock I'll send you some links to download files, way too big for email. The link will also contain the files from @skoopy-de . If you need more samples or specific files (resolution, frame rate etc.) let me know.
As the error is raised by ffmpeg module is it simply that ffmpeg is by default missing x264 support and I should compile my own version?
Ok, doesn't matter if it is ffmpeg with x264 or not. I'm quite sure error is raised because of GoPro specific streams in file as ffprobe also returns warnings for these streams: Unsupported codec with id 0 for input stream 2 Unsupported codec with id 100359 for input stream 3 Unsupported codec with id 0 for input stream 4
With this command you can extract just the video and audio portion:
ffmpeg -y -i
Seems to work now, though not perfectly..
You may want to try different step_size
values when using -s
.
For example: untrunc -st 4 -s ok.mp4 bad.mp4
I'm still getting the same error. Can you offer some guidance?
@maxbiostat After you have updated your untrunc compilation, it should be as easy as untrunc -s ok.mp4 bad.mp4
. As I said, you may want to try different -st
values..
The error No codec found!
was removed, so it is impossible that you still got that error..
@anthwlock , you are, of course, absolutely correct. Thanks a lot for all the effort. Will consider making a donation.
thanks, greatly appreciated!
I'm getting the following message, which I assume is an error.
bad-fixed.mp4
is never created.I can email the relevant files.