Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffprobe error trying to use ffmpeg-location option #11131

Closed
Mitchellwbooks opened this issue Nov 6, 2016 · 4 comments
Closed

ffprobe error trying to use ffmpeg-location option #11131

Mitchellwbooks opened this issue Nov 6, 2016 · 4 comments

Comments

@Mitchellwbooks
Copy link

@Mitchellwbooks Mitchellwbooks commented Nov 6, 2016

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

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Nov 6, 2016

The opts key is ffmpeg_location not ffmpeg-location. The error is saying that ffprobe found via PATH is broken.

@dstftw dstftw closed this Nov 6, 2016
@Mitchellwbooks
Copy link
Author

@Mitchellwbooks Mitchellwbooks commented Nov 6, 2016

oh I see... will this option work if i give it a string for ffmpeg and ffprobes directory?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 7, 2016

will this option work if i give it a string for ffmpeg and ffprobes directory?

yes

@Mitchellwbooks
Copy link
Author

@Mitchellwbooks Mitchellwbooks commented Nov 12, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.