logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Eliot Hochberg  
#1 Posted : Wednesday, October 17, 2018 5:25:55 AM(UTC)
Eliot Hochberg

Rank: Advanced Member

Groups: Registered
Joined: 1/25/2017(UTC)
Posts: 39
Location: Los Angeles

Thanks: 9 times
Was thanked: 2 time(s) in 2 post(s)
Hi!

I was recording with vMix in AVI DV and the power went out! There is a file there, ffmeg ffprobe sees that there are video tags in there, and the file is over 4GB. But... nothing will open the file, not VLC, not FFMPEGX, not MPEG Streamclip, nor Quicktime.

Is there a way to fix this AVI file? When I compare the FFProbe info to a valid AVI file, there are only a few tags that are wrong.

Anyone know what to do?
IceStream  
#2 Posted : Wednesday, October 17, 2018 7:25:19 AM(UTC)
IceStream

Rank: Advanced Member

Groups: Registered
Joined: 3/7/2012(UTC)
Posts: 2,637
Man
Location: Canada

Thanks: 33 times
Was thanked: 506 time(s) in 475 post(s)
@ Eliot Hochberg

Is it a .avi file or .mkv file?
Unfortunately, .avi files are not fault tolerant and may not be recoverable.
https://www.vmix.com/hel...tTolerantRecordings.html


Ice
Eliot Hochberg  
#3 Posted : Wednesday, October 17, 2018 9:44:00 AM(UTC)
Eliot Hochberg

Rank: Advanced Member

Groups: Registered
Joined: 1/25/2017(UTC)
Posts: 39
Location: Los Angeles

Thanks: 9 times
Was thanked: 2 time(s) in 2 post(s)
Thanks for the reply!

It is an AVI with DV codec.

I know that it isn't "fault tolerant" because I can't view it!

However, I can see the header data. Which makes me think that it may be recoverable with some effort. I just need to know how to edit that header data!
Eliot Hochberg  
#4 Posted : Wednesday, October 17, 2018 1:35:17 PM(UTC)
Eliot Hochberg

Rank: Advanced Member

Groups: Registered
Joined: 1/25/2017(UTC)
Posts: 39
Location: Los Angeles

Thanks: 9 times
Was thanked: 2 time(s) in 2 post(s)
Ok, so I was able to reclaim some of the footage, and here's how I did it:

1) After rooting around the internet, I found out that I could edit the .AVI file with a hexidecimal editor. I chose Hex Fiend for Mac, I'm sure most any one would do.

2) On a thread dealing with a different but related issue, the author said he took another larger file of the same format, opened it into a hex editor, then opened the corrupted file, and finally copied data defining the larger file and pasted it into a copy of the corrupted file, overwriting data that wasn't helping that file.

The trick, it would seem, is figuring out how many lines of hex you need to copy. I don't think I have the correct answer, but I've gotten close enough that I think I can make things work.

I started at the top of the good file and when all the way until I found a bit that read "ˇˇˇˇˇˇˇˇü" (or FFFFFFFF FFFFFFFF 9F in hex). This seems to be where the meta data ends and the actual content begins.

Replacing this almost works; it gave me a chunk of synced video and audio. Problem was that I only recovered about 1/4 of the video.

Figuring that there must be some way to gather the rest, because the file size was correct for how much footage I expected, I then compared my altered file to the original through ffprobe. This led me to see that there were some parameters that had been changed from the original that shouldn't have been. From there, it was a bit of trial and error, but basically I copied the meta content that was in the correct place in the original, and put that in the copy in about the same place, as defined by character strings that seemed to be in the same place on perfectly fine videos.

I also ended up deleting a bunch of trailing zeroes from the file copy, which I think also may have helped.

Here's where I ended up:

Quicktime was able to convert the file, but only ended up with the audio. Which was helpful. I then tried the file in VLC, which actually worked, but the audio was out of sync. I moved over to MPEG Streamclip, and used that to convert the copied and altered file to a standalone DV file. I now have enough video that I can cobble together what I need, and I have enough footage from other sources to patch the minute or so that was lost.

All in all, I'm pleased I was able to do it. It didn't save me a huge amount of time, and I still have edits to do. But I was mostly able to recover the footage, and if it ever happens again, I'll know what to do.

I know, I know, I should use a different format, but this is the one that currently works best for my workflow overall.

EDIT- Turns out, the audio wasn't out of sync, per se. Instead, a chunk of video disappeared in the middle, strangely enough, about a minute's worth. I assume this had something to do with my hex surgery, if I had done it more accurate alteration, I'm betting that it wouldn't have happened.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.