Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selecting formats with lowest bitrate and width <= 400 #12188

Closed
sant527 opened this issue Feb 20, 2017 · 1 comment
Closed

selecting formats with lowest bitrate and width <= 400 #12188

sant527 opened this issue Feb 20, 2017 · 1 comment

Comments

@sant527
Copy link

@sant527 sant527 commented Feb 20, 2017

I am trying download video from "http://www.cbsnews.com/videos/the-north-korean-threat"

youtube-dl -F "http://www.cbsnews.com/videos/the-north-korean-threat"
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-64-0     mp4        audio only   64k , mp4a.40.2
hls-64-1     mp4        audio only   64k , mp4a.40.2
hls-1        mp4        400x224       1k 
hls-110      mp4        400x224     110k 
http-150     mp4        400x224     150k 
hls-224-0    mp4        400x224     224k , avc1.42001e, mp4a.40.2
hls-224-1    mp4        400x224     224k , avc1.42001e, mp4a.40.2
http-240     mp4        400x224     240k 
hls-250      mp4        400x224     250k 
rtmp-364     flv        384x216     364k 
hls-364-0    mp4        400x224     364k , avc1.42001e, mp4a.40.2
hls-364-1    mp4        400x224     364k , avc1.42001e, mp4a.40.2
http-440     mp4        400x224     440k 
rtmp-496     flv        640x360     496k 
hls-500      mp4        512x288     500k 
hls-614-0    mp4        512x288     614k , avc1.42001e, mp4a.40.2
hls-614-1    mp4        512x288     614k , avc1.42001e, mp4a.40.2
http-740     mp4        640x360     740k 
rtmp-796     flv        640x360     796k 
hls-800      mp4        640x360     800k 
hls-914-0    mp4        640x360     914k , avc1.42001e, mp4a.40.2
hls-914-1    mp4        640x360     914k , avc1.42001e, mp4a.40.2
hls-914-2    mp4        640x360     914k , avc1.42001e, mp4a.40.2
hls-1200     mp4        768x432    1200k 
rtmp-1296    flv        640x360    1296k 
hls-1314-0   mp4        768x432    1314k , avc1.4d001f, mp4a.40.2
hls-1314-1   mp4        768x432    1314k , avc1.4d001f, mp4a.40.2
hls-1800     mp4        960x540    1800k 
hls-1914-0   mp4        960x540    1914k , avc1.4d001f, mp4a.40.2
hls-1914-1   mp4        960x540    1914k , avc1.4d001f, mp4a.40.2
rtmp-1928    flv        1280x720   1928k 
hls-3500     mp4        1280x720   3500k 
hls-3678-0   mp4        1280x720   3678k , avc1.4d001f, mp4a.40.2
hls-3678-1   mp4        1280x720   3678k , avc1.4d001f, mp4a.40.2
hls-5000     mp4        1920x1080  5000k 
hls-5178     mp4        1920x1080  5178k , avc1.4d001f, mp4a.40.2 (best)

now i am looking for downloading video with format whose width < 400

I tried

  1. -f "worst[width<=400]"
  2. -f "[width<=400]"
  3. -f "best[width<=400]"

All of them download "http-440 mp4 400x224 440k" format.

Logically i want the first video format with 400 to be selected. that will be "hls-1 mp4 400x224 1k "

List of formats with width <=400

hls-1 mp4 400x224 1k
hls-110 mp4 400x224 110k
http-150 mp4 400x224 150k
hls-224-0 mp4 400x224 224k , avc1.42001e, mp4a.40.2
hls-224-1 mp4 400x224 224k , avc1.42001e, mp4a.40.2
http-240 mp4 400x224 240k
hls-250 mp4 400x224 250k
rtmp-364 flv 384x216 364k
hls-364-0 mp4 400x224 364k , avc1.42001e, mp4a.40.2
hls-364-1 mp4 400x224 364k , avc1.42001e, mp4a.40.2
http-440 mp4 400x224 440k

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 20, 2017

Your first option does exactly what you want:

youtube-dl http://www.cbsnews.com/videos/the-north-korean-threat -f 'worst[width<=400]' --get-filename -o '%(format_id)s'
hls-1
@dstftw dstftw closed this Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.