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

Format selection with "tbr" is not working #12199

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

Format selection with "tbr" is not working #12199

fbis251 opened this issue Feb 20, 2017 · 1 comment
Labels

Comments

@fbis251
Copy link

@fbis251 fbis251 commented Feb 20, 2017

  • I've verified and I assure that I'm running youtube-dl 2017.02.17
  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Bug report (encountered problems with youtube-dl)

Description

Format selection with "tbr" is not working

It appears that selection of videos via tbr is broken. I have been testing this with a few youtube videos and it doesn't appear to be specific to a single video failing.

From the readme: "You can combine format filters, so -f "[height <=? 720][tbr>500]" selects up to 720p videos (or videos where the height is not known) with a bitrate of at least 500 KBit/s."

If I attempt to use that specifier an error is returned: "requested format not available"

youtube-dl -v -f "[height <=? 720][tbr>500]" 'https://www.youtube.com/watch?v=s6zR2T9vn2c'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-f', '[height <=? 720][tbr>500]', 'https://www.youtube.com/watch?v=s6zR2T9vn2c']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.02.17
[debug] Python version 3.6.0 - Linux-4.9.9-1-ARCH-x86_64-with-arch
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] s6zR2T9vn2c: Downloading webpage
[youtube] s6zR2T9vn2c: Downloading video info webpage
[youtube] s6zR2T9vn2c: Extracting video information
[youtube] s6zR2T9vn2c: Downloading MPD manifest
ERROR: requested format not available
Traceback (most recent call last):
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 707, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 753, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 1432, in process_video_result
    expected=True)
youtube_dl.utils.ExtractorError: requested format not available

When I checked out the output of --print-json there are many entries with non-null tbr values, the example below should be a candidate for a valid video

{
  "ext": "webm",
  "height": 676,
  "format_note": "DASH video",
  "vcodec": "vp9",
  "preference": -40,
  "format_id": "247",
  "url": "https://r5---sn-a5meknek.googlevideo.com/videoplayback?id=b3acd1d93f6f9f67&itag=247&source=youtube&requiressl=yes&ms=au&mv=m&pl=15&mn=sn-a5meknek&mm=31&initcwndbps=1070000&ratebypass=yes&mime=video/webm&gir=yes&clen=44224983&lmt=1473766897392267&dur=340.215&signature=1D0AEA30112C1B93005CD6F936D666A66E165B91.9846AEF83A6F5EDD2A35830A8C899B3210FC1A6C&mt=1487621794&key=dg_yt0&upn=Eu5vMmMF2CU&beids=%5B9452306%5D&ip=172.113.216.37&ipbits=0&expire=1487643488&sparams=ip,ipbits,expire,id,itag,source,requiressl,ms,mv,pl,mn,mm,initcwndbps,ratebypass,mime,gir,clen,lmt,dur",
  "manifest_url": "https://manifest.googlevideo.com/api/manifest/dash/as/fmp4_audio_clear%2Cwebm_audio_clear%2Cwebm2_audio_clear%2Cfmp4_sd_hd_clear%2Cwebm2_sd_hd_clear/signature/100ABB18C0B24A833DA07A6D5DF7A3668AF7F140.8CFA92FC709C865DA3C4DD371030DF95E8D23845/ms/au/mv/m/pl/15/mt/1487621794/playback_host/r5---sn-a5meknek.googlevideo.com/mn/sn-a5meknek/mm/31/key/yt6/source/youtube/id/o-AKsJME6Arb50XbrkZBzomPG0dnbwZ7LWj-EPu1Ghj36g/requiressl/yes/itag/0/ip/172.113.216.37/expire/1487643488/ipbits/0/initcwndbps/1070000/upn/Eu5vMmMF2CU/sparams/as%2Chfr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cplayback_host%2Crequiressl%2Csource%2Cexpire/beids/%5B9452306%5D/hfr/1",
  "width": 1280,
  "tbr": 1754,
  "asr": null,
  "fps": 24,
  "language": null,
  "filesize": 44224983,
  "acodec": "none",
  "format": "247 - 1280x676 (DASH video)",
  "protocol": "https",
  "http_headers": {
    "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)",
    "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7",
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
    "Accept-Encoding": "gzip, deflate",
    "Accept-Language": "en-us,en;q=0.5"
  }
},
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 20, 2017

You are applying format selection to video+audio formats represented by a single file. No tbr meta data is provided for such formats by YouTube thus you are getting no requested format available error correctly.

@dstftw dstftw closed this Feb 20, 2017
@dstftw dstftw added the invalid label 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.