#!/bin/bash # Re-creates ext/, files written by real muxers and encoders from synthetic pictures and tones, and # prober.json, what an independent media prober reads of each. # # bash tools/make_external.sh (from wai/identify-conformance) # # Every input is a test pattern or a sine wave, so no captured content enters. The protected file # uses an all-zero test key and protects nothing of worth. Not run in CI, since it needs the tools; # its outputs are committed, and wai-rs and identify_verify.py check them on every change. set -euo pipefail cd "$(dirname "$0")/.." rm -rf ext prober.json mkdir -p ext WORK=$(mktemp -d) trap 'rm -rf "$WORK"' EXIT V=(-f lavfi -i testsrc2=s=32x32:r=10:d=0.3) A=(-f lavfi -i sine=f=440:r=48000:d=0.2) X264=(-c:v libx264 -preset ultrafast -g 3 -pix_fmt yuv420p -x264-params no-info=1) X265=(-c:v libx265 -preset ultrafast -g 3 -pix_fmt yuv420p -x265-params log-level=none:info=0) ff() { local a=("$@") n=$#; ffmpeg -hide_banner -loglevel error -y "${a[@]:0:n-1}" -bitexact -map_metadata -1 "${a[n-1]}" ext/media.m3u8 ff "${V[@]}" "${X264[@]}" -f dash -init_seg_name "i.m4s" -media_seg_name "s.m4s" "$WORK/manifest.mpd" grep -v ' 00:01.000\nA line.\n' > ext/t.vtt python3 tools/oracle.py ext > prober.json