back

update shockwave flash (swf), flash video (flv) panorama
with no original 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 xzx/%02d.jpg
gives me 12 images, 6 b/w, 6 color, and as the b/w images are preview images we remove them.

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 / zsh, the original files will be deleted, so test on copies, first make a new directory:
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

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

I found that some swfs needed this tiling order instead:
ffmpeg -i dir/07.jpg -i dir/09.jpg -i dir/11.jpg -i dir/12.jpg -i dir/10.jpg -i dir/08.jpg -filter_complex 'hstack=inputs=6' x.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