Questions tagged [youtube-dl]

youtube-dl is an opensource, small command-line program, written in Python, to download videos from YouTube.com and other sites.

youtube-dl is a small command-line program to download videos from YouTube.com and a few more sites. It requires the Python interpreter, version 2.6, 2.7, or 3.3+, and it is not platform specific. It should work on your Unix box, on Windows or on Mac OS X. It is released to the public domain, which means you can modify it, redistribute it or use it however you like.

You can download it with pip, from the download site or using git. In this link you can also find documentation, and some other options. Github repository is available via this link.

Note that questions about installing and using youtube-dl are off-topic for Stack Overflow. They may be more appropriate on SuperUser.

1035 questions
9
votes
1 answer

Extract just the audio link from a youtube video without converting

I know there are hundreds of sites to convert youtube video to mp3. Most of them do it by first downloading the video and then converting it to mp3(or any other audio format) on their server using youtube-dl, ffmpeg or similar programs. What I want…
MR-4O4
  • 311
  • 1
  • 2
  • 11
9
votes
5 answers

youtube-dl download location

I am trying to save youtube videos as MP3's in my downloads folder. However, this ends up saving files in the same directory as youtube-dl. youtube-dl --extract-audio --audio-format mp3 --audio-quality=320k https://www.youtube.com/watch?v=VIDEO_ID…
Josue Espinosa
  • 5,009
  • 16
  • 47
  • 81
8
votes
1 answer

How to download MPEG Dash (mpd file) using youtube-dl when headers are requested and getting HTTP Error 403

I've used Chrome developer tools to inspect network activity and filter the mpd file. I've get the URL of the mpd with the context menu copy link address. But when I've assembled the youtube-dl command line it get HTTP Error 403: Forbidden. So I've…
Telesforo X
  • 181
  • 1
  • 1
  • 7
8
votes
2 answers

How do I use youtube-dl's --add-header option?

I'm trying to add a custom header using youtube-dl, a popular video downloader with command line interface. I'm using PowerShell (or CMD) on Windows 10. The official documentation says like the following but I can't seem to use it…
user8491363
  • 2,924
  • 5
  • 19
  • 28
8
votes
1 answer

python retrieve automatic captions with youtube_dl and transform to transcript

The automatic english captions extracted from youtube contains not the information in a readable form and duplicated text information. welcome<00:00:01.790> my<00:00:02.790> name<00:00:02.820> is<00:00:03.210>
wuz
  • 483
  • 3
  • 16
8
votes
1 answer

Is there a way to use youtube-dl in async

I have an application where I use zmq with asyncio to communicate with the clients who have the ability to download a video with youtube-dl to the server. I tried adding await to youtube_dl's download function but it gave me an error since it was…
Stam Kaly
  • 668
  • 1
  • 11
  • 26
8
votes
2 answers

youtube-dl taking only first letter of URL?

StackOverflow! I am having some problems with youtube-dl. I had this working recently, but I made some changes to it, and it now refuses to work. Here is my code: import youtube_dl import os class InvalidURL(Exception): pass class…
8
votes
1 answer

Problems with extracted MP3 using Youtube-dl on Windows

I subscribe to various free music channels on YouTube and I'm looking to embed youtube-dl.exe in a .net program to monitor the channels and download and convert the songs as they are posted to the channels. I've gotten that part of the program…
Chris
  • 341
  • 2
  • 12
8
votes
2 answers

Is "escapeshellarg" safe enough?

Scenario: user enters video url php downloads video with exec( "youtube-dl " . escapeshellarg($url) ); Question: Is it safe enough? Thanks!
Arūnas Smaliukas
  • 3,231
  • 6
  • 27
  • 46
8
votes
1 answer

Use youtube-dl to download new videos from channel

I need to use youtube-dl to download new videos from a channel, but remember not to download them next time and only download videos that have not been downloaded yet. How can I do so?
user2705775
  • 461
  • 1
  • 7
  • 14
8
votes
4 answers

How to extract audio with youtube-dl on Windows

I want to extract audio from a video downloaded with youtube-dl on Windows. I got youtube-dl working, but am unable to extract the audio. This problem is caused due to not having the correct audio codes installed. When I try to extract audio it…
FlyingNimbus
  • 453
  • 2
  • 5
  • 11
7
votes
2 answers

How to get filename of file downloaded with Youtube-dl

I am using youtube-dl with a flask app to download a file and return the file. When I download the filename is changed slightly from the video title. Looking through the source code I thought I found it with the function encodeFilename in utils.py.…
GAP2002
  • 870
  • 4
  • 20
7
votes
1 answer

Is there a way to download video while keeping their chapters metadata?

I've used many video downloaders before: atube catcher, 4k downloader, jDownloader, and currently using youtube-dl. I can't download videos, this for example, while still keeping their online chapters intact, like part1 is "intro" lasting from 00:00…
7
votes
4 answers

Convert WebVTT file from Youtube to plain text

I am downloading WebVTT files from youtube using youtube-dl. A typical file looks like this: WEBVTT Kind: captions Language: en 00:00:00.730 --> 00:00:05.200 align:start position:0% [Applause] 00:00:05.200 --> 00:00:05.210 align:start…
user1029296
  • 609
  • 8
  • 17
7
votes
2 answers

Get video information from a list of playlist with youtube-dl

I'm tryng to get some informations from a list of playlists in youtube with youtube-dl. I've written this code but what it takes is not the video's informations but the playlist informations (e.g. the playlist title instead of the video title in the…
Lara M.
  • 855
  • 2
  • 10
  • 23