20 lines
551 B
Bash
Executable File
20 lines
551 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
if [[ $# -ne 1 ]]; then
|
|
echo "usage: $0 OUTPUT.mp4" >&2
|
|
exit 2
|
|
fi
|
|
|
|
output=$1
|
|
ffmpeg_bin=${FFMPEG_BIN:-ffmpeg}
|
|
mkdir -p "$(dirname "$output")"
|
|
|
|
"$ffmpeg_bin" -v error \
|
|
-f lavfi -i "color=c=red:s=16x16:r=2:d=1" \
|
|
-an -c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p \
|
|
-movflags +faststart -map_metadata -1 -fflags +bitexact -flags:v +bitexact \
|
|
-metadata creation_time=1970-01-01T00:00:00Z -y "$output"
|
|
|
|
printf 'sequencer-codec-fixture path=%s bytes=%s\n' "$output" "$(wc -c < "$output")"
|