gpt-3.5-turbo-0125· OpenAI
WildChat-4.8M (AI2)
Create a script for mac that merges 2 mp4 videos together (one after the other) using…
- User
Create a script for mac that merges 2 mp4 videos together (one after the other) using ffmpeg. My ffmpeg location on my mac is /opt/homebrew/bin/ffmpeg
- Assistant
#!/bin/bash
Define the paths to the input videos
video1="path/to/video1.mp4" video2="path/to/video2.mp4"
Define the output path
output="path/to/output.mp4"
Run ffmpeg to merge the videos
/opt/homebrew/bin/ffmpeg -i "video2" -filter_complex "[0:v:0][0:a:0][1:v:0][1:a:0]concat=n=2:v=1:a=1[outv][outa]" -map "[outv]" -map "[outa]" "$output"
echo "Videos merged successfully"