anthwlock / untrunc

Restore a truncated mp4/mov. Improved version of ponchio/untrunc
GNU General Public License v2.0
1.87k stars 182 forks source link

bad track: 'nail' #89

Open qizh opened 3 years ago

qizh commented 3 years ago
Info: version '' using ffmpeg '4.3.1'
Info: reading /.../good.MOV
Info: parsing healthy moov atom ... 
Info: special track found (v2nd, 'VideoHandler')
Info: special track found (nail, 'DJI nail')

Info: unknown track 'nail' found -> fallback to dynamic stats
Error: bad track: 'nail'

Good and bad files sent with WeTransfer

miquelferrarons commented 1 year ago

Any update about this? I'm getting the exact same error (on a truncated video from a DJI fpv).

Using untrunc: version 'v308-d72ec32' using ffmpeg '3.3.4'

ChuckJonas commented 1 year ago

Running into the same issue. Anyone resolve this?

hprobst commented 1 year ago

Same issue with DJI O3 AirUnit and a truncated MP4 file.

peterhanneman commented 10 months ago

Still having same issue all this time later also from a DJI O3 Air unit running latest v1.0.7 firmware.

docker run -v $(pwd):/vol -it untrunc /vol/DJI_0010.MP4 /vol/DJI_0011.MP4

Info: version 'v308-d72ec32-dirty' using ffmpeg 'd72ec32'
Info: reading /vol/DJI_0010.MP4
Info: parsing healthy moov atom ...
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xaaaaf9d83be0] stream 0, timescale not set
Info: special track found (meta, 'DJI meta')
Info: special track found (meta, 'DJI dbgi')
Info: special track found (nail, 'DJI nail')

Info: unknown track 'djmd' found -> fallback to dynamic stats
Error: bad track: 'nail'

Related ffmpeg error that's trying to be fixed using untrunc first:

ffmpeg -err_detect ignore_err -i DJI_0011.MP4 -c copy DJI_0011_Fixed.MP4

p4,m4a,3gp,3g2,mj2 @ 0x128f04080] moov atom not found
DJI_0011.MP4: Invalid data found when processing input

Interestingly placing corrupted files back onto an SD card and inserting into DJI O3 Air unit and powering it up and waiting a minute or so will fix corrupted files suffering from this issue.

MaEtUgR commented 4 months ago

Just in case someone does the same mistake as me: Tried to repair a DVR video from the DJI Goggles V2 paired to a Caddx Vista. The goggles were unpowered without stopping the recording which resulted in moov atom not found error on the MP4. As a reference file I used the last DVR recording on the goggle's SD card and got this exact bad track: 'nail' error. I realized only after a lot of back and forth that the previous file which I used as reference was a goggle DVR from an O3 air unit and hence had a different recording format. It was a MOV instead of MP4 even 🙈

Chosen the correct reference file this tool worked like a chram. Thank you so much! 🙏

anttiryt commented 3 weeks ago

I had this same error and some success.

My memory card failed with DJI FPV and I had to try recover some flight videos from an event.

the DJI FPV was set to record FHD/60, ffprobe displays end result having two streams, one for HEVC, one for x264. the HEVC is FHD/60 and x264 FHD/30.

untrunc fails with bad track: 'nail' with no help from any of the command line settings.

Both the videos, ok and broken, are supposed to have two streams. I made another ok-file with only the HEVC stream

Extract HEVC to ok2.mp4

ffmpeg -y -i ok.mp4 -map 0:0 -c copy ok2.mp4

Extract x264 to ok3.mp4

ffmpeg -y -i ok.mp4 -map 0:1 -c copy ok3.mp4

run untrunc with -s

untrunc-anthwlock -s ok2.mp4 f72073984.mp4 

Some videos worked better, almost full, some were fully broken. Also, I was unable to extract x264 video with similar parameters.