VideoHelp Forum




+ Reply to Thread
Results 1 to 8 of 8
  1. Hello everyone,

    I just downloaded and installed Clever ffmpeg GUI. What is the easiest way to loop/extend one video to a set time duration?
    For ex: If I wanted to make a 5 minute video loop for 3 hours so it would be a 3 hour long video. How would I loop/extend that 5 minute video 36 times with lossless quality?

    Thanks for everyone's time and I hope this post finds everyone well.
    Quote Quote  
  2. With the command line:

    Code:
    ffmpeg -stream_loop 36 -i input.mp4 -c copy output.mp4
    Quote Quote  
  3. Thank you very much jagabo. That worked. Do you know how I would create a fade out offset and a fade in offset of a looped video?
    For example, in Vegas Pro, I can copy and paste the same video in a project (looping). So I have the same video back to back. I move the 2nd copied video backwards a bit so it's about 2-3 seconds on top of the first video and I do a crossfade from one to another. This works really well. Is there a way to do this in ffmpeg?

    Thanks again for your time. I really appreciate it

    Originally Posted by jagabo View Post
    With the command line:

    Code:
    ffmpeg -stream_loop 36 -i input.mp4 -c copy output.mp4
    Quote Quote  
  4. Loop with crossfade is much harder. I might have time to figure it out this weekend.
    Quote Quote  
  5. You probably need a full video editor for cross fade transition, which ffmpeg is not.
    but you can easily do start and end video and audio fades easily in ffmpeg or easier
    yet in clever FFmpeg-GUI.

    Originally Posted by mikeyb81 View Post
    I move the 2nd copied video backwards a bit so it's about 2-3 seconds on top of the first video
    and I do a crossfade from one to another. This works really well.
    Is there a way to do this in ffmpeg?
    Edit #1
    -------
    Ex: [Radial] Cross fade transition of videos 'in_1' & 'in_2' into 'out.mp4'.
    Code:
    ffmpeg -i in_1.mp4 -i in_2.mp4 -filter_complex "[0:v][1:v]xfade=transition=radial:duration=3[out_v]" -map "[out_v]" -map 0:a out.mp4
    Last edited by videoAI; 15th Nov 2025 at 19:03.
    There is nothing wrong .. with my environment
    Quote Quote  
  6. ffmpeg's xfade supports crossfades in addition many other transitions. The difficulty is getting the commands right for 36 copies of the clip.

    This could also be done pretty easily in AviSynth.
    Quote Quote  
  7. Here's an AviSynth script that shows the general concept:

    Code:
    # starting with a 1500 frame, 25 fps clip, and using a 2 second crossfade
    
    start = Dissolve(last, last, 50).Trim(0, 1499)
    middle = Dissolve(last, last, 50).Dissolve(last, 50).Trim(1500, 1500+1449)
    end = Dissolve(last, last, 50).Trim(1500, 0)
    
    start+middle+middle+middle+end
    The resulting video doesn't fade in at the start or fade out at the end. But there is a 2 second crossfade at each internal transition from the end of one clip and the start of the next. Here there are only 5 repeats total. And there is a 4 second loss from the crossfades (each loses 1 second).

    You can easily adapt this to your video.
    Last edited by jagabo; 18th Nov 2025 at 18:21.
    Quote Quote  
  8. Thank you. I'll give this a try!
    Originally Posted by jagabo View Post
    Here's an AviSynth script that shows the general concept:

    Code:
    # starting with a 1500 frame, 25 fps clip, and using a 2 second crossfade
    
    start = Dissolve(last, last, 50).Trim(0, 1499)
    middle = Dissolve(last, last, 50).Dissolve(last, 50).Trim(1500, 1500+1449)
    end = Dissolve(last, last, 50).Trim(1500, 0)
    
    start+middle+middle+middle+end
    The resulting video doesn't fade in at the start or fade out at the end. But there is a 2 second crossfade at each internal transition from the end of one clip and the start of the next. Here there are only 5 repeats total. And there is a 4 second loss from the crossfades (each loses 1 second).

    You can easily adapt this to your video.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!