I'm a newbie in video processing, and I'm trying to write a program in Python. The program is to split a long video into some short videos by timestamp.
For example, I have an input, video long_video.avi
, which is 15 minutes long.
I want extract to 2 videos, short_1_5_video.avi
(1'-5') and short_6_10_video.avi
(6'-10').
The input video has container AVI
and video format JPEG
.
This is information of video (show in mediainfo tool):
I want find a CLI (command line interface) tool which I can invoke from Python. I tried some tools:
mp4box
(http://www.videohelp.com/tools/mp4box):But mp4box not support AVI file. It only supports MKV and MP4 file.
mkvmerge
(in mkv tool):But mkvmerge only supports MKV file.
ffmgeg
:But It seem not support split video by timestamp("seem" because I didn't find It in specification of ffmpeg).
I thought about convert input video from AVI
to MP4
or MKV
and then splitting it, but the time taken to do the conversion is too long.
Please suggest me a tool can splits AVI
file with JPEG
format video that can be controlled from the command line.
In addition, I also want to find a GUI tool that can do this.