Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
ffprobe error trying to use ffmpeg-location option #11131
Comments
|
The opts key is |
|
oh I see... will this option work if i give it a string for ffmpeg and ffprobes directory? |
yes |
|
I am sorry for the late response. I am a bit confused in terms of the error in my code above. I am passing the directory in the dictionary using ProgramDir |
I am working on a python program
I have the options as
ydl_opts = {
'format': 'bestaudio/best', # choice of quality
'postprocessors': [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': bitrate
}], # only keep the audio
'logger': loggerWindow(),
'audioformat' : "mp3", # convert to mp3
'noplaylist' : playlist, # only download single song, not playlist
'ffmpeg-location': programDir
}
The program directory:
C:\Users\My_User\Documents\Python Projects\SongDownloader\src\downloader
and in the downloader folder is ffmpeg.exe and ffprobe.exe
it gives me an error saying
Traceback (most recent call last):
File "C:\Program Files\Anaconda3\lib\threading.py", line 914, in _bootstrap_inner
self.run()
File "C:\Program Files\Anaconda3\lib\threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\mitchell\Documents\Python Projects\SongDownloader\src\downloader\functions.py", line 126, in download
ydl.download(url)
File "C:\Program Files\Anaconda3\lib\site-packages\youtube_dl\YoutubeDL.py", line 1791, in download
url, force_generic_extractor=self.params.get('force_generic_extractor', False))
File "C:\Program Files\Anaconda3\lib\site-packages\youtube_dl\YoutubeDL.py", line 705, in extract_info
return self.process_ie_result(ie_result, download, extra_info)
File "C:\Program Files\Anaconda3\lib\site-packages\youtube_dl\YoutubeDL.py", line 751, in process_ie_result
return self.process_video_result(ie_result, download=download)
File "C:\Program Files\Anaconda3\lib\site-packages\youtube_dl\YoutubeDL.py", line 1435, in process_video_result
self.process_info(new_info)
File "C:\Program Files\Anaconda3\lib\site-packages\youtube_dl\YoutubeDL.py", line 1773, in process_info
self.post_process(filename, info_dict)
File "C:\Program Files\Anaconda3\lib\site-packages\youtube_dl\YoutubeDL.py", line 1839, in post_process
self.report_error(e.msg)
File "C:\Program Files\Anaconda3\lib\site-packages\youtube_dl\YoutubeDL.py", line 568, in report_error
self.trouble(error_message, tb)
File "C:\Program Files\Anaconda3\lib\site-packages\youtube_dl\YoutubeDL.py", line 538, in trouble
raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: WARNING: unable to obtain file audio codec with ffprobe