kariryzh
kariryzh

Reputation: 81

Taking 1 seconds for each mp3 file and combine it into 1 file using ffmpeg

im using this code to combine all wanted mp3 file into 1 and its working fine, but i need to cut it then combine it

files: a.mp3, b.mp3, c.mp3 -> each of these file got duration of 3 seconds

expected output 1s of a.mp3 + 1s of b.mp3 + 1s of c.mp3

code im using:

ffmpeg -f concat -i file.txt -c copy full.mp3

file.txt:

file 'melodies/a.mp3'
file 'melodies/b.mp3'
file 'melodies/c.mp3'
file 'melodies/d.mp3'
file 'melodies/e.mp3'

output: full.mp3 the duration is 9 seconds

Upvotes: 0

Views: 40

Answers (1)

kesh
kesh

Reputation: 5463

Documentation of concat demuxer indicates that it supports various directives to auto-cut input streams: duration, inpoint, & outpoint. Follow the example in the doc.

Upvotes: 1

Related Questions