back

update shockwave flash (swf), flash video (flv) panorama
with no source files, to circular panorama for html5

Here's how to extract images from flash panoramas:
download:
https://cultivateunderstanding.com/Digital_Media/mae_hong_son/media/vess_alley_2_rev_1_out.swf
Thank you Dr. Alan Potkin for allowing me to use this file as an example.

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 [b/w preview files + color files]
	SAR 96:96 DAR 49:60, 60 fps, 60 tbr, 60 tbn
This is not very deep info. But ffmpeg was not made for swf.

ffmpeg -i vess_alley_2_rev_1_out.swf dir/%02d.jpg
gives me 12 images, 6 b/w, 6 color, and as the b/w images are preview images we remove them with bash / zsh.
cd dir
rm {01..06}.jpg

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

You can also do that in Terminal with bash / zsh, the original files will be deleted, so test on copies, first make a new directory:
mkdir chq
mv 07.jpg chq/03.jpg
mv 08.jpg chq/04.jpg
mv 09.jpg chq/02.jpg
mv 10.jpg chq/05.jpg
mv 11.jpg chq/01.jpg
mv 12.jpg chq/06.jpg

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

Or if not renamed (it's the input order that decides here, not the name of the file).
ffmpeg -i 11.jpg -i 09.jpg -i 07.jpg -i 08.jpg -i 10.jpg -i 12.jpg -filter_complex 'hstack=inputs=6' vess2.jpg

I found that some swfs needs this tiling order instead:
ffmpeg -i 07.jpg -i 09.jpg -i 11.jpg -i 12.jpg -i 10.jpg -i 08.jpg -filter_complex 'hstack=inputs=6' out.jpg



vess2.jpg

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