This encode
script is useful to converto from .mkv file to .mp4 or reduce bigest files.
brew install ffmpeg
sudo apt update
sudo apt install ffmpeg
Follow this link for Windows installation: Windows ffmpeg setup
You can check if ffmpeg installation was succesful by using the following command in your terminal:
ffmpeg -version
Create a simple file called encode
(without extension) and put following code:
#!/usr/bin/env bash
ffmpeg -i "$1" -vcodec h264 -acodec aac "$2"
After that, apply the following execution permission:
chmod u+x encode
The next steps will show you how to use.
./encode input.mkv output.mp4
./encode input.mp4 output.mp4