whisper video transcribe workaround

Data Community

Skill notes

Problem

When running whisper video.mp4 directly, the process may: Appear to run (PID exists, CPU may be active) But output dir stays empty even after many minutes Eventually time out or get stuck at ~33-43% "downloading/decoding" This happens because the Whisper CLI tries to decode the video container internally, and certain video streams (especially DASH/m3u8 segmented video from YouTube downloads) cause the decoder to stall.

Step 1 — Extract audio with ffmpeg

Flags explained: -vn — no video stream -acodec pcm_s16le — 16-bit PCM audio (Whisper prefers) -ar 16000 — 16kHz sample rate (Whisper's native rate) -ac 1 — mono (better for speech recognition)

Step 2 — Transcribe the WAV with faster-whisper

Model size guide for Chinese: tiny — fastest, ~3x realtime on CPU; acceptable accuracy medium — better accuracy but slower large-v3-turbo — best accuracy; much heavier

Step 3 — Save transcript to file

Always write to a JSON file rather than holding in memory:

Verification checklist

[ ] Audio WAV was created (ls -lh /tmp/audio.wav) [ ] faster-whisper started logging segment output [ ] JSON file written with non-empty segments array [ ] Transcript language matches expected language [ ] Total duration of last segment ≈ video duration

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
Data
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@tomevault-io · no license declared
Token usage
Lean
Setup complexity
Plug-and-play
External API key
Not required
Operating systems
Unspecified (assume cross-platform)
Runtime requirements
Python
Detected file/system behavior
  • Read-only
  • Write / modify
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Step 1 — Extract audio with ffmpeg

Flags explained: `-vn` — no video stream `-acodec pcm_s16le` — 16-bit PCM audio (Whisper prefers) `-ar 16000` — 16kHz sample rate (Whisper's native rate) `-ac 1` — mono (better for speech recognition)

02
Step 2 — Transcribe the WAV with faster-whisper

Model size guide for Chinese: `tiny` — fastest, ~3x realtime on CPU; acceptable accuracy `medium` — better accuracy but slower `large-v3-turbo` — best accuracy; much heavier

03
Step 3 — Save transcript to file

Always write to a JSON file rather than holding in memory:

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.