A simple cli tool written in shell to convert and trim video and audio files using ffmpeg.
- Bash
- FFmpeg must be installed
- Clone the repository to a local folder:
git clone https://github.com/SherpadNdabambi/my-video-converter.git
- cd into the locally created folder:
cd my-video-converter
- Run the installation script:
./install.sh
My Video Converter currently supports two operations: convert and trim.
To convert from one format to another:
myVideoConverter convert [ source file ] [output file ]
To trim a file:
myVideoConverter trim [ source file ] [ start time ] [ stop time ]
The following command will convert an MP4 video to an mp3 file:
myVideoConverter convert my_video.mp4 my_audio.mp3
This command will cut a song from the 4 second mark to the end of the song (i.e. it will trim off the first 4 seconds of the song).
myVideoConverter trim my_song.mp3 4
The output will be saved as my_song-trimmed.mp3 in the same directory as the source file.
myVideoConverter trim my_video.mp4 0 1:24:32
myVideoConverter trim my_video.mp4 0:16:32 1:27:45
- My Video Converter currently supports only input files without spaces in their name. I'll look for a solution as soon as I have more time to work on the script. Anyone with a solution is welcome to make a pull request or suggest a solution.