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

DownloadError: ERROR: ffprobe or avprobe not found. Please install one. #5895

Closed
nadermx opened this issue Jun 4, 2015 · 6 comments
Closed

DownloadError: ERROR: ffprobe or avprobe not found. Please install one. #5895

nadermx opened this issue Jun 4, 2015 · 6 comments

Comments

@nadermx
Copy link

@nadermx nadermx commented Jun 4, 2015

I keep getting this error DownloadError: ERROR: ffprobe or avprobe not found. Please install one.

I am on ubuntu 14.04 and I already did this

sudo apt-get install -y libav-tools

and ffmpeg is showing as installed

root@www:/home/www/yout# ffmpeg -version
ffmpeg version 2.6.3 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)

Here is the input I'm putting into the youtube-dl


temp_filepath = 'temp/%s-%s.%s' % (uuid.uuid4(), output_file, '%(ext)s')

    ydl_opts = {
    'verbose': True,
    'format': 'bestaudio/best', # choice of quality
    'outtmpl': temp_filepath,  # name the location
    'noplaylist' : True,        # only download single song, not playlist
    'postprocessors': [{
      'key': 'FFmpegExtractAudio',
      'preferredcodec': 'mp3',
      }],
     }

And here is the error

Traceback (most recent call last):
  File "/home/www/env/local/lib/python2.7/site-packages/rq/worker.py", line 557, in perform_job
    rv = job.perform()
  File "/home/www/env/local/lib/python2.7/site-packages/rq/job.py", line 492, in perform
    self._result = self.func(*self.args, **self.kwargs)
  File "/home/www/yout/worker.py", line 100, in extract_audio
    extraction_result = start_extraction(url, audio_filename)
  File "/home/www/yout/worker.py", line 132, in start_extraction
    result = ydl.download([url])
  File "/home/www/env/local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1446, in download
    res = self.extract_info(url)
  File "/home/www/env/local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 662, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/home/www/env/local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 708, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/home/www/env/local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1150, in process_video_result
    self.process_info(new_info)
  File "/home/www/env/local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1429, in process_info
    self.post_process(filename, info_dict)
  File "/home/www/env/local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1495, in post_process
    self.report_error(e.msg)
  File "/home/www/env/local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 529, in report_error
    self.trouble(error_message, tb)
  File "/home/www/env/local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 499, in trouble
    raise DownloadError(message, exc_info)
DownloadError: ERROR: ffprobe or avprobe not found. Please install one.

Any help would be appreciated

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jun 4, 2015

Can you run ffprobe or avprobe? (that's why it's failing)

Side note: don't run youtube-dl as the root user, we try to make it as safe as possible but you should avoid running programs as root if possible.

@nadermx
Copy link
Author

@nadermx nadermx commented Jun 4, 2015

I will change the user after I get it working.

I believe I can run ffprobe and avprobe

root@www:/home/www/yout# ffprobe
ffprobe version 2.6.3 Copyright (c) 2007-2015 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
root@www:/home/www/yout# avprobe
avprobe version 9.18-6:9.18-0ubuntu0.14.04.1+fdkaac, Copyright (c) 2007-2014 the Libav developers
  built on Apr 10 2015 23:18:58 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
Simple multimedia streams analyzer
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jun 4, 2015

Post the full output you get when running youtube-dl --verbose --extract-audio SOME_URL using the same user as your python code.

@nadermx
Copy link
Author

@nadermx nadermx commented Jun 4, 2015

this is bizzar when I run that it gives me this..

(env)root@www:/home/www/yout# youtube-dl --verbose --extract-audio 'https://www.youtube.com/watch?v=PEVUFKfpp5Y'
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'--extract-audio', u'https://www.youtube.com/watch?v=PEVUFKfpp5Y']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.04.09
[debug] Python version 2.7.6 - Linux-3.13.0-52-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 9.18-6, avprobe 9.18-6, ffmpeg 2.6.3, ffprobe 2.6.3
[debug] Proxy map: {}
[youtube] PEVUFKfpp5Y: Downloading webpage
[youtube] PEVUFKfpp5Y: Extracting video information
[youtube] PEVUFKfpp5Y: Downloading DASH manifest
[debug] Invoking downloader on 'https://r13---sn-aiglln76.googlevideo.com/videoplayback?id=3c455414a7e9a796&itag=141&source=youtube&requiressl=yes&mm=31&mn=sn-aiglln76&mv=m&ms=au&pl=48&nh=IgpwcjAzLmxocjE0KgkxMjcuMC4wLjE&ratebypass=yes&mime=audio/mp4&gir=yes&clen=3650358&lmt=1384815776052266&dur=114.474&fexp=901803,9406617,9407992,9408092,9408142,9408420,9408697,9408710,9409203,9413140,9413503,9414936,9415160,9415304,9415663,9415752,962731&mt=1433412898&signature=266ECED52115968C4E295BFFB03A30A4C64B1498.08626664DE30B666A5F8BC0121424F85C70C0929&sver=3&upn=rkYBKqv-OyQ&key=dg_yt0&ip=2a03:b0c0:1:d0::3ea:5001&ipbits=0&expire=1433434627&sparams=ip,ipbits,expire,id,itag,source,requiressl,mm,mn,mv,ms,pl,nh,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: 9 months old twins dancing and trying to get the music back-PEVUFKfpp5Y.m4a
[download] 100% of 3.48MiB in 00:00
[ffmpeg] Correcting container in "9 months old twins dancing and trying to get the music back-PEVUFKfpp5Y.m4a"
WARNING: Your copy of avconv is outdated, update avconv to version 10-0 or newer if you encounter any errors.
[debug] ffmpeg command line: avconv -y -i '9 months old twins dancing and trying to get the music back-PEVUFKfpp5Y.m4a' -c copy -f mp4 '9 months old twins dancing and trying to get the music back-PEVUFKfpp5Y.temp.m4a'
[debug] avconv command line: avprobe -show_streams '9 months old twins dancing and trying to get the music back-PEVUFKfpp5Y.m4a'
[youtube] Post-process file 9 months old twins dancing and trying to get the music back-PEVUFKfpp5Y.m4a exists, skipping

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jun 4, 2015

Post the output you get when running this python script (which I guess is similar to what you are using):

from youtube_dl import YoutubeDL
ydl_opts = {
    'verbose': True,
    'format': 'bestaudio/best', # choice of quality
    'outtmpl': 'example.%(ext)s',  # name the location
    'noplaylist' : True,        # only download single song, not playlist
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'mp3',
    }],
}
ydl = YoutubeDL(ydl_opts)

ydl.download(['https://www.youtube.com/watch?v=PEVUFKfpp5Y'])

If that works but you script still fails, post the code you are running and its output so that we can try to reproduce it.

@nadermx
Copy link
Author

@nadermx nadermx commented Jun 4, 2015

Ok, figured it out. It was working fine when it was not in supervisor. Once I put the app under supervisor the issue started. Didn't click until just now.

In the supervisor config file I had to add the location of ffprobe in ontop of the virtual env directory as seen below.

environment=PATH="/home/www/env/bin:/usr/bin"

Thank you so much for your help!

@nadermx nadermx closed this Jun 4, 2015
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.