Go Back to Main Page

How To: Un-Corrupt Swf Files

Version 1.3

Created 2-19-2007

Modified 3-19-2007

============================================================

You will need the program below before starting be sure this is installed.

I have only used this method to successfully un-corrupt swf files created by vnc2swf http://www.unixuser.org/~euske/vnc2swf/ although this method should work for any swf you might have to modify the math to accommodate a different frame rate.

Freeware Hex Editor
XVI32
Home:http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm
I have only tested this guide with XVI32 I'm sure other Hex editors would work just as well however I have not tried any others. If have a hex editor you can try using it however the results may be different than mine.

1. Install XVI32

2. Open your corrupted swf file in XVI32

3. Do the Math

So if the recording was 2min 27 seconds that equals 147 seconds

147x12 = 1764 this would be the value for fields 13 and 1e

The formula to convert the “Total Frames” to min is:
(“Total Frames” / “Frames per Second (12)” = seconds) (“Seconds” / “60” = min)

1764 / 12 = 147 seconds.

147 seconds / 60 = 2 min 27 seconds.

If you don’t know how long the capture was the below chart can help you find your target.
Total Frames Length
16000 22min 13sec
12000 16min 40sec
10000 13 min 53sec
8000 11min 6sec
6000 8min 20sec
4000 5min 33sec
2000 2min 46sec

When using the hex editor choose tools then encode number Be sure to select (word 2bytes) and (overwrite at current address)

Also note that the 16000 frames is the max allowable size for a swf file, although you can have a swf larger than this it may not play back correctly and is at greater risk of corruption.
For good information on the swf format see: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14437

If you need a swf to be larger than the 16000 frames I suggest recording several files 20min size and then converting those to another format like MPG or AVI and joining them with a video editor. There is free software called super http://www.erightsoft.com/SUPER.html that can convert swf to another format.

You might get some extra time out of the swf if you change the frame rate vnc2swf defaults at around 12 frames per sec if you lower this number the swf could be longer before it reaches the 160000 frame max but the quality will suffer.

Change log:

+++++++++++++++++++++++++++++++++

2-19-2007:

Created Document created on this date

3-19-2007:

Added Information about swf conversion