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

Custom header needed to download 60fps videos in “unknown_video” formats #4079

Closed
haasn opened this issue Nov 1, 2014 · 2 comments
Closed

Comments

@haasn
Copy link
Contributor

@haasn haasn commented Nov 1, 2014

Example video: http://youtu.be/-eVwgzBv7Ao

youtube-dl -F

[youtube] Setting language
[youtube] Confirming age
[youtube] -eVwgzBv7Ao: Downloading webpage
[youtube] -eVwgzBv7Ao: Downloading video info webpage
[youtube] -eVwgzBv7Ao: Extracting video information
[youtube] -eVwgzBv7Ao: Downloading DASH manifest
[info] Available formats for -eVwgzBv7Ao:
format code extension resolution  note 
139         m4a       audio only  DASH audio   49k , audio@ 48k (22050Hz), 1.24MiB (worst)
140         m4a       audio only  DASH audio  129k , audio@128k (44100Hz), 3.30MiB
141         m4a       audio only  DASH audio  255k , audio@256k (44100Hz), 6.56MiB
160         mp4       230x144     DASH video  112k , video only, 2.79MiB
133         mp4       384x240     DASH video  253k , video only, 6.29MiB
134         mp4       576x360     DASH video  607k , video only, 13.75MiB
135         mp4       768x480     DASH video 1107k , video only, 23.56MiB
136         mp4       1152x720    DASH video 2205k , video only, 38.90MiB
137         mp4       1728x1080   DASH video 4133k , video only, 64.20MiB
264         mp4       1920x1440   DASH video 5520k , video only, 131.69MiB
298         unknown_video?x1152      2345k , 50.54MiB
299         unknown_video?x1728      3704k , 81.64MiB
17          3gp       176x144     
36          3gp       320x240     
5           flv       400x240     
43          webm      640x360     
18          mp4       640x360     
22          mp4       1280x720    (best)

However, downloading the -f 298 and -f 299 options (which are 60fps) results in this error:

youtube-dl -f 299

[youtube] Setting language
[youtube] Confirming age
[youtube] -eVwgzBv7Ao: Downloading webpage
[youtube] -eVwgzBv7Ao: Downloading video info webpage
[youtube] -eVwgzBv7Ao: Extracting video information
[youtube] -eVwgzBv7Ao: Downloading DASH manifest
ERROR: requested format not available

The way to work around it is to add a custom “accept” header, as follows:

youtube-dl -f 299 --add-header "accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8"

[youtube] Setting language
[youtube] Confirming age
[youtube] -eVwgzBv7Ao: Downloading webpage
[youtube] -eVwgzBv7Ao: Downloading video info webpage
[youtube] -eVwgzBv7Ao: Extracting video information
[youtube] -eVwgzBv7Ao: Downloading DASH manifest
[download] Destination: -eVwgzBv7Ao.unknown_video
[download] 100% of 81.64MiB in 01:03

This header was just copied from the headers chrome/firefox send. It might me useful to make them default.

@haasn haasn changed the title Custom header needed to download 60fps videos in “unknown_format” formats Custom header needed to download 60fps videos in “unknown_video” formats Nov 1, 2014
@phihag
Copy link
Contributor

@phihag phihag commented Nov 1, 2014

The download and name works fine for me with the current version of youtube-dl. I suspect that you are running an outdated version. What output do you get when you add the -v flag?

@haasn
Copy link
Contributor Author

@haasn haasn commented Nov 1, 2014

Oh, that was with version 2014.10.15. I upgraded to 2014.10.30 and it works out of the box now.

@haasn haasn closed this Nov 1, 2014
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.