ffmpeg -i "C:\Users\Aarav Aditya Shah\Documents\GitHub\project-codebases\rust\reddit-motion\assets\videos\iXlI8hhiP6I.mp4" -i "C:\Users\Aarav Aditya Shah\Desktop\short.jpg" -loop 1 -ss 0 -t 12 -i "C:\Users\Aarav Aditya Shah\Desktop\background-images\i1.jpg" -loop 1 -ss 15 -t 22 output.mp4 C:\Users\Aarav Aditya Shah\Downloads ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\input.mp4" -i "C:\Users\Aarav Aditya Shah\Desktop\short.jpg" -loop 1 -ss 0 -t 12 -i "C:\Users\Aarav Aditya Shah\Desktop\background-images\i1.jpg" -loop 1 -ss 15 -t 22 output.mp4 ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\input.mp4" -loop 1 -i "C:\Users\Aarav Aditya Shah\Desktop\short.jpg" -filter_complex "[0] [1] overlay=0:0 [out]" output.mp4 ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\input.mp4" -i "C:\Users\Aarav Aditya Shah\Desktop\short.jpg" -filter_complex [0][1]overlay=x=0:y=0 output.mp4 ffmpeg -i video.mp4 -i overlay.png -filter_complex [0][1]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2 output.mp4 // Aligns in centre ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\input.mp4" -i "C:\Users\Aarav Aditya Shah\Desktop\short.jpg" -filter_complex [0][1]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2 "output.mp4" ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\input.mp4" -i "C:\Users\Aarav Aditya Shah\Desktop\short.jpg" -loop 1 -ss 0 -t 12 -filter_complex [0][1]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2 output.mp4 ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\input.mp4" -i "C:\Users\Aarav Aditya Shah\Desktop\short.jpg" -loop 1 -t 12 -filter_complex [0][1]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2 output.mp4 ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\input.mp4" -i "C:\Users\Aarav Aditya Shah\Desktop\short.jpg" -loop 1 -t 12 -ss 5 -filter_complex [0][1]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2 output.mp4 // crop video ffmpeg -i input.mp4 -filter:v "crop=w:h:x:y" output.mp4 // works ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\input.mp4" -filter:v "crop=200:200" output.mp4 ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\input.mp4" -filter:v "crop=200" output.mp4 // not works ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\input.mp4" -filter:v "scale=800:400" output.mp4 ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\input.mp4" -filter:v "scale=200:200" output.mp4 ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\input.mp4" -i "C:\Users\Aarav Aditya Shah\Desktop\short.jpg" -vf "crop=800:400" -filter_complex [0][1]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2"output.mp4" // crop and align image to center ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\input.mp4" -i "C:\Users\Aarav Aditya Shah\Desktop\short.jpg" -filter:v "crop=200" -filter_complex "[0][1]overlay=y=(main_h-overlay_h)/2" output.mp4 // extracts audio from video // fails ffmpeg -i input-video.avi -vn -acodec copy output-audio.aac ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\Eco vid.mp4" -vn -acodec copy "ecovid.mp3" // works ffmpeg -i sample.avi -q:a 0 -map a sample.mp3 ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\Eco vid.mp4" -q:a 0 -map a "ecovid.mp3" // puts audio as backgronud in video //works ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\input.mp4" -i "C:\Users\Aarav Aditya Shah\Music\Alesso - When I’m Gone (with Katy Perry).mp3" -c:v copy -filter_complex "[0:a]aformat=fltp:44100:stereo,apad[0a];[1]aformat=fltp:44100:stereo,volume=1.5[1a];[0a][1a]amerge[a]" -map 0:v -map "[a]" -ac 2 -t {video_length} "output.mp4" // merge audio + video + png\ //fails ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\input.mp4" -i "C:\Users\Aarav Aditya Shah\Music\Alesso - When I’m Gone (with Katy Perry).mp3" -i "C:\Users\Aarav Aditya Shah\Desktop\short.jpg" -c:v copy -filter_complex "[0:a]aformat=fltp:44100:stereo,apad[0a];[1]aformat=fltp:44100:stereo,volume=1.5[1a];[0a][1a]amerge[a];[0][1]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2" -map 0:v -map "[a]" -ac 2 -t 30 output.mp4" ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\input.mp4" -i "C:\Users\Aarav Aditya Shah\Music\Alesso - When I’m Gone (with Katy Perry).mp3" -i "C:\Users\Aarav Aditya Shah\Desktop\short.jpg" -filter_complex "[0:a]aformat=fltp:44100:stereo,apad[0a];[1]aformat=fltp:44100:stereo,volume=1.5[1a];[0a][1a]amerge[a];[0][1]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2" -map 0:v -map "[a]" -ac 2 -t 30 -loop 1 -ss 0 -t 30 "output.mp4" // ffprobe -v error -select_streams v -show_entries stream=width,height -of csv=p=0:s=x input.m4v 1280x720 ffprobe -v error -select_streams v -show_entries stream=width,height -of csv=p=0:s=x "C:\Users\Aarav Aditya Shah\Downloads\input.mp4" 1280x720 // correct loop over //fails ffmpeg -i input.mp3 -i input.mp4 -c:v copy -c:a aac -strict -2 output.mp4 ffmpeg -i "C:\Users\Aarav Aditya Shah\Music\Alesso - When I’m Gone (with Katy Perry).mp3" -i "C:\Users\Aarav Aditya Shah\Downloads\ffmpeg-6.0-full_build\ffmpeg-6.0-full_build\bin\input.mp4" -c:v copy -c:a aac -strict -2 output.mp4 // fails ffmpeg -i input.mp4 -i input.mp3 -c:v copy -map 0:v:0 -map 1:a:0 -loop 1 output.mp4 ffmpeg -i "C:\Users\Aarav Aditya Shah\Downloads\ffmpeg-6.0-full_build\ffmpeg-6.0-full_build\bin\input.mp4" -i "C:\Users\Aarav Aditya Shah\Music\Alesso - When I’m Gone (with Katy Perry).mp3" -c:v copy -map 0:v:0 -map 1:a:0 -loop 1 output.mp4 // works ffmpeg -stream_loop -1 -i input.mp4 -i input.mp3 -shortest -map 0:v:0 -map 1:a:0 -y out.mp4 ffmpeg -stream_loop -1 -i "C:\Users\Aarav Aditya Shah\Downloads\ffmpeg-6.0-full_build\ffmpeg-6.0-full_build\bin\input.mp4" -i "C:\Users\Aarav Aditya Shah\Music\Alesso - When I’m Gone (with Katy Perry).mp3" -shortest -map 0:v:0 -map 1:a:0 -y out.mp4 ffmpeg-6.0/bin/ffmpeg.exe -stream_loop -1 -i "bin/AskReddit/197qd7b/eng/video.mp4" -i "bin/AskReddit/197qd7b\\t1_ki4548l.mp3" -shortest -map 0:v:0 -map 1:a:0 -y out.mp4 //works ffmpeg -stream_loop -1 -i input.mp4 -i input.mp3 -ss 10 -shortest -map 0:v:0 -map 1:a:0 -y out.mp4 + t to restrict max duration ffmpeg -stream_loop -1 -i "C:\Users\Aarav Aditya Shah\Desktop\input.mp4" -i "C:\Users\Aarav Aditya Shah\Music\Alesso - When I’m Gone (with Katy Perry).mp3" -ss 5 -shortest -map 0:v:0 -map 1:a:0 -y out.mp4 // video len //nup ffprobe -i -show_entries format=duration -v quiet -of csv="p=0" ffprobe -i "C:\Users\Aarav Aditya Shah\Desktop\input.mp4" -i "C:\Users\Aarav Aditya Shah\Music\Alesso - When I’m Gone (with Katy Perry).mp3" -show_entries format=duration -v quiet -of csv="p=0" ffprobe -i "C:\Users\Aarav Aditya Shah\Desktop\input.mp4" -i "C:\Users\Aarav Aditya Shah\Music\Alesso - When I’m Gone (with Katy Perry).mp3" -show_entries format=duration -v quiet -of csv="p=0" // kinda ffmpeg -i input.ext 2>&1 | find "Duration" ffmpeg -i "C:\Users\Aarav Aditya Shah\Desktop\input.mp4" -i "C:\Users\Aarav Aditya Shah\Music\Alesso - When I’m Gone (with Katy Perry).mp3" 2>&1 | find "Duration" //works ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1 fifa.mp4 ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1 "C:\Users\Aarav Aditya Shah\Desktop\input.mp4" // combine mp4s ffmpeg -f concat -safe 0 -i concat.txt -c copy output.mp4 ffmpeg -f concat -safe 0 -i "C:\Users\Aarav Aditya Shah\Desktop\concat.txt" -c copy output.mp4 ffmpeg -i "concat:C:\Users\Aarav Aditya Shah\Desktop\input.mp4|C:\Users\Aarav Aditya Shah\Desktop\out.mp4|C:\Users\Aarav Aditya Shah\Desktop\out2.mp4|C:\Users\Aarav Aditya Shah\Desktop\output.mp4" -c copy output10.mp4 // Spilt into parts ffmpeg -i input.mp4 -c copy -map 0 -segment_time 00:20:00 -f segment output%03d.mp4 ffmpeg -i big_buck_bunny_480p_5mb.mp4 -acodec copy -f segment -segment_time 10 -vcodec copy -reset_timestamps 1 -map 0 output_time_%d.mp4 ffmpeg -i "C:\Users\Aarav Aditya Shah\Desktop\out.mp4" -acodec copy -f segment -segment_time 10 -vcodec copy -reset_timestamps 1 -map 0 output_time_%d.mp4 ffmpeg-6.0/bin/ffmpeg.exe -stream_loop -1 -i "bin/AskReddit/195ydoi/eng/video.mp4" -i "bin/AskReddit/195ydoi\\title.mp3" -ss 8.761524509291409 -t 12.012 -shortest -map 0:v:0 -map 1:a:0 -y "bin/AskReddit/195ydoi/eng/temp_0.mp4" ffmpeg-6.0/bin/ffmpeg.exe -stream_loop -1 -i "bin/AskReddit/197qd7b/eng/video.mp4" -i "bin/AskReddit/197qd7b\\title.mp3" -ss 8.761524509291409 -t 12.012 -shortest -map 0:v:0 -map 1:a:0 -y "bin/AskReddit/197qd7b/eng/test.mp4" ffmpeg-6.0/bin/ffmpeg.exe -stream_loop -1 -i "bin/AskReddit/197qd7b/eng/video.mp4" -i "bin/AskReddit/197qd7b\\t1_ki4548l.mp3" -ss 8.761524509291409 -t 12.012 -shortest -map 0:v:0 -map 1:a:0 -y "bin/AskReddit/197qd7b/eng/test.mp4" ffmpeg-6.0/bin/ffmpeg.exe -stream_loop -1 -i "bin/AskReddit/197qd7b/eng/video.mp4" -i "bin/AskReddit/197qd7b\\t1_ki4548l.mp3" -ss 8.761524509291409 -t 12.012 -map 0:v:0 -map 1:a:0 -y "bin/AskReddit/197qd7b/eng/test.mp4" ffmpeg-6.0/bin/ffmpeg.exe -stream_loop -1 -i "bin/AskReddit/195ydoi/eng/video.mp4" -i "bin/AskReddit/195ydoi\\title.mp3" -ss 8 -t 12 -shortest -map 0:v:0 -map 1:a:0 "bin/AskReddit/195ydoi/eng/temp_0.mp4" // DONT DO THIS CRASHSED COMPUTER ffmpeg-6.0/bin/ffmpeg.exe -stream_loop -1 -i "bin/AskReddit/195ydoi/eng/video.mp4" -i "bin/AskReddit/195ydoi\\title.mp3" -ss 8 -shortest -map 0:v:0 -map 1:a:0 "bin/AskReddit/195ydoi/eng/temp_0.mp4" ffmpeg -f concat -safe 0 -i "bin/AskReddit/196zuio/eng/concat.txt" -c copy "bin/AskReddit/196zuio/eng/final_temp.mp4" "ffmpeg-6.0/bin/ffmpeg.exe" -f concat -safe 0 -i "C:\\Users\\Aarav Aditya Shah\\Documents\\GitHub\\project-codebases\\rust\\reddit-motion\\bin\\AskReddit\\196zuio\\eng\\concat.txt" -c copy "bin/AskReddit/196zuio/eng/final_temp.mp4" "ffmpeg-6.0/bin/ffmpeg.exe" -f concat -i "C:\\Users\\Aarav Aditya Shah\\Documents\\GitHub\\project-codebases\\rust\\reddit-motion\\bin\\AskReddit\\196zuio\\eng\\concat.txt" -c copy "bin/AskReddit/196zuio/eng/final_temp.mp4" "ffmpeg-6.0/bin/ffmpeg.exe" -f concat -i "bin\AskReddit\196zuio\eng\concat.txt" -c copy "bin/AskReddit/196zuio/eng/final_temp.mp4" ====================================== // combing audio and video ffmpeg -stream_loop -1 -i 20s.ts -i 120s.mp3 -map 0:v:0 -map 1:a:0 -shortest -c copy output.mp4 ffmpeg-6.0\bin\ffmpeg.exe -stream_loop -1 -i "C:\Users\Aarav Aditya Shah\Documents\GitHub\project-codebases\rust\reddit-motion\bin\AskReddit\197qd7b\eng\video.mp4" -i "C:\Users\Aarav Aditya Shah\Documents\GitHub\project-codebases\rust\reddit-motion\bin\AskReddit\197qd7b\eng\t1_ki4548l.mp3" -map 0:v:0 -map 1:a:0 -shortest -c copy output.mp4 ffmpeg-6.0\bin\ffmpeg.exe -stream_loop -1 -i "C:\Users\Aarav Aditya Shah\Documents\GitHub\project-codebases\rust\reddit-motion\bin\AskReddit\197qd7b\eng\final_temp.mp4" -i "C:\Users\Aarav Aditya Shah\Documents\GitHub\project-codebases\rust\reddit-motion\bin\AskReddit\197qd7b\eng\t1_ki4548l.mp3" -map 0:v:0 -map 1:a:0 -shortest -c copy output.mp4 // putting pngs at points in video ffmpeg -i video -i image1 -i image2 -i image3 -filter_complex "[0][1]overlay=x=X:y=Y:enable='between(t,23,27)'[v1]; [v1][2]overlay=x=X:y=Y:enable='between(t,44,61)'[v2]; [v2][3]overlay=x=X:y=Y:enable='gt(t,112)'[v3]" -map "[v3]" -map 0:a out.mp4 ffmpeg-6.0\bin\ffmpeg.exe -i "C:\Users\Aarav Aditya Shah\Desktop\out.mp4" -i "C:\Users\Aarav Aditya Shah\Documents\GitHub\project-codebases\rust\reddit-motion\bin\AskReddit\197qd7b\eng\t1_ki3a4j8.png" -i "C:\Users\Aarav Aditya Shah\Documents\GitHub\project-codebases\rust\reddit-motion\bin\AskReddit\197qd7b\eng\t1_ki4548l.png" -i "C:\Users\Aarav Aditya Shah\Documents\GitHub\project-codebases\rust\reddit-motion\bin\AskReddit\197qd7b\eng\title.png" -filter_complex "[0][1]overlay=x=X:y=Y:enable='between(t,23,27)'[v1];[v1][2]overlay=x=X:y=Y:enable='between(t,44,61)'[v2];[v2][3]overlay=x=X:y=Y:enable='gt(t,112)'[v3]" -map "[v3]" -map 0:a out.mp4 // WORKS ffmpeg-6.0\bin\ffmpeg.exe -i "C:\Users\Aarav Aditya Shah\Desktop\out.mp4" -i "C:\Users\Aarav Aditya Shah\Documents\GitHub\project-codebases\rust\reddit-motion\bin\AskReddit\197qd7b\eng\t1_ki3a4j8.png" -i "C:\Users\Aarav Aditya Shah\Documents\GitHub\project-codebases\rust\reddit-motion\bin\AskReddit\197qd7b\eng\t1_ki4548l.png" -i "C:\Users\Aarav Aditya Shah\Documents\GitHub\project-codebases\rust\reddit-motion\bin\AskReddit\197qd7b\eng\title.png" -filter_complex "[0][1]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2:enable='between(t,23,27)'[v1];[v1][2]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2:enable='between(t,44,61)'[v2];[v2][3]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2:enable='gt(t,112)'[v3]" -map "[v3]" -map 0:a out.mp4 ffmpeg-6.0\bin\ffmpeg.exe -i "C:\Users\Aarav Aditya Shah\Desktop\out.mp4" -i "C:\Users\Aarav Aditya Shah\Documents\GitHub\project-codebases\rust\reddit-motion\bin\AskReddit\197qd7b\eng\t1_ki3a4j8.png" -i "C:\Users\Aarav Aditya Shah\Documents\GitHub\project-codebases\rust\reddit-motion\bin\AskReddit\197qd7b\eng\t1_ki4548l.png" -i "C:\Users\Aarav Aditya Shah\Documents\GitHub\project-codebases\rust\reddit-motion\bin\AskReddit\197qd7b\eng\title.png" -filter_complex "[0][1]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2:enable='between(t,23,27)'[1];[1][2]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2:enable='between(t,44,61)'[2];[2][3]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2:enable='gt(t,112)'[3]" -map "[3]" -map 0:a out.mp4 ====== ffmpeg -i input.mp4 -filter_complex "[0:v]loop=loop_duration=30:loop_start=10[v]" output.mp4 ffmpeg-6.0\bin\ffmpeg.exe -i "C:\Users\Aarav Aditya Shah\Desktop\input.mp4" -filter_complex "[0:v]loop=loop_duration=60:loop_start=5[v]" output.mp4 ffmpeg -i input.mp4 -t {maxlen}-filter_complex "[0:v]loop=loop_start=10[v]" output.mp4 ffmpeg-6.0\bin\ffmpeg.exe -i "C:\Users\Aarav Aditya Shah\Desktop\input.mp4" -s 10 -t 60 -filter_complex "[0:v]loop=loop_start=5[v]" output.mp4 ffmpeg -stream_loop -1 -i input.mp4 -i input.mp3 -ss 10 -shortest -map 0:v:0 -map 1:a:0 -y out.mp4 ffmpeg-6.0\bin\ffmpeg.exe -stream_loop -1 -i "C:\Users\Aarav Aditya Shah\Desktop\input.mp4" -i "C:\Users\Aarav Aditya Shah\Downloads\censorbeep.mp3" -ss 5 -t 60 -shortest -map 0:v:0 -map 1:a:0 -y out.mp4 // WORKS -> Extend with to duration -> no audio output ffmpeg-6.0\bin\ffmpeg.exe -stream_loop -1 -i "C:\Users\Aarav Aditya Shah\Desktop\input.mp4" -i "C:\Users\Aarav Aditya Shah\Downloads\censorbeep.mp3" -ss 5 -t 60 -map 0:v:0 -map 1:a:0 -y out.mp4 // WoRKS -> Extend to duration -> no audio needed ffmpeg-6.0\bin\ffmpeg.exe -stream_loop -1 -i "C:\Users\Aarav Aditya Shah\Desktop\input.mp4" -ss 5 -t 60 -map 0:v:0 -y out.mp4