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

youtube dl download with specific resolution programmatically #7937

Closed
moiseyo opened this issue Dec 21, 2015 · 1 comment
Closed

youtube dl download with specific resolution programmatically #7937

moiseyo opened this issue Dec 21, 2015 · 1 comment

Comments

@moiseyo
Copy link

@moiseyo moiseyo commented Dec 21, 2015

I'm trying to set best restitution to download from python code
ydl = youtube_dl.YoutubeDL({'outtmpl': '%s/%%(title)s.%%(ext)s -f bestvideo+bestaudio '%(out_dir),'f':' bestvideo+bestaudio'})

i know that bestvideo+bestaudio can be using command
youtube-dl -F

I'd like to make complete code from python

Best Regards

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Dec 21, 2015

Use the 'format' key:

import youtube_dl

out_dir = '.'
ydl = youtube_dl.YoutubeDL({'outtmpl': '%s/%%(title)s.%%(ext)s' % out_dir, 'format':' bestvideo+bestaudio'})
ydl.extract_info('test:youtube')

The list of all the options is in YoutubeDL.py.

@jaimeMF jaimeMF closed this Dec 21, 2015
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.