Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
youtube-dl doesn't download youtube videos in proper resolution and format #20887
Comments
|
Read FAQ on what does |
|
Hi, is there a way to merge all of these similar service requests: "#20831", "#20832", "#20887", and "#20888" into one service request? You provided me with the "--format "best[ext=mp4][height<=720]" command to use to download and convert files as 720p mp4 a while ago when I wanted help with that, because I didn't know which command to use. Everything was working fine and youtube-dl was able to download videos properly and convert them in that format until recently. Can you please tell me what command to use for youtube-dl to download videos in 720p (in this case, in the available 720x480 resolution), and mux the available streams using ffmpeg into an MP4 file? So far, I've only found out how to get youtube-dl to download the videos in the correct 720x480 available resolution, but it saves them as MKV files, and I want to find out how to get it to use ffmpeg to convert them to MP4 files. I'd really appreciate it, since the faq is very confusting for average computer users. Youtube-dl is a very good program by the way, once people know how to use it. Thank you. |
|
Use the -F param and see which formats are available for your video, then choose between availables |
|
When using the --list-formats command, it says that there's a 720x480 MP4 video stream available. Up until recently, I was using the "--format "best[ext=mp4][height<=720]" command that dstftw gave me a while ago, and it was downloading and converting 720p mp4 files just fine, but now it isn't working anymore, it's only downloading 720x480 MKV files, or 540x360 and 480x320 MP4 files for these links: "https://www.youtube.com/watch?v=ezopeXwUukQ", "https://www.youtube.com/watch?v=1WjxBLgsQy8", and "https://www.youtube.com/watch?v=0DdPkt2QOKk". Other youtube downloaders can download and convert these files as 720x480 MP4 files just fine. What command do I use to get youtube-dl to download the 720x480 video stream, merge it with an m4a audio stream, and save it as an MP4 instead of an MKV? I'd appreciate some help if anyone knows how to do that. Let me know if you need more information. Thanks. C:\Users\Computer User\Music\youtube-dl and libav 11.3 files cache and downloads>youtube-dl --list-formats https://www.youtube.com/watch?v=ezopeXwUukQ C:\Users\Computer User\Music\youtube-dl and libav 11.3 files cache and downloads> C:\Users\Computer User\Music\youtube-dl and libav 11.3 files cache and downloads>youtube-dl -v --config-location "C:\Program Files (x86)\Internet\youtube-dl and libav 11.3 files" C:\Users\Computer User\Music\youtube-dl and libav 11.3 files cache and downloads> |
|
That's your answer: 720x480 means width = 720, height = 480; "--format "best[ext=mp4][height<=720]" just fallback to get the best stream available below your criteria (format 135 = 480p) |
|
I really appreciate your help, but that's not the issue. I know that 720x480 means 480p (width 720, height 480), and that 720p would be 1280x720 (width 1280, height 720), for example. Using the "--format "best[ext=mp4][height<=720]" command, youtube-dl only downloads 540x360 or 480x320 MP4 files, but it used to be able to download a 720x480 MP4 file (if 720p wasn't available). Using a different command, youtube-dl can download the available 720x480 file, but it only outputs it as an MKV instead of MP4 file with that resolution. What youtube-dl's currently doing is either downloading a 720x480 file as an MKV, or only 540x360 or 480x320 as MP4 files. It looks like it might be using this stream: "244 webm 720x480 480p 643k , vp9, 30fps, video only, 29.90MiB", instead of this one: "135 mp4 720x480 480p 1004k , avc1.4d401e, 30fps, video only, 34.16MiB". Do you know which command to use to get youtube-dl to download, convert, and mux either 720p (if it's available) or the next best available quality (which in this case is 480p), but output it as an MP4 instead of MKV file? Thanks. |
|
You have plenty of examples about format selection in https://github.com/ytdl-org/youtube-dl#format-selection , probably good to use the precedence operator '/' for controlled fallbacks. You may force what you want in your specific video as: -f 135+140 --merge-output-format mp4 |
|
Ok, thanks, but youtube-dl used to do all of that automatically and download and format videos in the correct resolutions with the command I was using. |
Hi, when trying to download these links: "https://www.youtube.com/watch?v=ezopeXwUukQ", "https://www.youtube.com/watch?v=1WjxBLgsQy8", and "https://www.youtube.com/watch?v=0DdPkt2QOKk" using the "-v --ignore-errors --format "best[ext=mp4][height<=720]" -o %(title)s.%(ext)s --cache-dir "C:\Users\Computer User\Music\youtube-dl and libav 11.3 files cache and downloads" --batch-file Files.txt" command, youtube-dl downloads them as 540x360 and 480x320 mp4, or 720x480 mkv files, but other youtube downloaders are able to download and convert those same files from the available streams as 720x480 mp4 files. It seems that issue is that youtube-dl isn't able to download and convert the proper available streams and merge them to create mp4 files, so is there a way to fix that? If other youtube downloaders can do that, then why can't youtube-dl? Thanks.