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. Please install one. #20476

Closed
chingdae1 opened this issue Mar 26, 2019 · 2 comments
Closed

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

chingdae1 opened this issue Mar 26, 2019 · 2 comments

Comments

@chingdae1
Copy link

@chingdae1 chingdae1 commented Mar 26, 2019

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Hi, I'm on downloading more than a million videos using youtube-dl via 40 independent processes (which means, "python3 download_script.py" x 40 times, and each process has been assigned to download 30,000 videos) and I have some problem.

My codes works fine at the beginning (about until 1000 videos downloaded), however as time goes by, the following error occurred on most(NOT EVERY, BUT VERY OFTEN) videos:(ffprobe/avprobe and ffmpeg/avconv not found. Please install one.)
One example of the error log is as follow:

================== Progress: [6172/30000],  ID:6hp4kWbgMl8 ==================
donwloader..
[youtube] 6hp4kWbgMl8: Downloading video info webpage
[youtube] Downloading just video 6hp4kWbgMl8 because of --no-playlist
[download] /workspace2/AVStrain_6/original/video_full/6hp4kWbgMl8.mp4 has already been downloaded
[download] 100% of 45.00MiB
[youtube] 6hp4kWbgMl8: Downloading webpage
Done downloading, now converting ...
[youtube] 6hp4kWbgMl8: Downloading video info webpage
[youtube] Downloading just video 6hp4kWbgMl8 because of --no-playlist
[download] Destination: /workspace2/AVStrain_6/original/audio_full/6hp4kWbgMl8.webm
[download] 100% of 5.20MiB in 00:0054MiB/s ETA 00:00known ETA
ERROR: ffprobe/avprobe and ffmpeg/avconv not found. Please install one.

The weirdest part is this, after this error occurred, I stopped all running processes and re-download that video and such error doesn't occurred at this time. In other words, I can't reproduce this error on single process in which download only one video. Is it make any sense that this error came from the choice of (single or multi process), or (download single or tones of videos)?

Of course ffmpeg is already downloaded as follow.

ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
  configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

I've got stuck in this issue for long time, can anyone give me some advice for this error?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 26, 2019

The error is self-explanatory: tt the time of that particular try ffprobe/ffmpeg were not available for youube-dl. It can be anything ranging from your code incorrectly handling ffmpeg_location to intermittent file access failures.

@dstftw dstftw closed this Mar 26, 2019
@chingdae1
Copy link
Author

@chingdae1 chingdae1 commented Mar 26, 2019

Thank you for your reply, but to be honest, still It's hard to understand why it depends on time to time and how to fix it. I didn't handle anything about ffmpeg-location, should I have to do something with it?

This is all codes for downloading video, anything wrong with this?

def get_ydl_opts_vid(path):
    ydl_opts = {
        'format': 'bestvideo[height<=720][ext=mp4]',
        'outtmpl': u'{}.%(ext)s'.format(path),
        'noplaylist': True,
        'progress_hooks': [my_hook]
    }
    return ydl_opts


def get_ydl_opts_aud(path):
    ydl_opts = {
        'format': 'bestaudio/best',
        'outtmpl': u'{}.%(ext)s'.format(path),
        'noplaylist': True,
        'progress_hooks': [my_hook],
        'postprocessors': [{
            'key': 'FFmpegExtractAudio',
            'preferredcodec': 'wav',
            'preferredquality': '192'}]
    }
    return ydl_opts


def download(video_id, video_result_path, audio_result_path):
    print('donwloader..')
    with youtube_dl.YoutubeDL(get_ydl_opts_vid(video_result_path)) as ydl:
        ydl.download(['https://www.youtube.com/watch?v=' + video_id])

    with youtube_dl.YoutubeDL(get_ydl_opts_aud(audio_result_path)) as ydl:
        ydl.download(['https://www.youtube.com/watch?v=' + video_id])
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.