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

Cannot download the best quality format of a particular file extension with -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]' #11986

Closed
springsin0 opened this issue Feb 6, 2017 · 2 comments

Comments

@springsin0
Copy link

@springsin0 springsin0 commented Feb 6, 2017

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.02.04.1. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2017.02.04.1

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


Description of your issue, suggested solution and other information

I want to download this file "https://www.youtube.com/watch?v=-Ng9hpqFlm89hpq", and it has these formats.

youtube-dl --proxy "http://localhost:3715" -F https://www.youtube.com/watch?v=-Ng9hpqFlm89hpq
[youtube] -Ng9hpqFlm8: Downloading webpage
[youtube] -Ng9hpqFlm8: Downloading video info webpage
[youtube] -Ng9hpqFlm8: Extracting video information
[youtube] -Ng9hpqFlm8: Downloading MPD manifest
[info] Available formats for -Ng9hpqFlm8:
format code  extension  resolution note
249          webm       audio only DASH audio   50k , opus @ 50k, 36.88KiB
250          webm       audio only DASH audio   58k , opus @ 70k, 43.25KiB
171          webm       audio only DASH audio  103k , vorbis@128k, 75.71KiB
251          webm       audio only DASH audio  107k , opus @160k, 79.32KiB
140          m4a        audio only DASH audio  128k , m4a_dash container, mp4a.4
0.2@128k (44100Hz)
278          webm       256x144    144p   91k , webm container, vp9, 30fps, vide
o only, 66.58KiB
160          mp4        256x144    DASH video  112k , avc1.4d400c, 30fps, video
only
242          webm       426x240    240p  112k , vp9, 30fps, video only, 82.35KiB

243          webm       640x360    360p  219k , vp9, 30fps, video only, 160.28Ki
B
134          mp4        640x360    DASH video  237k , avc1.4d401e, 30fps, video
only
133          mp4        426x240    DASH video  246k , avc1.4d4015, 30fps, video
only
244          webm       854x480    480p  373k , vp9, 30fps, video only, 272.60Ki
B
135          mp4        854x480    DASH video  505k , avc1.4d401f, 30fps, video
only
247          webm       1280x720   720p  843k , vp9, 30fps, video only, 615.20Ki
B
136          mp4        1280x720   DASH video 1157k , avc1.4d401f, 30fps, video
only
137          mp4        1920x1080  DASH video 2247k , avc1.640028, 30fps, video
only
248          webm       1920x1080  1080p 2316k , vp9, 30fps, video only, 1.65MiB

17           3gp        176x144    small , mp4v.20.3,  mp4a.40.2@ 24k
36           3gp        320x180    small , mp4v.20.3,  mp4a.40.2
43           webm       640x360    medium , vp8.0,  vorbis@128k
18           mp4        640x360    medium , avc1.42001E,  mp4a.40.2@ 96k
22           mp4        1280x720   hd720 , avc1.64001F,  mp4a.40.2@192k (best)

The following command with -f 137+140 works well.

youtube-dl --proxy "http://localhost:3715" -f 137+140 https://www.youtube.com/watch?v=-Ng9hpqFlm8
[youtube] -Ng9hpqFlm8: Downloading webpage
[youtube] -Ng9hpqFlm8: Downloading video info webpage
[youtube] -Ng9hpqFlm8: Extracting video information
[youtube] -Ng9hpqFlm8: Downloading MPD manifest
[dashsegments] Total fragments: 3
[download] Destination: 乃木坂46「齋藤飛鳥_クリエイターパソコン」篇 6秒 _ マウ
スコンピューター--Ng9hpqFlm8.f137.mp4
[download] 100% of 1.39MiB in 00:11
[dashsegments] Total fragments: 2
[download] Destination: 乃木坂46「齋藤飛鳥_クリエイターパソコン」篇 6秒 _ マウ
スコンピューター--Ng9hpqFlm8.f140.m4a
[download] 100% of 94.94KiB in 00:05
[ffmpeg] Merging formats into "乃木坂46「齋藤飛鳥_クリエイターパソコン」篇 6秒
_ マウスコンピューター--Ng9hpqFlm8.mp4"
Deleting original file 乃木坂46「齋藤飛鳥_クリエイターパソコン」篇 6秒 _ マウス
コンピューター--Ng9hpqFlm8.f137.mp4 (pass -k to keep)
Deleting original file 乃木坂46「齋藤飛鳥_クリエイターパソコン」篇 6秒 _ マウス
コンピューター--Ng9hpqFlm8.f140.m4a (pass -k to keep)

But with -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]' cannot correctly download the file, it prompts ERROR: requested format not available.

youtube-dl --proxy "http://localhost:3715" -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]' https://www.youtube.com/watch?v=-Ng9hpqFlm8 -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--proxy', 'http://localhost:3715', '-f', "'bestvide
o[ext=mp4]+bestaudio[ext=m4a]'", 'https://www.youtube.com/watch?v=-Ng9hpqFlm8',
'-v']
[debug] Encodings: locale cp936, fs mbcs, out cp936, pref cp936
[debug] youtube-dl version 2017.02.04.1
[debug] Python version 3.4.4 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-83195-ge371f03, ffprobe N-83195-ge371f03
[debug] Proxy map: {'http': 'http://localhost:3715', 'https': 'http://localhost:
3715'}
[youtube] -Ng9hpqFlm8: Downloading webpage
[youtube] -Ng9hpqFlm8: Downloading video info webpage
[youtube] -Ng9hpqFlm8: Extracting video information
[youtube] -Ng9hpqFlm8: Downloading MPD manifest
ERROR: requested format not available
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwby3zsth\bu
ild\youtube_dl\YoutubeDL.py", line 707, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwby3zsth\bu
ild\youtube_dl\YoutubeDL.py", line 753, in process_ie_result
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpwby3zsth\bu
ild\youtube_dl\YoutubeDL.py", line 1432, in process_video_result
youtube_dl.utils.ExtractorError: requested format not available
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Feb 6, 2017

IIRC you need to use double quotes on Windows

@springsin0
Copy link
Author

@springsin0 springsin0 commented Feb 6, 2017

@yan12125 Thank you. It worked. With double quotes or no quotes.

@springsin0 springsin0 closed this Feb 6, 2017
@springsin0 springsin0 reopened this Feb 6, 2017
@springsin0 springsin0 closed this Feb 6, 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.