Follow

Most of the time when I make my small video blogs, I need two kind of operations
- concat two or more videos
- add some background melody (to hide some noise)

I used to use video editors for this and it wasn't fun. The same actions again and again.

Recently, I learned that it's an easy task for FFmpeg, and can be scripted.

There are two steps.
1. Make a list of paths of video file in a "source file" like this
```
file 'input1.mp4'
file 'input2.mp4'
```
then concat it with
`ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4`

2. Add background music (and repeat it if necessary ). 0.05 = 5% - is its volume.

`ffmpeg -i input.mp4 -stream_loop -1 -i background.wav -filter_complex "[1:a]volume=0.05[a1]; [0:a][a1]amix=inputs=2:duration=first:dropout_transition=2" output.mp4`

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.