Skip to content

Commit

Permalink
[BACKEND] More media quality presets + docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbannon committed Nov 23, 2024
1 parent 0f542ac commit 86e7bd2
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/source/prebuilt_presets/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ definitions :doc:`here </config_reference/prebuilt_presets/index>`.
:titlesonly:

helpers
media_quality
tv_shows
music
music_videos
25 changes: 25 additions & 0 deletions docs/source/prebuilt_presets/media_quality.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
======================
Media Quality Presets
======================

Video
-----
The following presets set video quality specifications to yt-dlp.

- ``Max Video Quality``
- ``Max 2160p``
- ``Max 1080p``
- ``Max 1440p``
- ``Max 1080p``
- ``Max 720p``
- ``Max 480p``

Audio
-----
The following presets set audio quality specifications to yt-dlp.
These assume you are only extracting audio (no video).

- ``Max Audio Quality``, format is determined by the source
- ``Max MP3 Quality``
- ``Max Opus Quality``
- ``MP3 128k``
29 changes: 28 additions & 1 deletion src/ytdl_sub/prebuilt_presets/helpers/media_quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ presets:
preset:
- best_video_quality

"Max Video Quality":
preset:
- best_video_quality

#############################################################################
# Max 2160p

Expand Down Expand Up @@ -55,4 +59,27 @@ presets:
"Max 480p":
format: "(bv*[height<=480]+bestaudio/best[height<=480])"
ytdl_options:
merge_output_format: "mp4"
merge_output_format: "mp4"

#############################################################################
# Audio Quality Presets

"Max Audio Quality":
audio_extract:
codec: "best"
quality: 0

"Max MP3 Quality":
audio_extract:
codec: "mp3"
quality: 0

"Max Opus Quality":
audio_extract:
codec: "opus"
quality: 0

"MP3 128k":
audio_extract:
codec: "mp3"
quality: 128

0 comments on commit 86e7bd2

Please sign in to comment.