test_assets: add script to generate 30 sec of black frames
This commit is contained in:
parent
00cae63272
commit
c985b696ec
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,5 @@
|
|||||||
target
|
target
|
||||||
Cargo.lock
|
Cargo.lock
|
||||||
|
|
||||||
|
test_assets/*
|
||||||
|
!test_assets/.gitkeep
|
@ -31,6 +31,7 @@
|
|||||||
pkgs.mpv
|
pkgs.mpv
|
||||||
pkgs.grcov
|
pkgs.grcov
|
||||||
pkgs.cargo-nextest
|
pkgs.cargo-nextest
|
||||||
|
pkgs.ffmpeg
|
||||||
];
|
];
|
||||||
RUST_SRC_PATH = "${toolchain.rust-src}/lib/rustlib/src/rust/library";
|
RUST_SRC_PATH = "${toolchain.rust-src}/lib/rustlib/src/rust/library";
|
||||||
});
|
});
|
||||||
|
21
setup_test_assets.sh
Executable file
21
setup_test_assets.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
REQUIRED_COMMANDS=(
|
||||||
|
"git"
|
||||||
|
"ffmpeg"
|
||||||
|
)
|
||||||
|
|
||||||
|
for cmd in "${REQUIRED_COMMANDS[@]}"; do
|
||||||
|
if ! command -v "$cmd" &> /dev/null; then
|
||||||
|
echo "Command '$cmd' not found. Please install it and try again."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
ROOT_DIR=$(git rev-parse --show-toplevel)
|
||||||
|
|
||||||
|
# Generate 30 seconds of 480p video with black background
|
||||||
|
|
||||||
|
ffmpeg -f lavfi -i color=c=black:s=640x480:d=30 -c:v libx264 -t 30 -pix_fmt yuv420p "$ROOT_DIR/test_assets/black-background-30s-480p.mp4"
|
0
test_assets/.gitkeep
Normal file
0
test_assets/.gitkeep
Normal file
Loading…
Reference in New Issue
Block a user