back

update shockwave/swf/flash/flw panorama with lost original files to circular panorama for html5

Download:
https://cultivateunderstanding.com/Digital_Media/mae_hong_son/media/vess_alley_2_rev_1_out.swf

Open the swf file in ffmpeg:
ffmpeg -i vess_alley_2_rev_1_out.swf
and get information on the file:

	Input #0, swf, from 'vess_alley_2_rev_1_out.swf':
	Duration: N/A, bitrate: N/A
	Stream #0:0: Video: rawvideo (ARGB / 0x42475241), argb, 160x96, 60 tbr, 60 tbn [navigation help, two small files]
	Stream #0:1: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 588x720 [color files + b/w preview files]
	SAR 96:96 DAR 49:60], 60 fps, 60 tbr, 60 tbn
		
This is not very deep info, duration is missing and more. But ffmpeg was not made for swf.

mjpeg2jpeg might be applicable here, the script without "-bsf:v mjpeg2jpeg", gives 96dpi images, with it they will be 72dpi, no other change that I can see. The individual frames can be extracted without loss.
ffmpeg -i vess_alley_2_rev_1_out.swf -c:v copy -bsf:v mjpeg2jpeg xzx/%02d.jpg
cases
gives me 12 images, 6 b/w, 6 color, as the b/w images are smaller preview images we disregard them.

xzx/1.jpg, 588x720      xzx/07.jpg, 2355x2880
xzx/2.jpg, 588x720      xzx/08.jpg, 2355x2880
 to                 to
xzx/6.jpg, 588x720      xzx/12.jpg, 2355x2880

The 6 color ones needed to be reordered.
rename
07 to 03
08 to 04
09 to 02
10 to 05
11 to 01
12 to 06

You can do that in Terminal with bash:
mkdir 1
mv 07.jpg 1/03.jpg
mv 08.jpg 1/04.jpg
mv 09.jpg 1/02.jpg
mv 10.jpg 1/05.jpg
mv 11.jpg 1/01.jpg
mv 12.jpg 1/06.jpg

ffmpeg -pattern_type glob -i "xzx/1/*.jpg" -vf "tile=6x1" xzx/vess2.jpg



And the color image, vess2.jpg, 14130x2880 (but here showing a smaller image).

If you need the panorama file to be in 2:1 ratio, pad the images, see: reassemble an old pano

And then to Pano2VR or similar for the html5 conversion.

back