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/

28 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
  17. You can take your YouTube channel to the next level Today by promoting your videos to thousands of viewers. Buy YouTube Promotions today. It's fast, easy & affordable. buy youtube subscribers

    ReplyDelete
  18. You can take your YouTube channel to the next level Today by promoting your videos to thousands of viewers. Buy YouTube Promotions today. It's fast, easy & affordable. buy youtube subscribers

    ReplyDelete
  19. Many people want to know how to make money on YouTube videos. This is not surprising because YouTube is known and used in many households throughout the civilised world and is actually the third most used search engine in the world. In fact it gets enough video uploaded every three minutes to play non-stop for more than a week. That video is then watched in 39 countries and in 54 languages.There are different ways to make money with YouTube videos, and this article is about one of the easiest ways to do just that. Youtube

    ReplyDelete
  20. You have a few videos on YouTube, now what? Showcase your Web videos in style by customizing your YouTube channel. Youtube

    ReplyDelete
  21. There is not a great deal of difference in these players in terms of what they do. The MP4 Touch Screen Player, plays music, entertains you with videos and or movies, allow you to view pictures, play and record songs directly from the radio, take pictures and record motion videos, record messages as well as play a popular game.youtube to mp4

    ReplyDelete
  22. The down to earth approach of the essayist in this blog is commendable.
    giantlikes

    ReplyDelete
  23. I think this is an informative post and it is very beneficial and knowledgeable. Therefore, I would like to thank you for the endeavors that you have made in writing this article. All the content is absolutely well-researched. Thanks... Mark Lutchman

    ReplyDelete
  24. Hey what a brilliant post I have come across and believe me I have been searching out for this similar kind of post for past a week and hardly came across this. Thank you very much and will look for more postings from you. https://www.postinweb.com/ontiva-the-best-tool-for-youtube-converter/

    ReplyDelete
  25. In this particular article, you will see a summary, satisfy browse this post. youtube to mp4

    ReplyDelete
  26. Thanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info. postinweb.com

    ReplyDelete
  27. By hiring a professional YouTube marketing service, you can take advantage of marketing through videos. Video marketing is one of the best ways to position your business and brand name in the minds of the masses. YouTube offers you an amazing facility to introduce your business, products/services and most importantly your message, out to a large number of people on the Internet through video sharing. https://d-addicts.com/how-to-download-music-from-youtube-for-free/2020/

    ReplyDelete
  28. You have made an exceptional appearing. I will in all probability tunnel it and for the most part recommend to my sidekicks. I am certain they will be benefitted from this site. go here

    ReplyDelete