feat(arr): name subtitle codecs and dispositions
SubtitleTrack now carries the codec, split text formats from bitmap ones per DESIGN.md §15, plus the forced and SDH dispositions ffprobe reports. Without the forced flag a file carrying only a forced track read as satisfied for that language.
This commit is contained in:
@@ -19,19 +19,21 @@ trap 'rm -rf "$work"' EXIT
|
||||
|
||||
mkdir -p "$out"
|
||||
|
||||
# 1080p feature: three audio tracks covering all three §5.2 signals, plus two
|
||||
# subtitle tracks. Three seconds, so the runtime sanity check has something to
|
||||
# 1080p feature: three audio tracks covering all three §5.2 signals, plus
|
||||
# three subtitle tracks — two plain text, one carrying §15's forced
|
||||
# disposition. Three seconds, so the runtime sanity check has something to
|
||||
# compare against.
|
||||
printf '1\n00:00:00,000 --> 00:00:01,000\nhello\n\n' > "$work/en.srt"
|
||||
printf '1\n00:00:00,000 --> 00:00:01,000\nolá\n\n' > "$work/pt.srt"
|
||||
printf '1\n00:00:00,500 --> 00:00:01,500\nSIGN\n\n' > "$work/forced.srt"
|
||||
|
||||
ffmpeg -hide_banner -loglevel error -y \
|
||||
-f lavfi -i "color=c=black:s=1920x1080:r=24:d=3" \
|
||||
-f lavfi -i "sine=frequency=440:duration=3" \
|
||||
-f lavfi -i "sine=frequency=660:duration=3" \
|
||||
-f lavfi -i "sine=frequency=880:duration=3" \
|
||||
-i "$work/en.srt" -i "$work/pt.srt" \
|
||||
-map 0:v -map 1:a -map 2:a -map 3:a -map 4:s -map 5:s \
|
||||
-i "$work/en.srt" -i "$work/pt.srt" -i "$work/forced.srt" \
|
||||
-map 0:v -map 1:a -map 2:a -map 3:a -map 4:s -map 5:s -map 6:s \
|
||||
-c:v libx264 -preset ultrafast -crf 51 -pix_fmt yuv420p \
|
||||
-c:a aac -b:a 8k -c:s srt \
|
||||
-metadata:s:a:0 language=eng -metadata:s:a:0 title="English" \
|
||||
@@ -39,6 +41,7 @@ ffmpeg -hide_banner -loglevel error -y \
|
||||
-metadata:s:a:1 handler_name="Portuguese (Brazil)" \
|
||||
-metadata:s:a:2 language=pt-PT \
|
||||
-metadata:s:s:0 language=eng -metadata:s:s:1 language=por \
|
||||
-metadata:s:s:2 language=eng -disposition:s:2 forced \
|
||||
"$out/movie-1080p.mkv"
|
||||
|
||||
# The extras reel trap: larger on disk than the feature (noise compresses
|
||||
|
||||
Reference in New Issue
Block a user