ffmpeg \
  -loop 1 -t 1.00 -i "https://cdn.video2.ai/user-i/ui_1745608799321-image_1745608799320.png" \
  -loop 1 -t 1.00 -i "https://cdn.video2.ai/user-i/ui_1745608800202-image_1745608800201.png" \
  -loop 1 -t 1.00 -i "https://cdn.video2.ai/user-i/ui_1745608801047-image_1745608801046.png" \
  -loop 1 -t 1.00 -i "https://cdn.video2.ai/user-i/ui_1745608802028-image_1745608802027.png" \
  -loop 1 -t 2.00 -i "https://cdn.video2.ai/user-i/ui_1745608803470-image_1745608803469.png" \
  -loop 1 -t 0.04 -i "https://cdn.video2.ai/user-i/ui_1745608796031-image_1745608796030.png" \
  -loop 1 -t 2.00 -i "https://cdn.video2.ai/user-i/ui_1745608802764-image_1745608802763.png" \
  -i "https://cdn.video2.ai/user-v/uv_1745608793763-video_1745608793761.mov" \
  -i "https://cdn.video2.ai/user-a/ua_1745608796797-audio_1745608796796.mp3" \
  -i "https://cdn.video2.ai/user-a/ua_1745608798130-audio_1745608798129.mp3" \
  -i "https://cdn.video2.ai/user-a/ua_1745608804225-audio_1745608804224.mp3" \
  -filter_complex '[0:v][1:v][2:v][3:v][4:v]concat=n=5:v=1:a=0[sl5];[sl5][5:v]overlay=enable=between(t\,0\,0.04)[tmp1];[tmp1][6:v]overlay=enable=between(t\,5\,7)[tmp2];[tmp2][7:v]overlay=enable=between(t\,0\,5)[v_out];[8:a]atrim=duration=5,asetpts=PTS-STARTPTS[a1];[10:a]atrim=duration=2,asetpts=PTS-STARTPTS,adelay=5000|5000[a2];[9:a]atrim=duration=7,asetpts=PTS-STARTPTS[a3];[a1][a2][a3]amix=inputs=3:duration=longest[a_out]' \
  -map "[v_out]" -map "[a_out]" \
  -c:v libx264 -c:a aac -shortest output.mp4 -y


ffmpeg \  # The base command to start FFmpeg
  -loop 1 -t 1.00 -i "https://cdn.video2.ai/user-i/ui_1745608799321-image_1745608799320.png" \  # First image: loop once, 1 second duration
  -loop 1 -t 1.00 -i "https://cdn.video2.ai/user-i/ui_1745608800202-image_1745608800201.png" \  # Second image: loop once, 1 second duration
  -loop 1 -t 1.00 -i "https://cdn.video2.ai/user-i/ui_1745608801047-image_1745608801046.png" \  # Third image: loop once, 1 second duration
  -loop 1 -t 1.00 -i "https://cdn.video2.ai/user-i/ui_1745608802028-image_1745608802027.png" \  # Fourth image: loop once, 1 second duration
  -loop 1 -t 2.00 -i "https://cdn.video2.ai/user-i/ui_1745608803470-image_1745608803469.png" \  # Fifth image: loop once, 2 seconds duration
  -loop 1 -t 0.04 -i "https://cdn.video2.ai/user-i/ui_1745608796031-image_1745608796030.png" \  # Sixth image: loop once, 0.04 seconds (flash effect)
  -loop 1 -t 2.00 -i "https://cdn.video2.ai/user-i/ui_1745608802764-image_1745608802763.png" \  # Seventh image: loop once, 2 seconds duration
  -i "https://cdn.video2.ai/user-v/uv_1745608793763-video_1745608793761.mov" \  # Input video file (MOV format)
  -i "https://cdn.video2.ai/user-a/ua_1745608796797-audio_1745608796796.mp3" \  # First audio input (MP3)
  -i "https://cdn.video2.ai/user-a/ua_1745608798130-audio_1745608798129.mp3" \  # Second audio input (MP3)
  -i "https://cdn.video2.ai/user-a/ua_1745608804225-audio_1745608804224.mp3" \  # Third audio input (MP3)
  -filter_complex '\
    [0:v][1:v][2:v][3:v][4:v]concat=n=5:v=1:a=0[sl5];  # Concatenate first 5 images in sequence \
    [sl5][5:v]overlay=enable=between(t\,0\,0.04)[tmp1];  # Overlay the 6th image (flash) for first 0.04 seconds \
    [tmp1][6:v]overlay=enable=between(t\,5\,7)[tmp2];  # Overlay the 7th image between 5-7 seconds \
    [tmp2][7:v]overlay=enable=between(t\,0\,5)[v_out];  # Overlay the video for first 5 seconds \
    [8:a]atrim=duration=5,asetpts=PTS-STARTPTS[a1];  # Process first audio track for 5 seconds \
    [10:a]atrim=duration=2,asetpts=PTS-STARTPTS,adelay=5000|5000[a2];  # Process third audio track for 2 seconds with 5s delay \
    [9:a]atrim=duration=7,asetpts=PTS-STARTPTS[a3];  # Process second audio track for 7 seconds \
    [a1][a2][a3]amix=inputs=3:duration=longest[a_out]  # Mix all three audio tracks together \
  ' \  # End of filter_complex
  -map "[v_out]" -map "[a_out]" \  # Map the processed video and audio streams to the output
  -c:v libx264 -c:a aac -shortest output.mp4 -y  # H.264 video codec, AAC audio codec, end when shortest input stream finishes, output to file, overwrite if exists
