Skip to content

Commit 413c03b

Browse files
committed
🐛 Fix downloading youtube shorts in HD
1 parent 20e968f commit 413c03b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ OPTIONS
149149
150150
-P PIXELS
151151
Set the maximum height in pixels of the video output. Ignored when -v is not
152-
specified. Defaults to 1080px. Constraint is dropped when no formats comply.
152+
specified. Defaults to 1280px. Constraint is dropped when no formats comply.
153153
154154
-m
155155
Use MP4 when merging audio/video streams, keeping video codecs if possible and

yt/yt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ OPTIONS
7575
7676
-P PIXELS
7777
Set the maximum height in pixels of the video output. Ignored when -v is not
78-
specified. Defaults to 1080px. Constraint is dropped when no formats comply.
78+
specified. Defaults to 1280px. Constraint is dropped when no formats comply.
7979
8080
-m
8181
Use MP4 when merging audio/video streams, keeping video codecs if possible and
@@ -111,7 +111,7 @@ All rights reserved."
111111
local CUSTOM_AUDIO_BITRATE=false
112112
local AUDIO_BITRATE=257
113113
local AUDIO_SAMPLING_RATE=44100
114-
local MAX_PIXELS=1080
114+
local MAX_PIXELS=1280 # Youtube Shorts are max 720x1280 (portrait)
115115
local MP4=false
116116
local AVC=false
117117
local HDR=false
@@ -282,7 +282,7 @@ All rights reserved."
282282
local DOWNLOAD_OPTIONS=(--merge-output-format mkv -f "(${hdr_selector})+(${audio_selector})/${fallback_video_selector}")
283283
elif $MP4; then
284284
local DOWNLOAD_OPTIONS=(--merge-output-format mp4 --postprocessor-args "-threads 0 -vcodec copy -acodec aac -b:a ${AUDIO_BITRATE}k -ar ${AUDIO_SAMPLING_RATE}")
285-
if [ $MAX_PIXELS -gt 1080 ] && ! $SILENT; then
285+
if [ $MAX_PIXELS -gt 1280 ] && ! $SILENT; then
286286
echo "Maximum resolution is set to ${MAX_PIXELS}, and -m is present. Downloads will be limited to max 1080p on sites that don't provide higher resolution video streams in MP4 container (e.g. YouTube)."
287287
fi
288288
if $AVC; then
@@ -293,7 +293,7 @@ All rights reserved."
293293
else
294294
local DOWNLOAD_OPTIONS=(--merge-output-format mkv -f "(${default_video_selector})+(${audio_selector})/${fallback_video_selector}")
295295
fi
296-
DOWNLOAD_OPTIONS+=(--all-subs --embed-subs --sub-format "srt/best")
296+
DOWNLOAD_OPTIONS+=(--embed-subs --all-subs --sub-format "srt/best")
297297
else
298298
local DOWNLOAD_OPTIONS=(--embed-thumbnail --audio-format m4a --audio-quality ${AUDIO_BITRATE}k --postprocessor-args "-ar ${AUDIO_SAMPLING_RATE}" -x -f "${audio_selector}/best")
299299
if $KEEP_AUDIO; then

0 commit comments

Comments
 (0)