edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB00c1b3fTahinli2 months ago1999 commits
| 1 | #!/usr/bin/env bash |
| 2 | # gen-subtitle-fixtures.sh — extract real subtitle streams out of the library. |
| 3 | # |
| 4 | # READ-ONLY on the library; writes only under fixtures/ (gitignored). Picks the |
| 5 | # first manifest file carrying each subtitle codec and copies that stream out |
| 6 | # without re-encoding, so what the tests parse is exactly the bytes a disc rip |
| 7 | # holds. The synthetic .srt/.vtt/.ass cases live inside the crates' own unit |
| 8 | # tests; what cannot be written by hand is a real PGS display set. |
| 9 | # |
| 10 | # Usage: scripts/gen-subtitle-fixtures.sh |
| 11 | # Env: EC_FIXTURES=<dir> (default <repo>/fixtures) |
| 12 | # EC_PGS_SECONDS=<n> (default 900 — a whole film's worth is 30 MB) |
| 13 | # In: fixtures/real-library-manifest.tsv (scripts/scan-real-library.sh) |
| 14 | # Out: fixtures/subs/{pgs-1080p.sup,real.ass,real.srt} |
| 15 | |
| 16 | |
| 17 | |
| 18 | ROOT= |
| 19 | FIXTURES= |
| 20 | MANIFEST=/real-library-manifest.tsv |
| 21 | OUT=/subs |
| 22 | SECONDS_LIMIT= |
| 23 | |
| 24 | || { ; ; } |
| 25 | [ || { ; ; } |
| 26 | |
| 27 | |
| 28 | |
| 29 | # first_with <codec_name> — path of the first manifest file holding such a |
| 30 | # subtitle stream, empty when the library has none. |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | # extract <codec_name> <output> [ffmpeg args...] |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 |