[FFmpeg-user] Using several audios after each-other in a video

Cecil Westerhof Cecil at decebal.nl
Thu Jun 16 14:44:22 EEST 2022


Thanks for the very speedy reply. :-D

Michael Koch <astroelectronic at t-online.de> writes:

> Am 16.06.2022 um 13:11 schrieb Cecil Westerhof via ffmpeg-user:
>> At the moment I am making a slideshow like the following:
>>      zoompan=zoompan=d=3:fps=.333:s=1280x960,framerate=25:interp_start=0:interp_end=255:scene=100
>>      ffmpeg -y                  \
>>             -i       %03d.jpg   \
>>             -i       ${audio}   \
>>             -to      $to        \
>>             -vf      ${zoompan} \
>>             -pix_fmt yuv420p    \
>>             ${outputFile}
>>
>> Until now I found audios that had the right length, but now I need to
>> put several audios together for the generated video.
>> I could create an audio from several audios every time.
>> A slightly better option would be a variant of:
>>      -itsoffset 10 -i audio1.mp3 -itsoffset 15 -i audio2.mp3
>>
>> But is there a way to just let the audios be put after each-other?
>
> You can use the concat filter.
> ffmpeg -i audio1.mp3 -i audio2.mp3 -lavfi [0][1]concat=n=2:v=0:a=1 out.mp3
>
> v=0 is important because the default is v=1.

That is probably better as the way I just did it:
    ffmpeg -f concat -safe 0 -i audioList -c copy audio.mp3


Not that it is not doable, but in this way I need to do two things. I
was just wondering if there would be a way to use several audio
without first creating another audio.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


More information about the ffmpeg-user mailing list