Adding loop video to sound ffmpeg

2019-08-06 03:11发布

i start working with ffmpeg, and here my first doubt:

I have one sound file, example.mp3 (1 min duration). I want add a loop video, example.mp4 ( x sec duration).

I want generate 1 min mp4 video and loop this video 3 times in this case, but this could be dynamic.

Its posible do this with ffmpeg ?

Thanks in advance

标签: ffmpeg
1条回答
手持菜刀,她持情操
2楼-- · 2019-08-06 03:34

You can use

ffmpeg -i audio.mp3 -filter_complex movie=video.mp4:loop=0,setpts=N/FRAME_RATE/TB -shortest out.mp4

Due to a existing bug in shortest, output will be somewhat longer than the audio.

查看更多
登录 后发表回答