https://github.com/weebdatahoarder/swf2ass-go
[Mirror] Collection of tools to convert vector SWF animations into ASS
https://github.com/weebdatahoarder/swf2ass-go
golang libass swf
Last synced: 10 months ago
JSON representation
[Mirror] Collection of tools to convert vector SWF animations into ASS
- Host: GitHub
- URL: https://github.com/weebdatahoarder/swf2ass-go
- Owner: WeebDataHoarder
- License: mit
- Created: 2023-12-04T06:15:22.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-08T17:54:00.000Z (over 2 years ago)
- Last Synced: 2025-01-11T03:48:55.618Z (over 1 year ago)
- Topics: golang, libass, swf
- Language: Go
- Homepage: https://git.gammaspectra.live/WeebDataHoarder/swf2ass-go
- Size: 266 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# swf2ass โกโก๏ธ๐
Converts Flash animations into ASS subtitles with vector drawings where possible. Work in progress, expect broken output.
## Usage
```bash
$ 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:
```bash
$ 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
```bash
zstd -19 -T24 file.ass -o file.ass.zst
```