I'm trying to merge an audio file with a video file. I have two options:
Have a very small video file (e.g., 10 seconds) that loop while the audio file is not over. (input.mp4)
Have a very long video file (name.wav) (it is not mp3) on which I can attach the audio file. I would like to cut the video when the audio is finished.
I'm using the latter with the -t option of ffmpeg. It means I have to get the duration of the audio file to feed it into ffmpeg. Is it possible to avoid this step ? I try to use: ffmpeg -stream_loop -1 -i input.mp4 -i input.wav -shortest -map 0:v:0 -map 1:a:0 -y out.mp4 But it not success Any pointer for the first solution ?