1

I have installed ffprobe as well as added it to path and got this test file code:

import youtube_dl
import ffmpeg

ydl_opts = {
    'format': 'bestaudio/best',
    'outtmpl': "P:/DscMusic/testfile.wav",
    'noplaylist': True,
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'wav',
        'preferredquality': '192', }]
}

with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    ydl.download(['http://www.youtube.com/watch?v=BaW_jenozKc'])

print("Done")

I got the error like described in the title. So can anybody help me with this?

(Btw; I am going to use this for a discord.py Bot)

FileX
  • 773
  • 2
  • 7
  • 19
  • The error pretty much speaks for itself, the script cannot write to the specified location. – Łukasz Kwieciński Mar 19 '21 at 09:59
  • Are you sure you want to call your file "P:/DscMusic"? Maybe you have a folder of the same name. – Matthias Mar 19 '21 at 10:01
  • @Matthias, oh, thanks for that hint. Now another problem appears; "youtube_dl.utils.DownloadError: ERROR: ffprobe/avprobe and ffmpeg/avconv not found. Please install one." Sure, you can say, I have to download ffprobe but it doesn't work. I have downloaded it as well as added to path – FileX Mar 19 '21 at 10:16
  • Sorry, I can't help with that. I never worked with `youtube_dl`. I checked the documentation for my first comment, so that's why I could identify that problem. – Matthias Mar 19 '21 at 11:29
  • @FlexGames `ffprobe` writes nothing on disk, just infos and not conversions. You need `ffmpeg` for transcoding. Also, your setting 'preferredquality': '192' does not mean anything in `wav` format, because it's lossless and not lossy. Are you sure that `ffmpeg` is installed and in your path? It works fine from the command line? – pierpy Mar 30 '21 at 20:11
  • Already fixed it – FileX Mar 30 '21 at 20:51

0 Answers0