[Bug]: Clip start produces black/empty video track (needs force_keyframes_at_cuts)
Prerequisites
- I have searched existing issues and discussions to ensure this bug hasn't been reported before
- If the download itself fails, I have tested the same URL and options with yt-dlp directly (see the note below) — or this bug is not download-related
Bug Description
Clipping with Clip start (and no Clip end) finished "successfully" but produced a .webm with a VP9 track that decodes zero frames. Audio (opus) is fine. Players show a black picture.
Expected: a playable clip with real video frames.
Steps:
- Add
https://www.youtube.com/watch?v=H8g4B5ZN7LM - Set Clip start to
366 - Quality best / format any
- Download finishes; file has video+audio streams according to ffprobe, but
ffmpeg -ss 2 -i file -frames:v 1decodes 0 bytes of frames
yt-dlp Direct Test Results
Without force_keyframes_at_cuts (the path MeTube's clip uses via --download-sections):
yt-dlp -f "bv*+ba/b" --merge-output-format mp4 \
--download-sections "*0:00-0:20" \
-o "test.%(ext)s" 'https://www.youtube.com/watch?v=H8g4B5ZN7LM'
# -> file exists, ffprobe shows video+audio, but decoded frame size is 0With the same command plus --force-keyframes-at-cuts:
# -> decoded gray frame is 2073600 bytes (1920x1080) — video is realSo the empty-video track is tied to section download without cutting on keyframes. Related upstream: https://github.com/yt-dlp/yt-dlp/issues/5926
This is still worth a MeTube-side fix because the Clip UI is what triggers the bad path for users.
Environment & Configuration
services:
metube:
image: ghcr.io/alexta69/metube:2026.09.29
environment:
PUID: "1002"
PGID: "1002"
OUTPUT_TEMPLATE: "%(uploader)s/%(upload_date)s - %(title)s [%(id)s].%(ext)s"
ALLOW_YTDL_OPTIONS_OVERRIDES: "false"MeTube version: 2026.09.29
OS: Ubuntu 24.04
yt-dlp in container: 2026.08.19
ffmpeg in container: 7.1.5
Workaround that fixes clips for us:
YTDL_OPTIONS: '{"format": "bv*+ba/b", "merge_output_format": "mp4", "force_keyframes_at_cuts": true}'Additional Context
Requesting that MeTube pass force_keyframes_at_cuts (or equivalent) whenever Clip start/end is set, so clip downloads are not silently audio-only/black without users knowing about the extra option. A warning when a finished clip has a video track that fails to decode would also help.
Thank you.
Source: alexta69/metube