AVI Repair :(


Recommended Posts

I've made a recording with BB Flashback express. Due to issues in the past with large files the software is configured to split it into 1GB files during the recording process. I use the batch export tool to convert the files to avi format using xvid. The intention is to then append and crop with virtualdub.

The problem is that occasionally one or two of the avi files after exporting seem to have broken headers and I'm trying to figure out how to fix them. (Re-exporting makes no difference). They won't play in VLC, yet play perfectly in MPC. Opening these broken files in virtualdub results in an error "Invalid AVI file: The main 'movi' block is missing".

I tried:

  • Replacing the headers manually from one of the other avi files with HxD and used the "Re-derive keyframe flags" extended option to hopefully rebuild it correctly, but it didn't work, the resulting video consisted of solid green frames. I could easily have done this wrong though, since I have extremely little knowledge of the format...
  • Installing 'super' to do a conversion to see if that'd fix it, but I can't get it to install, I get an error when the installer it tries to download something :angry:
  • Using AVIFix or whatever it was called, but that just gave an error about not finding the movi block.
  • Using AVIRepair, which apparently replaced the header with one from a known good file, but I get the same 'movi' error opening it in virtualdub afterwards.

The video and audio data is clearly there and intact since it plays perfectly in MPC, I just don't know how to repair the headers so it'll open in virtualdub...

Can anyone please help me? (The one thing I can't do is send you the file, sorry, it's personal!)

Link to comment
https://www.neowin.net/forum/topic/1148214-avi-repair/
Share on other sites

UPDATE:

I first tried to solve this a few days ago and failed, now with some further analysis using virtualdub's hex editor's "RIFF chunk tree" viewer I've managed to somewhat better understand the container formatting and I've solved it!

With all of the "good" files there's a JUNK block between the header and movi blocks, which consists of four bytes representing the characters JUNK followed by four bytes describing length followed by the junk content. With the broken files there's simply two bytes representing the letters JU and nothing more, it immediately starts the movi list block after this, i.e. it's screwed up. I fixed this by copying the rest of the junk block from a good file, and adjusting the bytes near the beginning representing file size. I'm now allowing virtualdub to repair the index.

I'm very happy now :)

Link to comment
https://www.neowin.net/forum/topic/1148214-avi-repair/#findComment-595650314
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Did you go into settings > engines and switch some more stuff on. The more you enable the slower it will get but the better the results will be
    • SpaceX took its largest step yet toward becoming a retail wireless carrier on Friday when President and COO Gwynne Shotwell told investors at the company's IPO roadshow that SpaceX is considering launching a Starlink-branded mobile phone service for US consumers.............. https://www.techtimes.com/articles/319177/20260627/starlink-mobile-coming-t-verizon-spacex-has-spectrum-still-needs-towers.htm  
    • Stop asking people that. It's a "No True Scotsman" argument in that you are attempting to discredit the opinions of a person by Attacking the Messenger. The reason that these are logical fallacies is the TRUTH is based on facts as supported by evidence. Nothing else. So, always debate the facts with evidence to reach the truth. Once you learn to do this, you'll be able to recognize when people are fearmongering and lying to you for their own selfish ends.
    • It doesn't matter if you didn't directly hear it from person X or Y. Every one of your statements comes straight from the racist, skinhead, anti-immigrant, be afraid of everything, "they are all taking our jobs", etc. etc. mouthpieces. That's where Farag and Putin heard it from too...and used it against the UK. So, while you keep disavowing the people who publicly peddled that position, you keep proving over and over again that those lies influenced you into being tricked when the Brexit vote came around too. In fact, your final sentence makes it crystal clear that it was the racist/anti-immigrant lies you fell and voted for, since you stated that you didn't have an issue with the economic trade issues with the EU. Ahem. To be clear, all of these LIES are EONS old, mate. They are the same fearmongering lies peddled to the same ignorant, gullible cowards by the same charlatans, snake-oil salesmen, and would be demagogues who've been doing this since caveman Ugh lied about his slightly different neighbor in order to steal his land. And, finally, you answered your own previous question. The reason that the EU isn't clamoring to bring the UK back is that they have had enough of people who would rather shoot themselves in the foot than get over their "insecurity issues". It's the same reason the entire world is moving away from the USA as fast as it can...
  • Recent Achievements

    • Week One Done
      flexorcist earned a badge
      Week One Done
    • One Month Later
      Woland13 earned a badge
      One Month Later
    • Week One Done
      Woland13 earned a badge
      Week One Done
    • One Year In
      bernmeister earned a badge
      One Year In
    • Week One Done
      Scoobystu earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      498
    2. 2
      +Edouard
      222
    3. 3
      PsYcHoKiLLa
      148
    4. 4
      Steven P.
      74
    5. 5
      FloatingFatMan
      69
  • Tell a friend

    Love Neowin? Tell a friend!