Linux Keyframe Script Guide
Installing prerequisites
First we will need the following things to install:
- ffmpeg
- libxvidcore
- scxvid
To install ffmpeg all we need to do is open terminal, you can either by ctrl+alt+t or right click on the desktop on pressing open terminal here.
Then we will run the following command in the terminal:
sudo apt -y install ffmpeg
- sudo - allow administrator premission so the ffmpeg could be installed in the system
- apt - this is ubuntu default package manager
- -y - this a flag that allow to skip the "Do you want to install [y/n]" part when installing
- ffmpeg - pretty self explanatory
Now we will install libxvidcore the same way with the command:
sudo apt -y install libxvidcore-dev
After we installed both of the package we can download and compile scxvid.
We download the code from the following link:
scxvid download
In the link we will press the big green button that says "Clone or download" and press "download zip".
Save the zip file in your desired package and then open the file explorer in the folder and chooce extract here.
After we extract the zip we will have a folder named: SCXvid-standalone-master
enter the folder than right click and choose open terminal here.
Then we will run the following command in the terminal
cc -o scxvid scxvid.c -lxvidcore
this will compile the code are output an executable file called scxvid in the same folder.
Prepering the script
Now that we have everything set we can download the Create_Keyframes code.
Download it from the following link:
Download Create_Keyframe
Then open the file in you favorite editor and edit the following line:
SCXvid=/path/to/complied/scxvid
Change to the place you compiled the scxvid, so if you extracted the zip into the Downloads folder your path should look something like this:
~/Downloads/SCXvid-standalone-master/scxivd
Save the files and exit,
Change the premissions to the Create_Keyframes file in the terminal by running the following command:
chmod +777 ./Create_Keyframes.sh
This will make the script executable.
Generating Keyframes
now all we have to do in order to generate keyframes is to put the video we want in the same folder as Create_Keyframes.sh open terminal and running the following command:
./Create_Keyframes.sh video_name
And wait for it to finish then we will have glorious keyframes.