1

I am trying to use FFmpeg to generate for example a 1-hour video from concatenating a 1-second input video over and over and over again.

The problem is that the length of my input video is of various lengths so I can't just hardcode it to make it concatenate 3600 times.

My approach is:

1.Acquire the length of the input video (in this example, 1s)
2.divide the target length by the length of input video (in this example, 3600)
3.Let FFmpeg concatenate for (3600) times with -vcodec copy -acodec copy

I am using Android Studio and the com.writingminds:FFmpegAndroid:0.3.2 module
Any ideas would be appreciated.

1 Answer 1

1

Use stream_loop to loop the input indefinitely and set output -t to limit the duration.

ffmpeg -stream_loop -1 -i input -c copy -t 3600 output

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.