Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
451 views
in Technique[技术] by (71.8m points)

How to concatenate multiple videos in ffmpeg JS using and Mute them as well in command line

Using Command Line for FFMPEG in javascript to concatenate videos and muting them also. There was problem for me to find commands for JS in the following format

('-i', 'test.mp4', '-vf','reverse', 'out.mp4')

question from:https://stackoverflow.com/questions/65840227/how-to-concatenate-multiple-videos-in-ffmpeg-js-using-and-mute-them-as-well-in-c

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you are looking for a solution in JS npm cli then,

To concats a list of videos together is easy using ffmpeg package with transitions.

package on npm! npm install ffmpeg-concat


Usage: ffmpeg-concat [options] <videos...>
     
Options:
  -V, --version                         output the version number
  -o, --output <output>                 path to mp4 file to write (default: out.mp4)
  -t, --transition-name <name>          name of gl-transition to use (default: fade)
  -d, --transition-duration <duration>  duration of transition to use in ms (default: 500)
  -T, --transitions <file>              json file to load transitions from
  -f, --frame-format <format>           format to use for temp frame images (default: raw)
  -c, --concurrency <number>            number of videos to process in parallel (default: 4)
  -C, --no-cleanup-frames               disables cleaning up temp frame images
  -O, --temp-dir <dir>                  temporary working directory to store frame data
  -v, --verbose                         enable verbose logging from FFmpeg
  -h, --help                            output usage information
  
Example:
     
> ffmpeg-concat -t circleopen -d 750 -o huzzah.mp4 0.mp4 1.mp4 2.mp4

Documentation: https://www.npmjs.com/package/ffmpeg-concat


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...