GlueMP4 is a simple driver script for ffmpeg to trim, crop and concatenate MP4 video fragments. It was developed to combine fragments of a lecture, recorded by screencasting on a tablet, into a single video clip.
pip install git+https://github.com/tovrstra/gluemp4.git@master
You also need to install ffmpeg separately:
-
On Fedora Linux, first activate RPM Fusion. Then run the following install command:
sudo dnf install ffmpeg --allowerasing
Make a YAML config file config.yaml
describing the fragments going into the video clip:
fragments:
- ["some_file1.mp4", "width:height:xleft:ytop", start, stop or null]
- ["some_file2.mp4", "width:height:xleft:ytop", start, stop or null]
- ...
output: final_output.mp4
Then run gluemp4 config.yaml
.
Take a single snapshot from your video, e.g. with ffmpeg at second 3 of the video:
ffmpeg -i input.mp4 -ss 3.0 -f image2 -vframes 1 snapshot.jpeg
Then open the image snapshot.jpeg
in teh Gimp and draw a rectangle with the
cropping tool, e.g. one that fits neatly your slide. Do not crop yet, just read
the parameters of the cropping window and copy them to the config file.