VideoHelp Forum




+ Reply to Thread
Results 1 to 7 of 7
  1. So I was recording some game footage using MSI Afterburner. I accidentally closed the game client before stopping the recording and apparently this corrupted the file.

    Under normal circumstances the file would come out as .AVI with JPEG and PCM. However, this corrupted file seems like it is missing all it's data, which I believe is written after the recording is stopped hence why it is missing. Due to the fact that I closed the game client first, the recorder did not properly write the metadata.

    Mediainfo only shows the following:

    Code:
    General
    Complete name                    : S:\game_2012_10_19_02_58_31_944.avi
    File size                        : 13.5 GiB
    Whereas complete videos are something like this:
    Code:
    eneral
    Complete name                    : S:\game_2012_10_18_21_19_05_727.avi
    Format                           : AVI
    Format/Info                      : Audio Video Interleave
    Format profile                   : OpenDML
    File size                        : 30.0 GiB
    Duration                         : 1h 9mn
    Overall bit rate                 : 62.0 Mbps
    
    Video
    ID                               : 0
    Format                           : JPEG
    Codec ID                         : MJPG
    Duration                         : 1h 9mn
    Bit rate                         : 76.3 Mbps
    Width                            : 1 280 pixels
    Height                           : 720 pixels
    Display aspect ratio             : 16:9
    Frame rate                       : 60.000 fps
    Color space                      : YUV
    Chroma subsampling               : 4:2:0
    Bit depth                        : 8 bits
    Compression mode                 : Lossy
    Bits/(Pixel*Frame)               : 1.380
    Stream size                      : 36.9 GiB
    
    Audio
    ID                               : 1
    Format                           : PCM
    Format settings, Endianness      : Little
    Format settings, Sign            : Signed
    Codec ID                         : 1
    Duration                         : 1h 9mn
    Bit rate mode                    : Constant
    Bit rate                         : 1 411.2 Kbps
    Channel(s)                       : 2 channels
    Sampling rate                    : 44.1 KHz
    Bit depth                        : 16 bits
    Stream size                      : 698 MiB (2%)
    Interleave, duration             : 17 ms (1.00 video frame)
    I can't play it in any player (VLC, WMP, etc.) or open it in VirtualDub. I'm pretty sure the data is there hence the filesize, but it seems like the computer doesn't know how to play/open the file because it's missing all the metadata.

    Is there a way to fix this? I tried some "AVI repair" tools but it gives me 'invalid file' and 'cannot open file' errors. I'm pretty stuck and I'm not sure what else I can try.
    Quote Quote  
  2. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    all the repair tools i know of are written for avc/h264/mp4/mov i can't recall coming across one for mjpeg. you could try the hex editor swap header trick. you'll have to look that one up and try it yourself, it's never worked for me.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  3. Originally Posted by aedipuss View Post
    all the repair tools i know of are written for avc/h264/mp4/mov i can't recall coming across one for mjpeg. you could try the hex editor swap header trick. you'll have to look that one up and try it yourself, it's never worked for me.
    Thanks, I'll give that a shot. So I'm guessing those missing data are called headers?

    Is there any way to manually add headers to the file?
    Quote Quote  
  4. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    header swapping takes the header portion of a good video and inserts it into the bad one with a hex-editor.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  5. Member
    Join Date
    Mar 2013
    Location
    United Kingdom
    Search PM
    hiya,

    I have the same problem, did you managed to recover your file?

    cheers,
    Jon
    Quote Quote  
  6. Originally Posted by jonw View Post
    hiya,

    I have the same problem, did you managed to recover your file?

    cheers,
    Jon
    Unfortunately not. Every instance of this problem has basically been unsolvable. The files cannot be repaired or viewed no matter what I tried.

    The only sure-fire way is: Don't close your game before you stop your recording. Make it a habit or you'll be bashing yourself in the head lol
    Quote Quote  
  7. Member
    Join Date
    Mar 2013
    Location
    United Kingdom
    Search PM
    So I spent some time today on this and eventually found a way to recover the AVI Basically the AVI file does not contain any of the headers needed and without even a basic header the file is not recognised as an AVI file at all. This means that most of the AVI tools are unable to do anything with it. In order to resolve this I needed to get at least a basic header into the file. This can be done by hand using a hex editor but a much easier way is to use 'AVIRepair'.

    I used the following thread info as a bases but my flow was:

    1) Use AVIRepair to add a basic header to the corrupt file. You need to have another working AVI as an example so it can get the FPS and res info.
    2) At this point VirtualDub and DivFix will complain about a missing movi section so this is a tricky bit. Open the good AVI in the VirtualDub Hex Editor and find the data line containing the 'movi' string. This can be done through the search or by looking at the RIFF table for the start of the AVI frame section, noting the address and using 'go to' to navigate to it. You now need to enter the same info in the corrupt AVI, open your hex editor of choice, navigate to the same address and manually add the movi strings.
    3) If you had viewed the RIFF table for the corrupted file before this edit then you would have noticed that it was missing all the video data. Now you should be able to see a lot more info indicating that the movi header is now being parsed.
    4) Unfortunately this is not the last edit. Check the very last line in the hex editor of the modified AVI. If it is not complete then delete it as it will crash many tools.
    5) Lastly we are missing the index file that allows the video to be seeked. If you need this then one way to fix this is to open the modified AVI in VirtualDub. Make sure the 'show extended options' box is ticked when opening the file and when the window appears select 'regenerate key frames'. This will take quite a while but once complete you should now have a completely fixed file.
    6) In VirtualDub I then selected 'Direct stream copy' from the File menu and saved the fixed file.

    Sorry I've written this a bit hastily but wanted to get it down before I forgot but I can add detail later if anyone needs it. I think I may look for a better capture tool now as I really don't want to keep having to do this

    cheers,
    Jon
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!