FreeTubeApp / FreeTube

An Open Source YouTube app for privacy
https://freetubeapp.io/
GNU Affero General Public License v3.0
13.54k stars 842 forks source link

[Feature Request]: Add yt-dlp intergration #4178

Open KevinReems opened 1 year ago

KevinReems commented 1 year ago

Guidelines

Problem Description

Currently you can only download a limited selection of video qualities with audio included.

Proposed Solution

yt-dlp is capable of downloading and then muxing high resolution video with high bitrate audio streams.

For example: yt-dlp.exe -f bestvideo[height<=1080]+bestaudio will output a 1080p files with the best available audio stream available to download. Since nothing is actually encoded, this process is extremely fast.

A few menu options could be added to Settings to specify the path of yt-dlp, output directory, desired/maximum resolution etc.

Alternatives Considered

There may be other command line downloaders but since yt-dlp seems to be the clear winner it would be best to start there.

Issue Labels

support for external software

Additional Information

No response

absidue commented 2 months ago

To avoid us having to implement loads of individual settings, especially considering the amount of possible options even just for yt-dlp's -f flag, I would suggest that if this is implemented it should be done similarly to the external player settings. One field to specify the path to yt-dlp, another field to set the command line options for yt-dlp, a link to yt-dlp's README so people can find out what options they can specify and we can reuse the existing download folder setting.

FreeTube would then call yt-dlp like this: [path to binary] [your specified commandline options] https://www.youtube.com?v=[video id].