Cannot find ffprobe OR ffmpeg - node react vscode
thebradisrad opened this issue · comments
Here's the FIX for cannot find ffprobe or ffmpeg issue:
- Google ffmpeg and install it on your computer.
- Extract it and move the extracted folder to the C drive or programs locations
- On windows add it to environment path if you want
- Go back to vs code and npm install ffmpeg ffprobe
- Then add this line (for windows) - the path should be path where the program is:
ffmpeg.setFfmpegPath('C:/ffmpeg/bin/ffmpeg.exe');
ffmpeg.setFfprobePath('C:/ffmpeg/bin/ffprobe.exe'); - If you're using video thumbnail generator:
const tg = new ThumbnailGenerator({ sourcePath: "sourcePath/", thumbnailPath: 'destinationPath/' }); tg.generateOneByPercentCb(90, (err, result) => { if (err) throw err; console.log(result); // 'test-thumbnail-320x240-0001.png' });
6b) If you're using ffmpeg:
ffmpeg(sourcePath) .screenshots({ timestamps: [0.0], filename: 'thumbnail.png', folder: destinationPath }) .on('end', err => { if (err) throw err; console.log('done'); });