ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.58k stars 10.05k forks source link

[SVTPlay] Lowest quality audio stream is selected by default #30480

Open to-duck opened 2 years ago

to-duck commented 2 years ago

Checklist

Verbose log

>youtube-dl --fixup warn https://www.svtplay.se/video/33537410/disneydags/disneydags-sasong-1-avsnitt-21
[SVTPlay] 33537410: Downloading webpage
[SVTPlay] e6EYzN2: Downloading JSON metadata
[SVTPlay] e6EYzN2: Downloading m3u8 information
[SVTPlay] e6EYzN2: Downloading m3u8 information
[SVTPlay] e6EYzN2: Downloading m3u8 information
[SVTPlay] e6EYzN2: Downloading m3u8 information
[SVTPlay] e6EYzN2: Downloading m3u8 information
[SVTPlay] e6EYzN2: Downloading m3u8 information
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 922
[download] Destination: Avsnitt 21-e6EYzN2.fhls-ts-full-1649.mp4
[download] 100% of 613.36MiB in 05:52
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 922
[download] Destination: Avsnitt 21-e6EYzN2.fhls-ts-lb-full-stereo-Svenska.mp4
[download] 100% of 28.17MiB in 03:58
[ffmpeg] Merging formats into "Avsnitt 21-e6EYzN2.mp4"
Deleting original file Avsnitt 21-e6EYzN2.fhls-ts-full-1649.mp4 (pass -k to keep)
Deleting original file Avsnitt 21-e6EYzN2.fhls-ts-lb-full-stereo-Svenska.mp4 (pass -k to keep)

Note: --fixup warn in included due to issue #30208.

Description

From the log above: [download] Destination: Avsnitt 21-e6EYzN2.fhls-ts-lb-full-stereo-Svenska.mp4

The selected audio stream (...-lb-...) is the low bandwidth, lowest quality, one. Almost all the other audio streams have better quality:

