Add strict codec selection / “Require H.264” instead of only Preferred codec

Author: VortexFlickensCreated Sep 13, 2026Updated Sep 14, 2026
Labelsenhancement

Description

ytDownloader currently provides a Preferred video codec setting with options such as H.264 (AVC), AV1 and VP9. However, it appears to only influence preference and does not strictly enforce the selected codec.

For example, I selected:

  • Preferred quality: 1080p
  • Preferred video codec: H.264 (AVC)

but ytDownloader still downloaded an AV1 video stream.

Test video:

https://www.youtube.com/watch?v=2PuFyjAs7JA

ffprobe output from the ytDownloader download:

Video: av1 (Main) (av01), yuv420p, 1920x1080
Audio: aac (LC) (mp4a)

The same video downloaded at 1080p using another yt-dlp GUI with H.264 selected produces:

Video: h264 (High) (avc1), yuv420p, 1920x1080
Audio: aac (LC) (mp4a)

Why this would be useful

A strict codec option would be useful for compatibility.

In my case, the AV1 version:

  • shows a black screen in VLC when hardware acceleration is enabled;
  • is not accepted or embedded correctly by some applications such as WhatsApp/Discord.

The H.264 + AAC MP4 version works correctly in the same applications.

Suggested improvement

It would be useful to have a codec mode such as:

Video codec mode

  • Auto
  • Prefer selected codec
  • Require selected codec

Codec

  • H.264 / AVC
  • VP9
  • AV1

Alternatively, ytDownloader could expose the actual available video formats/codecs for each download and allow the user to select one directly.

If the requested codec is unavailable at the selected resolution, the app could either:

  • notify the user and ask whether to fall back to another codec; or
  • show that the requested codec is unavailable.

Ideally, this would select the native H.264/AVC stream when available rather than re-encoding the video.

This would be especially useful for users who want codec compatibility without needing to enter custom yt-dlp arguments.

Environment

  • ytDownloader version: v4.0.1
  • OS: TUXEDO OS, based on Ubuntu 24.04 LTS
  • Platform: Linux
  • Package: Flatpak
  • Downloader backend: yt-dlp