Collection of tools to convert vector SWF animations into ASS, rewrite of https://git.gammaspectra.live/WeebDataHoarder/swf2ass
 
 
Go to file
DataHoarder 9fd8438a4b
Force playback on swf2ass, fixed DefineFont tag
2023-12-03 04:57:13 +01:00
ass Drop ASS tags that don't ever have a visible color 2023-12-03 04:08:00 +01:00
settings New gradient global settings 2023-12-02 10:38:16 +01:00
types Force playback on swf2ass, fixed DefineFont tag 2023-12-03 04:57:13 +01:00
LICENSE Add LICENSE 2023-11-19 02:15:45 +01:00
README.md Drop ASS tags that don't ever have a visible color 2023-12-03 04:08:00 +01:00
go.mod Force playback on swf2ass, fixed DefineFont tag 2023-12-03 04:57:13 +01:00
go.sum Force playback on swf2ass, fixed DefineFont tag 2023-12-03 04:57:13 +01:00
parser_test.go allow re-entering sections in 2pass, set ass title, use layoutres x/y header tags 2023-12-02 10:15:10 +01:00
signatures.json More specific IJSW signature 2023-11-26 03:16:02 +01:00
swf2ass.go Force playback on swf2ass, fixed DefineFont tag 2023-12-03 04:57:13 +01:00
swf2ass.sh Add meta seek and cues in output mkv 2023-11-23 06:37:31 +01:00

README.md

swf2ass ➡️🍑

Converts Flash animations into ASS subtitles with vector drawings where possible. Work in progress, expect broken output.

Usage

$ go run git.gammaspectra.live/WeebDataHoarder/swf2ass-go -input [file.swf] -output [file.ass] -audio [file.mp3]

The -audio parameter is optional and will only be produced if the input file has streaming MP3 audio.

Create a bogus video track with the subtitles and audio embedded:

$ FILENAME=file
$ ffmpeg -y \
-f lavfi -i "color=size=$(grep PlayResX ${FILENAME}.ass | head -n 1 | awk '{ print $2 }')x$(grep PlayResY ${FILENAME}.ass | head -n 1 | awk '{ print $2 }'):rate=$(grep '?dummy' ${FILENAME}.ass | head -n 1 | awk -F: '{ print $3 }'):color=black" \
-i "${FILENAME}.mp3" \
-i "${FILENAME}.ass" \
-map 0:v -map 1:a -map 2:s \
-c:v libx264 -pix_fmt yuv420p -crf 1 -tune stillimage -preset placebo -x264-params keyint=240 \
-c:a copy \
-c:s copy -disposition:s:0 forced -metadata:s:s:0 language=und \
-shortest "${FILENAME}.mkv"

Compress subtitles

zstd -19 -T24 file.ass -o file.ass.zst