>youtube-dl -F https://www.svtplay.se/video/33537410/disneydags/disneydags-sasong-1-avsnitt-21
[SVTPlay] 33537410: Downloading webpage
[SVTPlay] e6EYzN2: Downloading JSON metadata
[SVTPlay] e6EYzN2: Downloading m3u8 information
[SVTPlay] e6EYzN2: Downloading m3u8 information
[SVTPlay] e6EYzN2: Downloading m3u8 information
[SVTPlay] e6EYzN2: Downloading m3u8 information
[SVTPlay] e6EYzN2: Downloading m3u8 information
[SVTPlay] e6EYzN2: Downloading m3u8 information
[info] Available formats for e6EYzN2:
format code                      extension  resolution note
hls-cmaf-full-stereo-Svenska     mp4        audio only [sv]
hls-cmaf-lb-full-stereo-Svenska  mp4        audio only [sv]
hls-stereo-Svenska               mp4        audio only [sv]
hls-ts-avc-stereo-Svenska        mp4        audio only [sv]
hls-ts-full-stereo-Svenska       mp4        audio only [sv]
hls-ts-lb-full-stereo-Svenska    mp4        audio only [sv]
hls-cmaf-full-307                mp4        416x234     307k , hvc1.1.6.L123.90, 25.0fps, video only
hls-cmaf-lb-full-307             mp4        416x234     307k , hvc1.1.6.L123.90, 25.0fps, video only
hls-cmaf-full-395                mp4        416x234     395k , avc1.42c01f, 25.0fps, video only
hls-cmaf-lb-full-395             mp4        416x234     395k , avc1.42c01f, 25.0fps, video only
hls-cmaf-full-407                mp4        640x360     407k , hvc1.1.6.L123.90, 25.0fps, video only
hls-cmaf-lb-full-407             mp4        640x360     407k , hvc1.1.6.L123.90, 25.0fps, video only
hls-424                          mp4        416x234     424k , avc1.42c01f, 25.0fps, video only
hls-ts-avc-424                   mp4        416x234     424k , avc1.42c01f, 25.0fps, video only
hls-ts-full-424                  mp4        416x234     424k , avc1.42c01f, 25.0fps, video only
hls-ts-lb-full-424               mp4        416x234     424k , avc1.42c01f, 25.0fps, video only
hls-cmaf-full-584                mp4        960x540     584k , hvc1.2.4.L123.90, 25.0fps, video only
hls-cmaf-lb-full-584             mp4        960x540     584k , hvc1.2.4.L123.90, 25.0fps, video only
hls-cmaf-full-595                mp4        640x360     595k , avc1.4d401f, 25.0fps, video only
hls-cmaf-lb-full-595             mp4        640x360     595k , avc1.4d401f, 25.0fps, video only
hls-628                          mp4        640x360     628k , avc1.4d401f, 25.0fps, video only
hls-ts-avc-628                   mp4        640x360     628k , avc1.4d401f, 25.0fps, video only
hls-ts-full-628                  mp4        640x360     628k , avc1.4d401f, 25.0fps, video only
hls-ts-lb-full-628               mp4        640x360     628k , avc1.4d401f, 25.0fps, video only
hls-cmaf-full-794                mp4        1280x720    794k , hvc1.2.4.L123.90, 25.0fps, video only
hls-cmaf-lb-full-794             mp4        1280x720    794k , hvc1.2.4.L123.90, 25.0fps, video only
hls-cmaf-full-994                mp4        960x540     994k , avc1.4d401f, 25.0fps, video only
hls-cmaf-lb-full-994             mp4        960x540     994k , avc1.4d401f, 25.0fps, video only
hls-1036                         mp4        960x540    1036k , avc1.4d401f, 25.0fps, video only
hls-ts-avc-1036                  mp4        960x540    1036k , avc1.4d401f, 25.0fps, video only
hls-ts-full-1036                 mp4        960x540    1036k , avc1.4d401f, 25.0fps, video only
hls-ts-lb-full-1036              mp4        960x540    1036k , avc1.4d401f, 25.0fps, video only
hls-cmaf-full-1194               mp4        1280x720   1194k , avc1.4d401f, 25.0fps, video only
hls-cmaf-lb-full-1194            mp4        1280x720   1194k , avc1.4d401f, 25.0fps, video only
hls-1240                         mp4        1280x720   1240k , avc1.4d401f, 25.0fps, video only
hls-ts-avc-1240                  mp4        1280x720   1240k , avc1.4d401f, 25.0fps, video only
hls-ts-full-1240                 mp4        1280x720   1240k , avc1.4d401f, 25.0fps, video only
hls-ts-lb-full-1240              mp4        1280x720   1240k , avc1.4d401f, 25.0fps, video only
hls-cmaf-full-1293               mp4        1920x1080  1293k , hvc1.2.4.L123.90, 25.0fps, video only
hls-cmaf-full-1594               mp4        1920x1080  1594k , avc1.640029, 25.0fps, video only
hls-1649                         mp4        1920x1080  1649k , avc1.640029, 25.0fps, video only
hls-ts-avc-1649                  mp4        1920x1080  1649k , avc1.640029, 25.0fps, video only
hls-ts-full-1649                 mp4        1920x1080  1649k , avc1.640029, 25.0fps, video only (best)

This is general issue for all Disneydags episodes that I have tried with, not just episode 21.

dirkf commented 2 years ago

For now, try -f 'bestvideo+bestaudio[format_id!*=lb]/best'.

to-duck commented 2 years ago

For now, try -f 'bestvideo+bestaudio[format_id!*=1b]/best'.

Thanks for the tip!

With single quotes I got ERROR: requested format not available, but with double quotes, changing 1b to lb, switching to ffmpeg 3.4.2, and using ffmpeg as downloader (see #30208), it actually works:

>youtube-dl --hls-prefer-ffmpeg -f "bestvideo+bestaudio[format_id!*=lb]/best" https://www.svtplay.se/video/33694750/disneydags/disneydags-sasong-1-avsnitt-23
dirkf commented 2 years ago

Ah, lb = low bandwidth? That could make sense (l vs 1).

'Single quotes' for POSIX, "double quotes" for Windows.

Also, you could sort the audio formats like this (hls_best/hls_less_good/bestaudio) (eg, fill in the best, less_good) instead of just picking the best audio format that's not -lb-.