ffmpeg.js 399 B

12345678910111213
  1. var ffmpeg = require('fluent-ffmpeg');
  2. ffmpeg("/Users/john/Desktop/03_寻找另一半/WCHY-RWSX02-02-007-10-S01.mp4")
  3. .format("mp4")
  4. .videoCodec('libx264')
  5. .size('100%')
  6. .on('end', function() {
  7. console.log('file has been converted succesfully');
  8. })
  9. .on('error', function(err) {
  10. console.log('an error happened: ' + err.message);
  11. })
  12. .save("/Users/john/Desktop/WCHY-RWSX02-02-007-10-S01.mp4")