ws-audio2: merge master (c5f2777)

This commit is contained in:
4DBug committed 2026-10-31 15:37:55 -05:00
commit d7697a8688
126 files changed
+25832 -1541

No files matched your search

+8 -3
View File
@@ -1,8 +1,9 @@
# Docs inputs for the audio / music / video / subtitle guide pages (tools/fixtures.py; tools/docs_check.py reads them):
# tiny ffmpeg test clips (testsrc 64x48, 10 frames at 10 fps, with a sine track): MP4 (H.264 + AAC), AVI (MJPEG +
# PCM), WebM (VP8 + Vorbis); a MIDI file written here (SMF 1: a tempo track and a melody), the SoundFont of
# tools/fixtures/sf2.py (build_sf2), a ProTracker module from tools/fixtures/mod.py (song_basic), MultiTracker / MED
# modules and an Unreal package (tools/fixtures/mtm.py, med.py, s3m.py), and SRT / WebVTT / ASS subtitles.
# PCM), WebM (VP8 + Vorbis), MPEG-TS (interlaced MPEG-2 + MP2); a MIDI file written here (SMF 1: a tempo track and a
# melody), the SoundFont of tools/fixtures/sf2.py (build_sf2), a ProTracker module from tools/fixtures/mod.py
# (song_basic), MultiTracker / MED modules and an Unreal package (tools/fixtures/mtm.py, med.py, s3m.py), and SRT /
# WebVTT / ASS subtitles.
# tests/gen/docs_av.luau { files = { [name] = bytes }, vars = { mp4Bytes = "clip.mp4", ... } }
import importlib.util, os, struct, tempfile
@@ -92,6 +93,9 @@ def generate(ctx):
"-c:a", "aac", "-b:a", "64k"]),
("clip.avi", ["-c:v", "mjpeg", "-q:v", "4", "-pix_fmt", "yuvj420p", "-c:a", "pcm_s16le"]),
("clip.webm", ["-c:v", "libvpx", "-b:v", "200k", "-g", "5", "-c:a", "libvorbis", "-q:a", "2"]),
("clip.ts", ["-c:v", "mpeg2video", "-b:v", "300k", "-g", "5", "-bf", "2", "-vf", "setfield=tff",
"-flags", "+ilme+ildct",
"-c:a", "mp2", "-b:a", "64k"]),
):
out = os.path.join(d, name)
ctx.nix("ffmpeg", ["ffmpeg", "-v", "error", "-y"] + src + codec + ["-shortest", out])
@@ -113,6 +117,7 @@ def generate(ctx):
"mp4Bytes": "clip.mp4",
"aviBytes": "clip.avi",
"webmBytes": "clip.webm",
"tsBytes": "clip.ts",
"midiBytes": "tune.mid",
"sf2Bytes": "bank.sf2",
"modBytes": "song.mod",