0

If I use yt-dlp to download a video from YouTube, it becomes .webm.

If I use yt-dlp to download a video as audio from YouTube, it becomes .opus.

However, yt-dlp --get-filename (which I have to run in my situation) always claims that the file will have the file extension .webm, even though .opus is actually created when you download only the audio (-f ba --extract-audio).

This means that I cannot accurately know whether the file was downloaded, so my script just loops forever, downloading it over and over again.

Is this a bug in yt-dlp? I've asked them about it in their chat room but never received any response. Unable to ask on Github.

PS: Also, even though it's called "--get-filename", it actually seems to return/output the full file path -- not just the file name itself.

Beckem
  • 1
  • 1
    Have you tried reading the documentation? https://github.com/yt-dlp/yt-dlp#outtmpl-postprocess-note – tkausl Jan 15 '23 at 21:31
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 15 '23 at 21:55
  • @tkausl No, I just came up with "--get-filename" by pure guesswork... Obviously I have read the documentation. Why are there two different commands to do the same thing where one isn't the right one? – Beckem Jan 15 '23 at 22:12
  • There are two commands that do different things, both being correct. Just because one works for you and one doesn't, doesn't mean one of them is incorrect. – tkausl Jan 15 '23 at 22:14
  • @tkausl But the one I found (and obviously didn't look for a different one) gives the wrong answer? (Yours works.) – Beckem Jan 15 '23 at 22:16
  • It gives the wrong answer to __your__ problem because __your__ problem requires the other command. The behavior is documented. – tkausl Jan 15 '23 at 22:17
  • You are reading a lot into @tkausl comment. He is stating facts without attacking you. You are behaving inappropriately for this site. I suggest deleting your comment and counting to 10. – Blind Spots Jan 16 '23 at 19:39

0 Answers0