ws-video2: docs/guide/video.md MPEG-2 section (tested snippet, tsBytes clip), formats table; docs/video.md layers
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
8216b80512
commit
f70fa346a2
3 files changed
+38
-8
No files matched your search
@@ -1,8 +1,8 @@
|
||||
# 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), 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), and SRT / WebVTT / ASS subtitles.
|
||||
# tests/gen/docs_av.luau { files = { [name] = bytes }, vars = { mp4Bytes = "clip.mp4", ... } }
|
||||
import importlib.util, os, struct, tempfile
|
||||
|
||||
@@ -91,6 +91,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])
|
||||
@@ -107,6 +110,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",
|
||||
|
||||
Reference in new issue
Block a user