How to Convert Adobe Flash SWF Flash file to Video/Movie/MP4/MKV file
For Windows, the easiest way to convert SWF to video is Swivel by Newgrounds
To use, just follow the instructions on the website.
Can also convert SWF that is tricky/interactive/complex on Manual Mode.
Using the dump-gnash of the GNU Gnash. My recommended option.
Can be used in Linux and Windows (on Windows Subsystem for Linux)
Converting SWF animations to videos is easy if your SWF files are not tricky, not interactive, that plays when opened automatically. If your SWF file is tricky, there is multiple ways to deal with it.
Install GNU Gnash
sudo apt install gnash
dump-gnash -1 -r 1 -j 1920 -k 1080 -D out.raw input.swfWhere: -j width | -k height This will output a raw bgra32 video file at 1080p (1920x1080)
You can use other resolutions, SWF is vector and it will scale. Tried it already at 8k (7680x4320) resolution.
For audio, it is better to extract the audio using SWF Decompiler, or if you have a copy of the audio and mux it in FFmpeg later. If you really need the audio during extraction, use -A switch. Example:
dump-gnash -1 -r 1 -j 1920 -k 1080 -D out.raw -A out.wav input.swf
This will output a WAV audio file.
Convert the raw video file to mp4 or mkv and mux the audio file to the video file. I use FFmpeg, you can use any converter and/or muxer you like.
ffmpeg -hide_banner -r 24 -f rawvideo -pixel_format rgb32 -video_size 1920x1080 -i out.raw -i out.wav $YOUR_ENCODING_COMMANDSWhere: -r framerate of the video
Dealing with complex SWF file
If your SWF file is tricky, there is multiple ways to deal with it.
By recording it while using it. flaz14 documented it how to do it.
By removing the interactive elements using a SWF decompiler. My recommented SWF decompiler is JPEXS Free Flash Decompiler that can remove the interactive parts.