## Fix corrupt video from Sharpcap Captures?

localhost
Posts: 8
Joined: Sat Feb 17, 2018 5:09 am

### Fix corrupt video from Sharpcap Captures?

I was curious if their is anyway to fix the video captures made by Sharpcap if the computer shut down in the middle of the captures.
Sadly during the 2017 solar eclipse my laptop crashed at least 6 times in the middle of video captures and now unable to view them in Windows Media Player of in VLC Media Player.

I figure I'll hang on to the video files maybe one day their might be a way to fix them and have them view able.

But I figured I'd ask if their is a way to fix them.

They do have file sizes they don't show 0 data on them.

Was using a ZWO ASI120MC for camera and Sharpcap for video capture.

Posts: 3162
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

### Re: Fix corrupt video from Sharpcap Captures?

Interesting question - the video data is almost certainly there, but the file is probably missing some sort of index information at the end or other 'write complete' flags set in it. SharpCap doesn't use compression when saving to AVI, so the actual frames are probably fairly easy to spot in the internals of the file.

Would you be able to share one of the files (maybe a smaller one) on dropbox or similar - I can think of a couple of things to try that might just fail like VLC etc, but you never know.

thanks,

Robin

turfpit
Posts: 869
Joined: Mon Feb 13, 2017 8:13 pm
Location: UK
Contact:

### Re: Fix corrupt video from Sharpcap Captures?

Robin

I wonder if trying to load into PIPP and write out the file might reclaim something? There is an option to split out individual frames.

Dave

localhost
Posts: 8
Joined: Sat Feb 17, 2018 5:09 am

### Re: Fix corrupt video from Sharpcap Captures?

Uploaded it to Dropbox be warned it's 1GB in size was the smallest one I had.
https://www.dropbox.com/s/vjo89qci0fzz2 ... 4.mp4?dl=0

Posts: 3162
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

### Re: Fix corrupt video from Sharpcap Captures?

The header data (first 64kb) is all zeros in that file, but beyond that there is image data. It's an AVI file not an MP4 by the way.

I wrote a little program to transfer the data to a fixed AVI file - very easy because I could re-use the code that SharpCap already has to write to AVI.

* run a command prompt and goto the folder you unzipped AviRescue to
* at the command prompt run

Code: Select all

AviRescue.exe <full path to broken AVI file>

Give it a minute or two to process and you should have a file with the same name but '.fixed.avi' on the end which should play - repeat for other files (hopefully will work for others!)

Note this will only work correctly for AVIs that are of the same resolution (1280x960) and are MONO8 or RAW8 format.

cheers,

Robin
Attachments
AviRescue.zip

localhost
Posts: 8
Joined: Sat Feb 17, 2018 5:09 am

### Re: Fix corrupt video from Sharpcap Captures?

Awesome! Robin I was able to recover all of my captures I did on the solar eclipse in 2017.

Maybe a feature like that could be added into Sharpcap Pro?

Just a food for thought.

Many thanks, Robin I was really planning to just delete the captures but I'm glad I decided to hang on to them, and glad I decided to ask on the forum.
A purchase of Sharpcap Pro on the 21st I hope will be a good way to pay you back, I know it's possibly not needed but I would be honored to not that I wouldn't have before.

But I feel that will be a good way to give my thanks.

And why not try the Pro version out at the same time Looking forward to Mars hopefully in June.

Posts: 3162
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

### Re: Fix corrupt video from Sharpcap Captures?

Hi,

I'd consider making a more flexible tool to do this if there is demand, but I'd need to see some more broken files from other users to check that the same fix would apply.

For now I've made some changes to the code to make sure that if there is a software error causing SharpCap to close then any capture in progress should be stopped gracefully if possible. Obviously this won't help for hardware errors like the PC shutting down, but it should help.

cheers,

Robin

localhost
Posts: 8
Joined: Sat Feb 17, 2018 5:09 am

### Re: Fix corrupt video from Sharpcap Captures?

As a man of my word I went ahead purchased Sharpcap Pro.

Thank you, for helping me recover these videos.

Posts: 3162
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Thanks

Robin

### Who is online

Users browsing this forum: Google [Bot] and 2 guests