FFmpeg image slideshow (multiple images) with infinite loop till audio file ends

0

I want to make an image slideshow (multiple images) with an infinite loop until the audio file ends, and with a full duration audio file. Is there anybody who can help me out....

Earlier I was doing this below:

 String[] commd1fdf2 = {
                    "-loop", "1", "-t", "5", "-i", imagepath1.jpg,
                    "-loop", "1", "-t", "5", "-i", imagepath2.jpg,
                    "-loop", "1", "-t", "5", "-i", imagepath3.jpg,
                    "-loop", "1", "-t", "5", "-i", imagepath4.jpg,
                    "-loop", "1", "-t", "5", "-i", imagepath5.jpg,
                    "-i", audio_file_path.mp3,
                    "-preset", "ultrafast",
                    "-filter_complex",
                    "[1]format=yuva444p,fade=d=1:t=in:alpha=1,setpts=PTS-STARTPTS+4/TB[f0];" +
                            "[2]format=yuva444p,fade=d=1:t=in:alpha=1,setpts=PTS-STARTPTS+8/TB[f1];" +
                            "[3]format=yuva444p,fade=d=1:t=in:alpha=1,setpts=PTS-STARTPTS+12/TB[f2];" +
                            "[4]format=yuva444p,fade=d=1:t=in:alpha=1,setpts=PTS-STARTPTS+16/TB[f3];" +
                            "[0][f0]overlay[bg1];" +
                            "[bg1][f1]overlay[bg2];" +
                            "[bg2][f2]overlay[bg3];" +
                            "[bg3][f3]overlay,format=yuv420p[v]",
                    "-map", "[v]", "-map", "5:a", "-shortest", "-acodec", "copy", filePath_output.mp4};

But its output is only 20 to 21 seconds and the rest of the song is not encoded in the video output. So I want the full song with an image slideshow where the images repeat.

Sekhon123

Posted 2019-08-30T06:19:26.287

Reputation: 13

2Next time asking about ffmpeg, please show the actual command that you run, not a Java string. Also, show the entire command line output for debugging purposes. – slhck – 2019-08-30T11:10:10.803

1How long is audio_file_path.mp3? You should always show the complete log from the command. It will give you answers faster. – llogan – 2019-08-30T18:16:41.963

@llogan audio duration in this above is around 04:26 >> i.e 266 seconds but it can be of any duration selected from phone storage. – Sekhon123 – 2019-09-02T04:38:26.880

1I think the only solution is to actually copy the images and have 10, 15, 20 input images, etc. – depending on the audio duration, and use -shortest. – slhck – 2019-09-02T07:12:31.037

@slhck no,this is not a right solution , i think there must be some command parameter which can make loop of these images. i found one i.e. -stream_loop but its not getting implemented. – Sekhon123 – 2019-09-02T08:20:00.900

No answers