damianociarla / node-ffmpeg

ffmpeg module for nodejs
MIT License
600 stars 140 forks source link

No output received and no error #68

Closed ArqamRafay closed 3 years ago

ArqamRafay commented 4 years ago

i write this below code to extract sound from avi video it run with no error but no audio extracted in desire path. var ffmpeg = require('ffmpeg'); try { var process = new ffmpeg('grb.avi'); process.then(function (video) { // Callback mode video.fnExtractSoundToMP3('/path/grbaudio.mp3', function (error, file) { if (!error) console.log('Audio file: ' + file); }); }, function (err) { console.log('Error: ' + err); }); } catch (e) { console.log(e.code); console.log(e.msg); }

Morzaram commented 3 years ago

What I've done is appended an error log since there is an error, its just not being logged

try { var process = new ffmpeg('grb.avi'); process.then(function (video) { // Callback mode video.fnExtractSoundToMP3('/path/grbaudio.mp3', function (error, file) { if (!error) console.log("New video file: " + file); console.log(error); ## <<< See here }); }, function (err) { console.log('Error: ' + err); }); } catch (e) { console.log(e.code); console.log(e.msg); }

From doing that it turns out I needed to add ffmpeg to my environment variable paths in windows

ArqamRafay commented 3 years ago

ok Noted