volumenetwork / video-thumbnail-generator

node js module to create thumbnails from a video
58 stars 16 forks source link

Unhandled Rejection Error: Cannot find ffprobe #6

Closed memayank00 closed 6 years ago

memayank00 commented 6 years ago

when i install this module and try to execute code then it's says that "Unhandled Rejection Error: Cannot find ffprobe"

irvingswiftj commented 6 years ago

This is the same as: https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/issues/691

Have you checked that you have ffmpeg installed in your environment ?

irvingswiftj commented 6 years ago

Is this still an issue @memayank00 ? Else can I close this ticket?

saeedmashhadi commented 6 years ago

I have installed fluent-ffmpeg. but there is same error for me.

Vishnupriya112 commented 6 years ago

Same Problem .. I have installed fluent-ffmpeg eventhough am getting this error

irvingswiftj commented 6 years ago

you do not need to install fluent-ffmpeg as it is already a dependency of this project. However you need to make sure that you have ffmpeg installed: https://github.com/adaptlearning/adapt_authoring/wiki/Installing-FFmpeg

Vishnupriya112 commented 6 years ago
var tg = new ThumbnailGenerator({
                    sourcePath: main_folder_path,
                    // thumbnailPath: pro_root_path+'public/uploads/inspection/'+req.body.clientID+'/images/',
                    tmpDir: pro_root_path+'public/uploads/inspection/'+req.body.clientID+'/images/' //only required if you can't write to /tmp/ and you need to generate gifs
                  });
                  console.log(tg)
                //   tg.generate()
                //   .then("console.log");
                  tg.generate((err, result) => {
                    if(err){
                        console.log(err)
                    }
                    else{
                        console.log(result)
                    }
                  })

Error :

Unhandled rejection Error: Cannot find ffprobe

    at E:\sri\new\vishnu\phase_2\node_modules\video-thumbnail-generator\node_modules\fluent-ffmpeg\lib\ffprobe.js:145:31
    at E:\sri\new\vishnu\phase_2\node_modules\video-thumbnail-generator\node_modules\fluent-ffmpeg\lib\capabilities.js:194:9
    at E:\sri\new\vishnu\phase_2\node_modules\async\dist\async.js:356:16
    at nextTask (E:\sri\new\vishnu\phase_2\node_modules\async\dist\async.js:5057:29)
    at E:\sri\new\vishnu\phase_2\node_modules\async\dist\async.js:5064:13
    at apply (E:\sri\new\vishnu\phase_2\node_modules\async\dist\async.js:21:25)
    at E:\sri\new\vishnu\phase_2\node_modules\async\dist\async.js:56:12
    at E:\sri\new\vishnu\phase_2\node_modules\async\dist\async.js:840:16
    at E:\sri\new\vishnus\phase_2\node_modules\video-thumbnail-generator\node_modules\fluent-ffmpeg\lib\capabilities.js:183:15
    at FSReqWrap.cb [as oncomplete] (fs.js:312:19)
irvingswiftj commented 6 years ago

ok, I have never tried running this on Windows and do not have access to even a windows VM at the moment to attempt to fix.

Vishnupriya112 commented 6 years ago

Ok then shall I try in Linux ?

irvingswiftj commented 6 years ago

I don't see why it wouldn't run on Windows if ffmpeg is installed, but, i have it working here on both OSX and linux (ubuntu)

Vishnupriya112 commented 6 years ago

In Linux also am getting the same error

