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

Can I automatically download 1080p as best from youtube? #3165

Closed
Jofsey opened this issue Jun 27, 2014 · 4 comments
Closed

Can I automatically download 1080p as best from youtube? #3165

Jofsey opened this issue Jun 27, 2014 · 4 comments

Comments

@Jofsey
Copy link

@Jofsey Jofsey commented Jun 27, 2014

There is an arbitrary youtube video url. I want to download it in the best quality as it possible (as video+autio to a single file).

I know only the manual way to do it

  1. youtube-dl -F <url> to get available formats
  2. download by
    1. youtube-dl -f <video_format>+<audio_format> <url> in case of >=1080p (DASH)
    2. youtube-dl -f best <url> in another case.

Can I do it automatically by a single command?

@ghost
Copy link

@ghost ghost commented Jun 27, 2014

To download best video and audio, you can use this command

youtube-dl ksP-KooXB4o -f bestvideo+bestaudio --youtube-include-dash-manifest
@Jofsey
Copy link
Author

@Jofsey Jofsey commented Jun 27, 2014

Thanks. It looks like what I'm looking for.
But it doesn't work for some old videos which have bestvideo presented only as webm.

$ youtube-dl UaW6zYQDQE -f bestvideo+bestaudio --youtube-include-dash-manifest -v
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['UaW6zYQDQE', '-f', 'bestvideo+bestaudio', '--youtube-include-dash-manifest', '-v']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.06.19
[debug] Python version 3.4.1 - Linux-3.15.1-1-ARCH-x86_64-with-arch
[debug] Proxy map: {}
WARNING: Falling back to youtube search for  UaW6zYQDQE . Set --default-search to "auto" to suppress this warning.
[youtube:search] query "UaW6zYQDQE": Downloading page 1
[download] Downloading playlist: UaW6zYQDQE
[youtube:search] playlist UaW6zYQDQE: Collected 1 video ids (downloading 1 of them)
[download] Downloading video #1 of 1
[youtube] Setting language
[youtube] -UaW6zYQDQE: Downloading webpage
[youtube] -UaW6zYQDQE: Downloading video info webpage
[youtube] -UaW6zYQDQE: Extracting video information
[youtube] -UaW6zYQDQE: Downloading DASH manifest
[download] Destination: Mariko Takahashi's Fitness Video--UaW6zYQDQE.f243.webm
[download] 100% of 6.41MiB in 00:00
[download] Destination: Mariko Takahashi's Fitness Video--UaW6zYQDQE.f141.m4a
[download] 100% of 4.77MiB in 00:00
[ffmpeg] Merging formats into "Mariko Takahashi's Fitness Video--UaW6zYQDQE.webm"
[debug] ffmpeg command line: ffmpeg -y -i 'Mariko Takahashi'"'"'s Fitness Video--UaW6zYQDQE.f243.webm' -i 'Mariko Takahashi'"'"'s Fitness Video--UaW6zYQDQE.f141.m4a' -c copy 'Mariko Takahashi'"'"'s Fitness Video--UaW6zYQDQE.webm'
ERROR: Conversion failed!
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 1084, in post_process
    keep_video_wish, new_info = pp.run(info)
  File "/usr/lib/python3.4/site-packages/youtube_dl/postprocessor/ffmpeg.py", line 488, in run
    self.run_ffmpeg_multiple_files(info['__files_to_merge'], filename, args)
  File "/usr/lib/python3.4/site-packages/youtube_dl/postprocessor/ffmpeg.py", line 62, in run_ffmpeg_multiple_files
    raise FFmpegPostProcessorError(msg)
youtube_dl.postprocessor.ffmpeg.FFmpegPostProcessorError: Conversion failed!
$ youtube-dl UaW6zYQDQE -F                                                                                                                                               
171         webm      audio only  DASH audio , audio@ 48k (worst)
140         m4a       audio only  DASH audio , audio@128k
160         mp4       144p        DASH video , video only
242         webm      240p        DASH video , video only
133         mp4       240p        DASH video , video only
243         webm      360p        DASH video , video only
17          3gp       176x144     
36          3gp       320x240     
5           flv       400x240     
43          webm      640x360     
18          mp4       640x360     (best)
@Jofsey
Copy link
Author

@Jofsey Jofsey commented Jun 27, 2014

My current workaround is

youtube-dl -f 138+bestaudio/264+bestaudio/137+bestaudio/best --youtube-include-dash-manifest
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jul 9, 2016

Fixed long time ago.

@dstftw dstftw closed this Jul 9, 2016
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.