(Mar-24-2019, 05:33 PM)samsonite Wrote: Further info needs. Which command I've to add to download one single file .mp4 coming from this choice?Example will download in 720 quality:
import youtube_dl def my_hook(d): if d['status'] == 'finished': print('Done downloading ...') # bestvideo[height<=?1080]+bestaudio/best # bestvideo+bestaudio/best ydl_opts = { 'format': 'bestvideo[height<=?720]+bestaudio/best', 'outtmpl': '%(title)s.%(ext)s', 'noplaylist' : True, 'progress_hooks': [my_hook], } with youtube_dl.YoutubeDL(ydl_opts) as ydl: ydl.download(['https://www.youtube.com/watch?v=d8OI9FllKfg'])Same as command line.
youtube-dl -f 136 https://www.youtube.com/watch?v=d8OI9FllKfg