Simple shell script for concatenating video files of the same dimensions and encoding.
This simply copies the data and does not re-encode, so it's speedy (hours of video will concatenate in seconds).
- ffmpeg
- Mac users can install with
brew install ffmpeg
- Mac users can install with
- Copy
vidcat
somewhere that you want it. cd
to that directory.chmod 755 vidcat
- When you want to run it, specify the path:
~/mydir/vidcat *.mp4 outfile.mp4
Alternately, you can add that directory to your PATH
variable so that
the shell can always find vidcat
. E.g.
mkdir -p ~/.local/bin
cp vidcat ~/.local/bin
chmod 755 ~/.local/bin/vidcat
and in your ~/.bashrc
file:
export PATH=$PATH:~/.local/bin
then relaunch your shell. You should be able to then:
vidcat *.mp4 outfile.mp4
from any directory.
- Install bash somehow
- Install
vidcat
kinda like for Mac - ...
- Profit!
vidcat vidfile [ vidfile ... ] outfile
vidcat
will steadfastly refuse to overwrite any existing file.
Manually remove your outfile ahead of time if you need to overwrite it.
vidcat zoom*mp4 outfile.mp4
vidcat zoom_1.mp4 zoom_3.mp4 outfile.mp4
vidcat *.mp4 outfile.mp4