Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Feature request: Select format based on resolution (mainly CBS) #9484
Comments
|
You can already do that. |
|
From is hls-3719-0 the worst? |
|
They all the same. |
|
Well, it appears to be, yes. But 4 different hls streams all with the same properties? Why? |
Before submitting an issue make sure you have:
What is the purpose of your issue?
The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue
Example formats from a CBS clip:
[info] Available formats for 6681E9BA-2685-F7FE-7103-EA222276F6A4:
format code extension resolution note
hls-47-0 mp4 audio only 47k , mp4a.40.2
hls-47-1 mp4 audio only 47k , mp4a.40.2
hls-47-2 mp4 audio only 47k , mp4a.40.2
hls-47-3 mp4 audio only 47k , mp4a.40.2
hls-meta-0 mp4 multiple Quality selection URL
hls-meta-1 mp4 multiple Quality selection URL
hls-meta-2 mp4 multiple Quality selection URL
hls-meta-3 mp4 multiple Quality selection URL
hls-1 mp4 400x224 1k
hls-110 mp4 400x224 110k
http-150-0 mp4 400x224 150k
http-150-1 mp4 400x224 150k
hls-156-0 mp4 400x224 156k , avc1.66.30, mp4a.40.2
hls-156-1 mp4 400x224 156k , avc1.66.30, mp4a.40.2
hls-156-2 mp4 400x224 156k , avc1.66.30, mp4a.40.2
hls-156-3 mp4 400x224 156k , avc1.66.30, mp4a.40.2
http-240-0 mp4 400x224 240k
http-240-1 mp4 400x224 240k
hls-250 mp4 400x224 250k
hls-309-0 mp4 400x224 309k , avc1.66.30, mp4a.40.2
hls-309-1 mp4 400x224 309k , avc1.66.30, mp4a.40.2
hls-309-2 mp4 400x224 309k , avc1.66.30, mp4a.40.2
hls-309-3 mp4 400x224 309k , avc1.66.30, mp4a.40.2
rtmp-364-0 flv 384x216 364k
rtmp-364-1 flv 384x216 364k
http-440 mp4 400x224 440k
rtmp-496-0 flv 640x360 496k
rtmp-496-1 flv 640x360 496k
hls-500 mp4 512x288 500k
hls-568-0 mp4 512x288 568k , avc1.66.30, mp4a.40.2
hls-568-1 mp4 512x288 568k , avc1.66.30, mp4a.40.2
hls-568-2 mp4 512x288 568k , avc1.66.30, mp4a.40.2
hls-568-3 mp4 512x288 568k , avc1.66.30, mp4a.40.2
http-740 mp4 640x360 740k
rtmp-796-0 flv 640x360 796k
rtmp-796-1 flv 640x360 796k
hls-800 mp4 640x360 800k
hls-845-0 mp4 640x360 845k , avc1.66.30, mp4a.40.2
hls-845-1 mp4 640x360 845k , avc1.66.30, mp4a.40.2
hls-845-2 mp4 640x360 845k , avc1.66.30, mp4a.40.2
hls-845-3 mp4 640x360 845k , avc1.66.30, mp4a.40.2
hls-1200 mp4 768x432 1200k
rtmp-1296-0 flv 640x360 1296k
rtmp-1296-1 flv 640x360 1296k
hls-1307-0 mp4 768x432 1307k , avc1.77.30, mp4a.40.2
hls-1307-1 mp4 768x432 1307k , avc1.77.30, mp4a.40.2
hls-1307-2 mp4 768x432 1307k , avc1.77.30, mp4a.40.2
hls-1307-3 mp4 768x432 1307k , avc1.77.30, mp4a.40.2
hls-1800 mp4 960x540 1800k
hls-1931-0 mp4 960x540 1931k , avc1.77.30, mp4a.40.2
hls-1931-1 mp4 960x540 1931k , avc1.77.30, mp4a.40.2
hls-1931-2 mp4 960x540 1931k , avc1.77.30, mp4a.40.2
hls-1931-3 mp4 960x540 1931k , avc1.77.30, mp4a.40.2
hls-2683-0 mp4 1024x576 2683k , avc1.77.30, mp4a.40.2
hls-2683-1 mp4 1024x576 2683k , avc1.77.30, mp4a.40.2
hls-2683-2 mp4 1024x576 2683k , avc1.77.30, mp4a.40.2
hls-2683-3 mp4 1024x576 2683k , avc1.77.30, mp4a.40.2
hls-3719-0 mp4 1280x720 3719k , avc1.77.30, mp4a.40.2
hls-3719-1 mp4 1280x720 3719k , avc1.77.30, mp4a.40.2
hls-3719-2 mp4 1280x720 3719k , avc1.77.30, mp4a.40.2
hls-3719-3 mp4 1280x720 3719k , avc1.77.30, mp4a.40.2 (best)
Description of your issue, suggested solution and other information
A lot of videos come in different resolution with often individual format codes for each clip.
I thought it would be neat, to be able to tell Youtube-DL:
"I want the download to go via HLS/RTMP/HTTP protocol."
"I want the best resolution possible within that protocol (often, but not always 1280x720)"
And: "Pick the first/second/third etc. available format within the HLS-best you have in that section."
In the example output it would be "hls-3719-0".
That would save a lot of time, since I wouldn't have to to youtube-dl -F on every clip you want to download and then wait for the format processing twice.
Additional information: There are also some clips that have another twist. Instead of one group of formats (group: "hls-3719-0" to "hls-3719-3") there might be two groups on one resolution.
Maybe something like "--prefer-protocol" for the protocol selection "--prefer-resolution" for the resolution" and "--prefer-edition" for the group number (use 0 as default). Maybe replace "prefer" by "use", I don't know. Just my ideas.