{"id":1482,"date":"2022-05-24T23:39:00","date_gmt":"2022-05-24T23:39:00","guid":{"rendered":"https:\/\/www.ridiculously-simple.com\/?p=1482"},"modified":"2024-09-19T14:44:22","modified_gmt":"2024-09-19T14:44:22","slug":"downloading-video-from-youtube","status":"publish","type":"post","link":"https:\/\/www.voodoo.business\/blog\/2022\/05\/24\/downloading-video-from-youtube\/","title":{"rendered":"Downloading video from youtube"},"content":{"rendered":"\n<p>This might sound complicated, but youtube videos come in many shapes, many of them have either video only, or audio only !<\/p>\n\n\n\n<p>the best way to get a full resolution video is to download then combine video and audio !<\/p>\n\n\n\n<p>But before we go there, youtube throttles the speed you download videos at ! so youtube-dl needs patching, an alternative would be yt-dlp (<a href=\"https:\/\/github.com\/yt-dlp\/yt-dlp#installation\">See here<\/a>)<\/p>\n\n\n\n<p>The easier way to install would be<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt install yt-dlp<\/pre>\n\n\n\n<p>Now, if you insist on pip, you can do the following<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install python3-pip\n\npython3 -m pip install --force-reinstall https:\/\/github.com\/yt-dlp\/yt-dlp\/archive\/master.tar.gz<\/code><\/pre>\n\n\n\n<p>Now, let us try downloading a video\/audio<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">youtube-dl -F https:\/\/www.youtube.com\/watch?v=mUvrLxaSolc<\/pre>\n\n\n\n<p>The line above will show you a bunch of options and their IDs, what you need to do now is to download the ones you need with a command such as <\/p>\n\n\n\n<p>youtube-dl -f 270 https:\/\/www.youtube.com\/watch?v=mUvrLxaSolc<\/p>\n\n\n\n<p>Now, to combine them (Audio and video) without re-encoding&#8230;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ffmpeg -i ao.webm -i vo.webm -c:v copy -c:a copy output.webm<\/pre>\n\n\n\n<p>But remember when you download, <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Only VP8 or VP9 or AV1 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM.<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">If you have installed via pip3<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">\/usr\/local\/bin\/yt-dlp ...<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This might sound complicated, but youtube videos come in many shapes, many of them have either video only, or audio only ! the best way to get a full resolution video is to download then combine video and audio ! But before we go there, youtube throttles the speed you download videos at ! so [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,26,137,133,6,16,134],"tags":[131,42,130,128,129],"class_list":["post-1482","post","type-post","status-publish","format-standard","hentry","category-audio","category-encoding-decoding","category-ffmpeg","category-internet-2","category-multimedia","category-video","category-youtube","tag-combine","tag-convert","tag-lossless","tag-webm","tag-youtube"],"_links":{"self":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/1482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/comments?post=1482"}],"version-history":[{"count":9,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/1482\/revisions"}],"predecessor-version":[{"id":3940,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/1482\/revisions\/3940"}],"wp:attachment":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/media?parent=1482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/categories?post=1482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/tags?post=1482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}