Unhandled rejection Error: Cannot find ffprobe
    at /var/www/html/phase2/node_modules/fluent-ffmpeg/lib/ffprobe.js:145:31
    at /var/www/html/phase2/node_modules/fluent-ffmpeg/lib/capabilities.js:194:9
    at /var/www/html/phase2/node_modules/async/dist/async.js:356:16
    at nextTask (/var/www/html/phase2/node_modules/async/dist/async.js:5057:29)
    at /var/www/html/phase2/node_modules/async/dist/async.js:5064:13
    at apply (/var/www/html/phase2/node_modules/async/dist/async.js:21:25)
    at /var/www/html/phase2/node_modules/async/dist/async.js:56:12
    at /var/www/html/phase2/node_modules/async/dist/async.js:840:16
    at /var/www/html/phase2/node_modules/fluent-ffmpeg/lib/capabilities.js:186:13
    at /var/www/html/phase2/node_modules/fluent-ffmpeg/lib/capabilities.js:123:9
    at /var/www/html/phase2/node_modules/async/dist/async.js:356:16
    at nextTask (/var/www/html/phase2/node_modules/async/dist/async.js:5057:29)
    at /var/www/html/phase2/node_modules/async/dist/async.js:5064:13
    at apply (/var/www/html/phase2/node_modules/async/dist/async.js:21:25)
    at /var/www/html/phase2/node_modules/async/dist/async.js:56:12
    at /var/www/html/phase2/node_modules/async/dist/async.js:840:16
    at /var/www/html/phase2/node_modules/fluent-ffmpeg/lib/capabilities.js:116:11
    at /var/www/html/phase2/node_modules/fluent-ffmpeg/lib/utils.js:223:16
    at F (/var/www/html/phase2/node_modules/which/which.js:68:16)
    at E (/var/www/html/phase2/node_modules/which/which.js:80:29)
    at /var/www/html/phase2/node_modules/which/which.js:89:16
    at /var/www/html/phase2/node_modules/isexe/index.js:42:5
irvingswiftj commented 6 years ago

did you install ffmpeg?

Vishnupriya112 commented 6 years ago

Yes I have installed

irvingswiftj commented 6 years ago

what happens when you run ffmpeg and ffprobe from your terminal?

This is what I get:

james@Jamess-MacBook-Pro:~|⇒  ffprobe
ffprobe version 3.4.2 Copyright (c) 2007-2018 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --disable-jack --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Simple multimedia streams analyzer
usage: ffprobe [OPTIONS] [INPUT_FILE]

You have to specify one input file.
Use -h to get full help or, even better, run 'man ffprobe'.
james@Jamess-MacBook-Pro:~|⇒  ffmpeg
ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --disable-jack --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'
Vishnupriya112 commented 6 years ago

Am getting not found

On Wed, Nov 7, 2018 at 5:21 PM James Irving-Swift notifications@github.com wrote:

what happens when you run ffmpeg and ffprobe from your terminal?

This is what I get:

james@Jamess-MacBook-Pro:~|⇒ ffprobe ffprobe version 3.4.2 Copyright (c) 2007-2018 the FFmpeg developers built with Apple LLVM version 9.0.0 (clang-900.0.39.2) configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --disable-jack --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Simple multimedia streams analyzer usage: ffprobe [OPTIONS] [INPUT_FILE]

You have to specify one input file. Use -h to get full help or, even better, run 'man ffprobe'. james@Jamess-MacBook-Pro:~|⇒ ffmpeg ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers built with Apple LLVM version 9.0.0 (clang-900.0.39.2) configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --disable-jack --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/volumenetwork/video-thumbnail-generator/issues/6#issuecomment-436598812, or mute the thread https://github.com/notifications/unsubscribe-auth/Akw5ulDqCTuErBLYE3QEq_KyGKs1qEWeks5usskmgaJpZM4VXmNN .

irvingswiftj commented 6 years ago

sounds like ffmpeg isn't installed.

sudo apt install ffmpeg

Vishnupriya112 commented 6 years ago

If am using apt am getting

Err:11 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 libpostproc-ffmpeg53 amd64 7:2.8.14-0ubuntu0.16.04.1 404 Not Found [IP: 91.189.88.162 80] Err:12 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 libswscale-ffmpeg3 amd64 7:2.8.14-0ubuntu0.16.04.1 404 Not Found [IP: 91.189.88.162 80] Err:13 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 libavfilter-ffmpeg5 amd64 7:2.8.14-0ubuntu0.16.04.1 404 Not Found [IP: 91.189.88.162 80] Err:14 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 libavdevice-ffmpeg56 amd64 7:2.8.14-0ubuntu0.16.04.1 404 Not Found [IP: 91.189.88.162 80] Err:15 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 ffmpeg amd64 7:2.8.14-0ubuntu0.16.04.1 404 Not Found [IP: 91.189.88.162 80] E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libavutil-ffmpeg54_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libswresample-ffmpeg1_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libavcodec-ffmpeg56_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libavformat-ffmpeg56_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libavresample-ffmpeg2_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libglapi-mesa_17.2.8-0ubuntu0~16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libd/libdrm/libdrm-amdgpu1_2.4.83-1~16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libd/libdrm/libdrm-nouveau2_2.4.83-1~16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgl1-mesa-dri_17.2.8-0ubuntu0~16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgl1-mesa-glx_17.2.8-0ubuntu0~16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libpostproc-ffmpeg53_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libswscale-ffmpeg3_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libavfilter-ffmpeg5_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libavdevice-ffmpeg56_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/ffmpeg_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/universe/m/mesa/mesa-va-drivers_17.2.8-0ubuntu0~16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/mesa-vdpau-drivers_17.2.8-0ubuntu0~16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

