2

I have a .mkv file that got corrupted and I want to repair it or at least "remove" the parts that are damaged. It's a little over one hour long and stops playing at around 30 minutes. When I try to skip to, let's say, 45 minutes or one hour, it doesn't play.

I've tried to convert it to .mp4 with ffmpeg, but it tells me 0x00 at pos 24426601834 (0x5aff05d6a) invalid as first byte of an EBML number. When trying the same with Handbrake, I get the same message fives times with different positions.

Repareit Wondershare couldn't repair the file, as well as Meteorite.

What can I do to repair the file?

6
  • What does ffmepg say if you open it with -ss 2400 -i /path/to/file ? Jun 29, 2022 at 21:15
  • @EugenRieck again 0x00 at pos 52488940019 (0xc3895a9f3) invalid as first byte of an EBML number - this time it's a different pos
    – CodeF0x
    Jun 29, 2022 at 21:19
  • Try a few -ss [seconds] - starting from the PIT where the file stops. If there are too many blockers, the file might just be beyond repair Jun 30, 2022 at 8:27
  • @EugenRieck No matter what timestamp I try, it spits out the exact same message. I guess there's nothing I can do.
    – CodeF0x
    Jun 30, 2022 at 19:01
  • This points to part of the file missing - so all blocks are moved out of their expected places, which makes it quite hard to get anything out of it. Do you have some skill with schell scripts? If yes, you can try inserting bytes; first 1 byte at pos 24426601833 (error position -1), then 2 bytes at pos 24426601832 (error position -2) and see if ffmpeg is willing to read it as just a glitchy-streamed video, in the process recovering what comes after. Jul 4, 2022 at 15:28

1 Answer 1

2

The same error message on mkv file lead me here, following solution from this thread fix it for me:

https://video.stackexchange.com/questions/18220/fix-bad-files-and-streams-with-ffmpeg-so-vlc-and-other-players-would-not-crash

ffmpeg -err_detect ignore_err -i video.mkv -map 0 -c copy video_fixed.mkv

note: my file was playable and nothing actually show error unless i try some modifications on it using mkvtoolnix or ffmpeg

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .