If you've ever edited a video, you may understand.
After all, cutting work is the most time-consuming and troublesome.
If you can do that hourly work in less than 5 minutes,
What a delight.
That kind of joy can be achieved by writing a program.
The most familiar language is Python.
Using jumpcutter, a package of the Python language
I'm going to try video editing.
Before After
Without further ado, let's take a look at Before After.
There are some parts that I don't know what I'm talking about.
There should be no problem because the tempo is transmitted well.
Before
After
Environment
・WSL2
・Jupyter Notebook
jumpcutter GitHub URL
jumpcutter
Just 2 lines of Python code
First, install Jumpcutter.
!pip install jumpcutter
Then run it.
!jumpcutter -i <path of the video you want to cut> -o <path and file name of the video you have finished cutting>
In the author's case
The path looked like this:
In addition, the -m option set the percentage of the maximum value of an audio signal to be considered a silent signal to 10%.
The default is 2% (0.02).
!jumpcutter -i '/mnt/c/Users/Sugi/Downloads/movie.mp4' -o '/mnt/c/Users/Sugi/Downloads/movie.mp4' -m 0.1
By the way, there are the following points to note.
・Cannot be executed with extensions other than '.mp4', '.ogv', or '.webm'
・ If you do not give appropriate options, it will not be cut (or it will be cut too much)
Summary
Video editing is in high demand.
Be more efficient
Also, when thinking about what to do using your knowledge as an engineer
We thought there was a solution like this.
I hope you will give it a try.
Thank you for reading to the end.