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
+1 -1
View File
@@ -15,7 +15,7 @@ Integrates Yomitan and mpv - on-screen lookups, mine to Anki, and track immersio
[![License](https://img.shields.io/github/license/ksyasuda/SubMiner?style=flat-square&color=1a1a2e)](https://www.gnu.org/licenses/gpl-3.0) [![License](https://img.shields.io/github/license/ksyasuda/SubMiner?style=flat-square&color=1a1a2e)](https://www.gnu.org/licenses/gpl-3.0)
[![TypeScript](https://img.shields.io/badge/TypeScript-1a1a2e?style=flat-square&logo=typescript&logoColor=3178c6)](https://www.typescriptlang.org) [![TypeScript](https://img.shields.io/badge/TypeScript-1a1a2e?style=flat-square&logo=typescript&logoColor=3178c6)](https://www.typescriptlang.org)
[![SubMiner demo](./assets/minecard.webp)](https://github.com/user-attachments/assets/89e61895-e2b7-4b47-8d50-a35afe4132b2) [![SubMiner demo](./assets/minecard.webp)](./assets/minecard.mp4)
</div> </div>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 MiB

After

Width:  |  Height:  |  Size: 3.8 MiB

+4
View File
@@ -0,0 +1,4 @@
type: docs
area: docs
- Replaced the README and documentation mining demo with the current card-mining workflow.
+1 -1
View File
@@ -5,7 +5,7 @@ Short recordings of SubMiner's key features and integrations from real playback
<script setup> <script setup>
import { withBase } from 'vitepress'; import { withBase } from 'vitepress';
const v = '20260301-1'; const v = '20260819-1';
</script> </script>
## Anki Card Mining & Enrichment ## Anki Card Mining & Enrichment
+1 -1
View File
@@ -88,7 +88,7 @@ features:
<script setup> <script setup>
import { withBase } from 'vitepress'; import { withBase } from 'vitepress';
const demoAssetVersion = '20260223-2'; const demoAssetVersion = '20260819-1';
</script> </script>
<div class="landing-shell"> <div class="landing-shell">
Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 523 KiB

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 MiB

After

Width:  |  Height:  |  Size: 3.8 MiB

+4 -2
View File
@@ -19,7 +19,8 @@ Options:
-w, --webp Generate animated WebP preview -w, --webp Generate animated WebP preview
Encoding profile: 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 - MP4: H.264 + AAC
- WebM: AV1/VP9 + Opus at 30 fps - WebM: AV1/VP9 + Opus at 30 fps
USAGE USAGE
@@ -148,7 +149,8 @@ pick_webp_encoder() {
return 1 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" webm_vf="${crop_vf},fps=30"
echo "Generating MP4: $mp4_out" echo "Generating MP4: $mp4_out"
+5 -1
View File
@@ -40,7 +40,7 @@ function toBashPath(filePath: string): string {
return `${drive.toUpperCase()}:/${rest}`; 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) => { withTempDir((root) => {
const binDir = path.join(root, 'bin'); const binDir = path.join(root, 'bin');
const inputPath = path.join(root, 'sample.mkv'); const inputPath = path.join(root, 'sample.mkv');
@@ -104,5 +104,9 @@ touch "$output"
const ffmpegLog = fs.readFileSync(ffmpegLogPath, 'utf8'); const ffmpegLog = fs.readFileSync(ffmpegLogPath, 'utf8');
assert.match(ffmpegLog, /-c:v libwebp_anim/); 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);
}); });
}); });