Skip to content

md_generator.media.video API Reference

Summary

Item Value
Purpose Convert Video files to Transcript Markdown with video metadata
CLI md-video
Extra video
Tier medium

Quick CLI reference

Argument Type Required Default Choices Help
input Path required — — Input video file path
output Path required — — Output .md file path
--model str optional 'base' — Whisper model name (default: base)
--language str optional None — Whisper language (default: auto-detect if omitted). Single code/name (e.g. en, hi) to force, or hi,en / hinglish for Hindi+English mixed. Explicit auto / detect matches omitting the flag.
--title str optional None — Override document title in Markdown
-v flag optional false — —

Primary symbols

Symbol Kind Notes
VideoToMarkdownService callable —
video_probe_from_ffprobe callable —

Python API (mkdocstrings)

video

VideoConverter

Bases: DocumentConverter

ffprobe metadata + ffmpeg audio extraction (no transcription).

convert

convert(input_path: Path) -> VideoProbeResult

Return ffprobe-derived metadata only (no transcription).

extract_audio

extract_audio(input_video: Path, tmp_dir: Path) -> Path

Extract a mono 16 kHz PCM WAV suitable for Whisper into tmp_dir.

VideoMarkdownFormatter

Compose video probe metadata with transcript from TranscriptionResult.

VideoToMarkdownService

VideoToMarkdownService(*, video_converter: VideoConverter | None = None, audio_service: AudioToMarkdownService | None = None, formatter: VideoMarkdownFormatter | None = None, whisper_model: str = 'base', language: str | None = None)

Extract audio from video, transcribe via audio service only, then format.

transcribe_via_extracted_audio

transcribe_via_extracted_audio(input_video: Path) -> tuple[VideoProbeResult, TranscriptionResult]

Extract audio to a temp WAV and return (probe, transcription).