‚̧Normally Pleasant Mixture
    Wondering what‚Äôs next for npm?Check out our public roadmap! ¬Ľ

    extra-ffmpeg

    4.0.6¬†‚Äʬ†Public¬†‚Äʬ†Published

    Decode, encode, transcode, mux, demux, stream, filter, and play media through machine (via "ffmpeg").

    Uses setup-ffmpeg to install, if absent.

    const ffmpeg = require('extra-ffmpeg');
    // ffmpeg.sync(<options>): stdout when done
    // ffmpeg(<options>)
    // -> Promise {stdout, stderr} when done
     
    // <options>: [{ // see ffmpeg -h
    //   outfile|o: // name of output file
    // }]
     
     
    ffmpeg.sync([{y: true}, {i: 'concat:0.mp3|1.mp3'}, {acodec: 'copy', o: 'aud.mp3'}]);
    // concat 0.mp3, 1.mp3 to aud.mp3
     
    ffmpeg.sync([
      {y: true, err_detect: 'explode'}, {loop: 1, framerate: 1}, {i: 'img.jpg'}, {i: 'aud.mp3'},
      {vcodec: 'libx264', crf: 0, preset: 'veryfast', tune: 'stillimage',
        vf: 'scale=trunc(iw/2)*2:trunc(ih/2)*2', acodec: 'copy', shortest: true, o: 'vid.mp4'}
    ]);
    // get video vid.mp4 from still image img.jpg and audio aud.mp4

    nodef

    Install

    npm i extra-ffmpeg

    DownloadsWeekly Downloads

    33

    Version

    4.0.6

    License

    MIT

    Unpacked Size

    4.6 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar