A command-line script to crop videos. In particular, this is for when someone films a landscape video in portrait mode and you need to crop into the actual video.
A utility to obtain a given time duration cut of a video.
mp4
Note: I have only tested the scripts onmp4
files. It may work with other video formats.
mp3
aac
- Python 3
imageio
tqdm
(for that sexy progress bar)
ffmpeg
- Python 3
moviepy
On the command line:
> ./path/to/vid-crop.sh ./path/to/original.mp4 ./path/to/new.mp4 CODECTYPE
where ./path/to/XXXX
is the relative path to entity XXXX
. CODECTYPE
is the audio codec of the video file. Currently we support only aac
and mp3
.
On the command line:
> python ./path/to/cut.py ./path/to/original.mp4 ./path/to/new.mp4 YY ZZ
Again ./path/to/XXXX
is the relative path to entity XXXX
. YY
and ZZ
are the start and end times (integer, in seconds) of the cut, respectively.
Running cut
on mp4
files, it seems that the audio encoding is changed to mp3
.
Ensure that there are no audio or video files named "temp" in the directory that you are running vid-crop
in. These may be overwritten.