Fix corrupt video from Sharpcap Captures?

Somewhere to ask questions about the best way to use SharpCap
Post Reply
localhost
Posts: 8
Joined: Sat Feb 17, 2018 5:09 am

Fix corrupt video from Sharpcap Captures?

Post by localhost » Sat Feb 17, 2018 5:15 am

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.

User avatar
admin
Site Admin
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?

Post by admin » Sat Feb 17, 2018 8:24 am

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

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

Re: Fix corrupt video from Sharpcap Captures?

Post by turfpit » Sat Feb 17, 2018 8:59 am

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?

Post by localhost » Sat Feb 17, 2018 12:48 pm

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

User avatar
admin
Site Admin
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?

Post by admin » Sat Feb 17, 2018 2:39 pm

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.

* Download the attached zip, unzip the contents
* 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>
(For me, the full path was in downloads, so my command was AviRescue.exe C:\Users\robin\Downloads\14_22_34.avi)

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
(934.08 KiB) Downloaded 33 times

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

Re: Fix corrupt video from Sharpcap Captures?

Post by localhost » Sat Feb 17, 2018 10:44 pm

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.

User avatar
admin
Site Admin
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?

Post by admin » Sat Feb 17, 2018 11:23 pm

Hi,

glad it worked :D

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?

Post by localhost » Thu Feb 22, 2018 12:54 am

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

Thank you, for helping me recover these videos.

User avatar
admin
Site Admin
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?

Post by admin » Thu Feb 22, 2018 5:33 pm

Thanks :)

Robin

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests