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.76k stars 10.08k forks source link

hls choice in format list #32748

Closed gabri25ele closed 8 months ago

gabri25ele commented 8 months ago

I get this list from yt-dlp -F command

hls-aac-Audiodescrizione mp4 audio only │ m3u8 │ audio only mp4a [Audiodescrizione] Audiodescrizione hls-aac-Italiano mp4 audio only │ m3u8 │ audio only mp4a [Italiano] Italiano hls-1800 mp4 1024x576 │ ~1.34GiB 1758k m3u8 │ avc1 1758k video only hls-2400 mp4 1280x720 │ ~1.79GiB 2344k m3u8 │ avc1 2344k video only hls-3600 mp4 1440x810 │ ~2.69GiB 3516k m3u8 │ avc1 3516k video only hls-5000 mp4 1920x1080 │ ~3.98GiB 5210k m3u8 │ avc1 5210k video only

to get simple one of this list... I tried yt-dlp -f hls-5000 error tried also a simple yt-dlp -f best same

where am I wrong?

dirkf commented 8 months ago

Several ways.

  1. 30839 "if you were actually using yt-dlp ..."

  2. You didn't fill out the template.
  3. You didn't supply a text log of your failing command.

Nonetheless a general point that applies for yt-dl and yt-dlp is that a manifest (m3u8, say) may not be downloadable outside the context of the site from which it was captured. It may be time-limited, or require additional HTTP headers, such as Referer, Origin, Authorization or cookies.

Try passing the URL of the page with the media instead of just the manifest URL.

gabri25ele commented 8 months ago

very simple...

yt-dlp -F https://www.raiplay.it/video/2019/10/battute-e2734ab5-6d35-4fa6-b9ea-a3cdd9a03726.html

[RaiPlay] Extracting URL: https://www.raiplay.it/video/2019/10/battute-e2734ab5-6d35-4fa6-b9ea-a3cdd9a03726.html [RaiPlay] e2734ab5-6d35-4fa6-b9ea-a3cdd9a03726: Downloading video JSON [RaiPlay] e2734ab5-6d35-4fa6-b9ea-a3cdd9a03726: Downloading XML metadata [RaiPlay] e2734ab5-6d35-4fa6-b9ea-a3cdd9a03726: Downloading m3u8 information [RaiPlay] e2734ab5-6d35-4fa6-b9ea-a3cdd9a03726: Checking MP4 availability [info] Available formats for e2734ab5-6d35-4fa6-b9ea-a3cdd9a03726: ID EXT RESOLUTION FPS │ FILESIZE TBR PROTO │ VCODEC ACODEC ────────────────────────────────────────────────────────────────────────────── hls-854 mp4 512x288 25 │ ~118.93MiB 855k m3u8 │ avc1.4d401f mp4a.40.2 https-800 mp4 512x288 25 │ ≈118.93MiB 855k https │ avc1.4d401f mp4a.40.2 hls-1896 mp4 928x522 25 │ ~263.91MiB 1896k m3u8 │ avc1.4d401f mp4a.40.2 https-1800 mp4 928x522 25 │ ≈263.91MiB 1896k https │ avc1.4d401f mp4a.40.2

normally yt-dlp download the last one in the list, but If I want to specify one in particular, for example hls-854

with the command yt-dlp -F hls-854 https://www.raiplay.it/video/2019/10/battute-e2734ab5-6d35-4fa6-b9ea-a3cdd9a03726.html

[generic] Extracting URL: hls-854 ERROR: [generic] 'hls-854' is not a valid URL. Set --default-search "ytsearch" (or run yt-dlp "ytsearch:hls-854" ) to search YouTube so I can't figure out how to give the selection of that resolution

but maybe the answer is yt-dlp ytsearch:hls-854 https://www.raiplay.it/video/2019/10/battute-e2734ab5-6d35-4fa6-b9ea-a3cdd9a03726.html

dirkf commented 8 months ago

No, it isn't.

Ask your question in the right place (point 1 above), with the required information, and someone may be able to help. You could start by reviewing https://github.com/yt-dlp/yt-dlp/issues/9154.