On Wed, Nov 7, 2018 at 5:53 PM James Irving-Swift notifications@github.com wrote:

sounds like ffmpeg isn't installed.

sudo apt install ffmpeg

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/volumenetwork/video-thumbnail-generator/issues/6#issuecomment-436606228, or mute the thread https://github.com/notifications/unsubscribe-auth/Akw5ujlnJq25hFP5B9XGEFHLz4_llRXXks5ustDGgaJpZM4VXmNN .

Vishnupriya112 commented 6 years ago

I have tried this

$ ls node_modules/ffprobe LICENSE README.md index.js package.json test

Am getting like this

On Wed, Nov 7, 2018 at 5:55 PM priya thulasi ptpriyathulasi@gmail.com wrote:

If am using apt am getting

Err:11 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 libpostproc-ffmpeg53 amd64 7:2.8.14-0ubuntu0.16.04.1 404 Not Found [IP: 91.189.88.162 80] Err:12 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 libswscale-ffmpeg3 amd64 7:2.8.14-0ubuntu0.16.04.1 404 Not Found [IP: 91.189.88.162 80] Err:13 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 libavfilter-ffmpeg5 amd64 7:2.8.14-0ubuntu0.16.04.1 404 Not Found [IP: 91.189.88.162 80] Err:14 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 libavdevice-ffmpeg56 amd64 7:2.8.14-0ubuntu0.16.04.1 404 Not Found [IP: 91.189.88.162 80] Err:15 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 ffmpeg amd64 7:2.8.14-0ubuntu0.16.04.1 404 Not Found [IP: 91.189.88.162 80] E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libavutil-ffmpeg54_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libswresample-ffmpeg1_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libavcodec-ffmpeg56_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libavformat-ffmpeg56_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libavresample-ffmpeg2_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libglapi-mesa_17.2.8-0ubuntu0~16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libd/libdrm/libdrm-amdgpu1_2.4.83-1~16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libd/libdrm/libdrm-nouveau2_2.4.83-1~16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgl1-mesa-dri_17.2.8-0ubuntu0~16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgl1-mesa-glx_17.2.8-0ubuntu0~16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libpostproc-ffmpeg53_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libswscale-ffmpeg3_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libavfilter-ffmpeg5_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/libavdevice-ffmpeg56_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/f/ffmpeg/ffmpeg_2.8.14-0ubuntu0.16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/universe/m/mesa/mesa-va-drivers_17.2.8-0ubuntu0~16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/mesa-vdpau-drivers_17.2.8-0ubuntu0~16.04.1_amd64.deb 404 Not Found [IP: 91.189.88.162 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

On Wed, Nov 7, 2018 at 5:53 PM James Irving-Swift < notifications@github.com> wrote:

sounds like ffmpeg isn't installed.

sudo apt install ffmpeg

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/volumenetwork/video-thumbnail-generator/issues/6#issuecomment-436606228, or mute the thread https://github.com/notifications/unsubscribe-auth/Akw5ujlnJq25hFP5B9XGEFHLz4_llRXXks5ustDGgaJpZM4VXmNN .

Vishnupriya112 commented 6 years ago

I don't have bin directory inside ffmpeg.. Is that cause problem

irvingswiftj commented 6 years ago

try doing a sudo apt update before doing a sudo apt install ffmpeg

irvingswiftj commented 6 years ago

Closing issue as it has nothing to do with video-thumbnail-generator and is due to ffmpeg not being installed on the computer/server.

Vishnupriya112 commented 6 years ago

Thank you so much its working... But Its Taking long time to generate

albert2102 commented 4 years ago

Ok then shall I try in Linux ?

you can run on windows, 1- first you must run ffmpeg and make environment variables you can see this link to do it https://www.wikihow.com/Install-FFmpeg-on-Windows#/Image:Install-FFmpeg-on-Windows-Step-5-Version-4.jpg 2-you must run it on cmd not powershell

AlankrithaShekar commented 4 years ago

@albert2102 i have ffmpeg installed and have done exactly as mentioned in the link, despite that i get the same error -unhandled rejections