docs: update mining demo and scale video crops

- Refresh mining demo assets and documentation references
- Scale mpv crop coordinates for resized OBS recordings
This commit is contained in:
2026-08-19 00:55:31 -07:00
parent 2a77ba9dd4
commit b61f050e78
20 changed files with 16 additions and 6 deletions
+4 -2
View File
@@ -19,7 +19,8 @@ Options:
-w, --webp Generate animated WebP preview
Encoding profile:
- Crop: 1920x1080 at x=760 y=200
- Crop: mpv region at 1920x1080, x=760 y=205 on a 3440x1440 canvas
- Output size: 1920x1080
- MP4: H.264 + AAC
- WebM: AV1/VP9 + Opus at 30 fps
USAGE
@@ -148,7 +149,8 @@ pick_webp_encoder() {
return 1
}
crop_vf="crop=1920:1080:760:205"
# OBS may resize the 3440x1440 canvas, so scale the mpv bounds with the input.
crop_vf="crop=1920*iw/3440:1080*ih/1440:760*iw/3440:205*ih/1440,scale=1920:1080:flags=lanczos"
webm_vf="${crop_vf},fps=30"
echo "Generating MP4: $mp4_out"
+5 -1
View File
@@ -40,7 +40,7 @@ function toBashPath(filePath: string): string {
return `${drive.toUpperCase()}:/${rest}`;
}
test('mkv-to-readme-video accepts libwebp_anim when libwebp is unavailable', () => {
test('mkv-to-readme-video builds every output with the scaled mpv crop', () => {
withTempDir((root) => {
const binDir = path.join(root, 'bin');
const inputPath = path.join(root, 'sample.mkv');
@@ -104,5 +104,9 @@ touch "$output"
const ffmpegLog = fs.readFileSync(ffmpegLogPath, 'utf8');
assert.match(ffmpegLog, /-c:v libwebp_anim/);
const scaledCropUses = ffmpegLog.match(
/-vf crop=1920\*iw\/3440:1080\*ih\/1440:760\*iw\/3440:205\*ih\/1440,scale=1920:1080:flags=lanczos/g,
);
assert.equal(scaledCropUses?.length, 4);
});
});