Tuesday, April 23, 2019

My youtube-dl configuration / useful options

Here's my youtube-dl configuration (details about where to place the config-file below are here).
Of course you can also use any of these options in the command-line, without creating a dedicated config-file.


###############################################################
# This writes the video-IDs of the videos that have been downloaded
# into a file called archive.txt. Subsequent runs of youtube-dl will
# check that file and will skip videos that have already been downloaded.
--download-archive archive.txt

# Download subtitles in English, German, French and Amharic (if available)
# Note that these refer to human-generated subtitles (for example if
# the video-creator wrote them).
--write-sub --sub-lang en,de,fr,am

# Download subtitles in English, German, French and Amharic (if available)
# Note that these refer to Youtube's auto-generated subtitles (which can
# be hit or miss, but it's better than nothing, especially for English).
--write-auto-sub --sub-lang en,de,fr,am

# Get the best video quality available, but only up to 1080p.
# (with 4K videos, you'll end up with HUGE files, which one may
# want to avoid
-f 'bestvideo[height<=1080]+bestaudio/best[height<=1080]'

###############################################################
When downloading a playlist, I find it convenient to have the files with the playlist-order in the filename, since that's the way I like to sort them. To change the filename-template, use the "-o" option. For example, if this is what I want the 3rd song's filename in my playlist to look like:
3_NiceVideo_VideoID.mp4
This command will accomplish that:
youtube-dl -o "%(playlist_index)s_%(title)s_%(id)s.%(ext)s" 
For more info on output-templates (the stuff behind the "-o", read more here). Just in case someone finds this useful: Here's a web-based subtitle-scraper for YouTube: https://www.diycaptions.com/ And in the unlikely case one would want to download comments from a video, I haven't found a way to do this through the command-line. But I found this web-based-commend-scraper which seems to work fine: http://ytcomments.klostermann.ca/

16 comments:

  1. Hey there, unfortunately the youtube scraper doesn't seem to work anymore, and is not supported by the developer... I wrote a similar script that does the same thing, hope this helps: https://seobots.io/bots/youtube-comment-scraper

    ReplyDelete
  2. i never know the use of adobe shadow until i saw this post. thank you for this! this is very helpful. smm panel

    ReplyDelete
  3. Hello, this weekend is good for me, since this time i am reading this enormous informative article here at my home. how to buy youtube views

    ReplyDelete
  4. This is my first time visit to your blog and I am very interested in the articles that you serve. Provide enough knowledge for me. Thank you for sharing useful and don't forget, keep sharing useful info: youtube to mp3

    ReplyDelete
  5. Thanks for the blog loaded with so many information. Stopping by your blog helped me to get what I was looking for. smm panel

    ReplyDelete
  6. I wish more authors of this type of content would take the time you did to research and write so well. I am very impressed with your vision and insight. Youtube to MP3 Converter Online

    ReplyDelete
  7. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info. youtube downloader

    ReplyDelete
  8. Wow, cool post. I'd like to write like this too - taking time and real hard work to make a great article... but I put things off too much and never seem to get started. Thanks though. buy youtube watch hours india

    ReplyDelete
  9. I found that site very usefull and this survey is very cirious, I ' ve never seen a blog that demand a survey for this actions, very curious... youtube watch hours buy

    ReplyDelete
  10. Wow, cool post. I’d like to write like this too – taking time and real hard work to make a great article… but I put things off too much and never seem to get started. Thanks though. buy instant youtube views

    ReplyDelete
  11. To make solid brands an advertiser needs scale and a nearness. smm panel

    ReplyDelete
  12. this is really nice to read..informative post is very good to read..thanks a lot! a course in miracles

    ReplyDelete
  13. Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. Youtube downloader

    ReplyDelete
  14. I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. a course in miracles

    ReplyDelete
  15. Are you a movie enthusiast? Would you like to watch videos on different platforms? If the answer is yes, then you must have very good and fast video converter software. best tool to convert youtube to mp3

    ReplyDelete
  16. I want to say thanks for beautiful blog sharing with us. Your blog really great resource to update my knowledge. youtube video to mp3 2020

    ReplyDelete