marcopeocchi / yt-dlp-web-ui

A terrible web ui for yt-dlp. Designed to be self-hosted.
Mozilla Public License 2.0
797 stars 81 forks source link

Future request: Define preferred format in settings #173

Open MajorTomDE opened 1 month ago

MajorTomDE commented 1 month ago

Hello, I’m not sure if this is possible: My issue is, that in some cases the best quality is webm (VP09) format. This makes problems in iOS Safari and can’t be saved to photos.

I know there is an option where I can select the output format. But there are so many options.

Is it possible to define: Download best quality MP4?

Thank you, Tom

marcopeocchi commented 1 month ago

hello @MajorTomDE,

if the container (webm) is the problem but not the codec (vp9) you can create a custom template with the following content: -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" this will download the best video and the best audio in a mp4 container.

If you want to also re-encode: -S res,ext:mp4:m4a --recode mp4

MajorTomDE commented 1 month ago

hello @marcopeocchi

thanks for your feedback. I tried out both paramters, but the issue still exists. I can view and download the video on the desktop with Chromium bases Browser.

But on the iPhone with Safari or WebKit based iOS Browsers I always get the following screen:

Image

If I select a format with AVC1 via the format selection, it works. It is just a bit inconvenient to always select the AVC1 format with the best quality manually.

marcopeocchi commented 1 month ago

Hi @MajorTomDE,

I think this is something doable with just templates:

-f "bv*[vcodec^=avc]+ba[ext=m4a]/b[ext=mp4]/b"

image