0

I created an mp4 file with no sound that is 0:17 minutes long. I also have this mp3 file that is 3mins long.

I'd like to make a 10h video with those two, while keeping the filesize small. (8-15mb).

Is there a way to achieve that with ffmpeg?

keanu_reeves
  • 350
  • 1
  • 12

1 Answers1

1

Loop the 17 second video so it can match the duration of the 3 minute long audio:

ffmpeg -stream_loop -1 -i video.mp4 -i audio.mp3 -map 0:v -map 1:a -preset slow -shortest -movflags +faststart output.mp4

Then use the HTML5 loop attribute.

If you really want a 10 hour video:

ffmpeg -stream_loop -1 -i video.mp4 -stream_loop -1 -i audio.mp3 -map 0:v -map 1:a -preset slow -t 10:00:00 -movflags +faststart output.mp4

File will be big and it will take a long time to encode...because it's 10 hours. Not much you can do about that.

llogan
  • 121,796
  • 28
  • 232
  • 243