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

ERROR: ffprobe or avprobe not found (MAC, idle, py2app) #16754

Closed
steam3d opened this issue Jun 17, 2018 · 1 comment
Closed

ERROR: ffprobe or avprobe not found (MAC, idle, py2app) #16754

steam3d opened this issue Jun 17, 2018 · 1 comment

Comments

@steam3d
Copy link

@steam3d steam3d commented Jun 17, 2018

I installed ffmpeg and youtube-dl for python. It works.
I used the IDLE to write a program and when i run it, i have an error "ERROR: ffprobe or avprobe not found".

Then i just opened a terminal with python3 and run my script. it works without errors.
I thought that error has only in IDLE, i build my app with py2app and again i have the error "ERROR: ffprobe or avprobe not found".

How can i fixed this?

I used this fragment for clarity

from __future__ import unicode_literals
import youtube_dl


class MyLogger(object):
    def debug(self, msg):
        pass

    def warning(self, msg):
        pass

    def error(self, msg):
        print(msg)


def my_hook(d):
    if d['status'] == 'finished':
        print('Done downloading, now converting ...')


ydl_opts = {
    'format': 'bestaudio/best',
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'mp3',
        'preferredquality': '192',
    }],
    'logger': MyLogger(),
    'progress_hooks': [my_hook],
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    ydl.download(['https://www.youtube.com/watch?v=BaW_jenozKc'])
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 17, 2018

ffmpeg must be in PATH for a session you run IDLE from. Or set ffmpeg_location option with hardcoded value.

@dstftw dstftw closed this Jun 17, 2018
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
2 participants
You can’t perform that action at this time.