Live Stack AVI crash.. Can the AVI file be repaired?

Somewhere to ask questions about the best way to use SharpCap
Forum rules


If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs
Post Reply
bumperscoot
Posts: 5
Joined: Mon Apr 08, 2024 10:26 pm

Live Stack AVI crash.. Can the AVI file be repaired?

#1

Post by bumperscoot »

Hi there!

SharpCap crashed on me 1.3hrs into a Live Stack/Time lapse capture..
Unfortunately, the remaining 14.9Gb file is non-playable, and none of my conventional tools recognize the capture as an AVI to repair..

Has anyone successfully repaired a failed Time lapse AVI file?

Help!

Steve
User avatar
admin
Site Admin
Posts: 13370
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Live Stack AVI crash.. Can the AVI file be repaired?

#2

Post by admin »

Hi Steve,

unfortunately the 'index' data that lets an AVI file play is written when the file is closed, so when there is a crash the file ends up being unplayable. We've bumped into this issue from time to time before though, and I created a tool that should be able to fix the file for you. Please see this post :

viewtopic.php?p=26454#p26454

You need to give the tool the name of the file and also information about the resolution and number of colour channels that it was captured at, so for instance if it was 1280x960 resolution and captured in colour, it would be 1280x960x3; 640 by 480 mono would be 640x480x1

I would strongly suggest making a copy of the file first - the tool shouldn't change the original file (instead it makes a new copy that should be fixed), but better safe than sorry.

If that still doesn't work, please share the broken file with me (google drive, etc) and I will see if I can work out what is going on.

cheers,

Robin
bumperscoot
Posts: 5
Joined: Mon Apr 08, 2024 10:26 pm

Re: Live Stack AVI crash.. Can the AVI file be repaired?

#3

Post by bumperscoot »

Robin,

Oh my! SOO CLOSE!
I was able to run the tool on the broken AVI and it plays 1/2 of the way through without issue. It then looses "horizontal lock" and starts to scroll left to right for the remainder of the file.. Any ideas?

Thank you SOOOO Much for reaching out!


Steve
User avatar
admin
Site Admin
Posts: 13370
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Live Stack AVI crash.. Can the AVI file be repaired?

#4

Post by admin »

Hi Steve,

can you share the broken file with me please? I know that the code assumes that the frames are evenly spaced in the file, but maybe on very large AVI files that assumption breaks down? I would need to investigate to see if I can see what's going wrong and potentially find a way to fix it.

cheers,

Robin
bumperscoot
Posts: 5
Joined: Mon Apr 08, 2024 10:26 pm

Re: Live Stack AVI crash.. Can the AVI file be repaired?

#5

Post by bumperscoot »

Robin,

Thank you again for your time and effort, it is greatly appreciated!!

Here's a link:
https://drive.google.com/file/d/1Tz_1Ua ... sp=sharing

The camera was an Atik Infinity:
Sensor Type: CCD - Sony ICX825
Horizontal Resolution: 1392 pixels
Vertical Resolution: 1040 pixels
Pixel Size: 6.45 µm x 6.45 µm

Let me know what you find!

Steve
User avatar
admin
Site Admin
Posts: 13370
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Live Stack AVI crash.. Can the AVI file be repaired?

#6

Post by admin »

Hi Steve,

thanks - I am downloading now and will take a look later today to see if I can work out what is going on.

cheers,

Robin
bumperscoot
Posts: 5
Joined: Mon Apr 08, 2024 10:26 pm

Re: Live Stack AVI crash.. Can the AVI file be repaired?

#7

Post by bumperscoot »

Thank you SO much Robin!
User avatar
admin
Site Admin
Posts: 13370
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Live Stack AVI crash.. Can the AVI file be repaired?

#8

Post by admin »

Hi,

please try this new version :

https://downloads.sharpcap.co.uk/tools/ ... e2_x64.zip

(the download is much larger this time because of a change in the way I package SharpCap and related tools - on the plus side, it should be completely self-contained - unzip to a folder and run, no need to check for other runtimes or Microsoft components being installed).

I found that further into the file, the simple way that I was using to identify the beginning of each frame was breaking. Fortunately I was able to find a better way of working out where each frame starts in the file that seems to work pretty much throughout.

I have processed your file and it mostly seems OK with the new version - there look to be a handful of frames where the image jumps sideways about half its width, but those could be removed I think. There is also a fair bit of shaking in the second half of the video - not sure if this is a result of the repair process or was in the video due to wind effects moving the mount. I would hope that some sort of stabilization tool might be able to take care of the shaking now that the frames are pretty much back to normal.

cheers,

Robin
bumperscoot
Posts: 5
Joined: Mon Apr 08, 2024 10:26 pm

Re: Live Stack AVI crash.. Can the AVI file be repaired?

#9

Post by bumperscoot »

Robin,

Wow! Fantastic!!
I'll give that a try shortly..
You mentioned the image jumping.. I noticed that as well, I believe that may be an artifact from Live Stacking?
I did need to hand correct periodically (I was using a really slow rate) but it really freaked out the stacking.

I may extract the images and simply make a new time-lapse.

for the future, this would be a huge tool for Sharpcap!!

Steve
Post Reply