FOLLOW US
4dots Software CODE HELP BLOG

How to add shorter audio to video with loop with ffmpeg

With ffmpeg you can add shorter audio to video with loop with :

	

	ffmpeg.exe -i VIDEOFILE -filter_complex "amovie=AUDIOFILE:loop=1000,asetpts=N/SR/TB" -shortest output.mp4

In Windows AUDIOFILE (audio filepath) should be escaped. This means \ should be replaced with \\\\ and : should be replaced with \\:.

For example c:\audio\music.mp3 should get c\\:\\\\audio\\\\music.mp3