3.2 KiB
3.2 KiB
Video Tools CLI
A simple command-line utility for video conversion and merging using FFmpeg.
Designed for personal use and sharing with friends.
Works on both Linux and Windows (via Git Bash or WSL).
Overview
This tool provides two main commands:
| Command | Description |
|---|---|
convert-single |
Converts a single video file to MP4 using modern compression. |
convert-multiple |
Combines multiple video files into one high-quality MP4. |
All output files are saved in your ~/Videos directory by default.
Requirements
Linux
Install FFmpeg with your package manager:
sudo pacman -S ffmpeg # For Arch or Garuda
sudo apt install ffmpeg # For Debian or Ubuntu
Windows
- Install FFmpeg from https://ffmpeg.org/download.html
- Use Git Bash or WSL to run the script.
Installation
-
Clone or copy the repository:
git clone https://github.com/YourName/VideoTools.git cd VideoTools -
Make the script executable:
chmod +x video-tools.sh -
(Optional) Add it to PATH:
sudo ln -s ~/VideoTools/video-tools.sh /usr/local/bin/video-tools
You can now run it globally:
video-tools convert-single "input.avi" "output.mp4"
Default Settings
| Setting | Value | Description |
|---|---|---|
| Output directory | ~/Videos |
All results are stored here |
| Video codec | libx264 |
High-quality H.264 encoding |
| Audio codec | aac |
High-quality AAC stereo audio |
| Quality (CRF) | 18 | Visually lossless quality |
| Preset | slow | Balances speed and compression |
| Audio bitrate | 192k | High-quality stereo output |
These defaults prioritize quality while still reducing file sizes compared to older formats such as AVI or MPG.
Example Conversions
Convert a single AVI file
video-tools convert-single \
"/run/media/stu/Linux/MyData/Videos/Example Collection/Example Movie Part1.avi" \
"Example Movie.mp4"
Output:
/home/stu/Videos/Example Movie.mp4
Combine multiple AVI parts into one MP4
video-tools convert-multiple \
"/run/media/stu/Linux/MyData/Videos/Example Collection/Example Movie Part1.avi" \
"/run/media/stu/Linux/MyData/Videos/Example Collection/Example Movie Part2.avi" \
"/run/media/stu/Linux/MyData/Videos/Example Collection/Example Movie Part3.avi" \
"Example Movie Combined.mp4"
Output:
/home/stu/Videos/Example Movie Combined.mp4
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
command not found |
Script not in PATH | Use full path or add symlink to /usr/local/bin |
ffmpeg not found |
FFmpeg not installed | Install FFmpeg using your package manager |
Permission denied |
Script not executable | Run chmod +x video-tools.sh |
| Merge fails | Input files have mismatched codecs | Convert each input to MP4 first, then merge |
Roadmap
| Feature | Status |
|---|---|
| convert-single | ✅ Done |
| convert-multiple | ✅ Done |
| upscale-video | 🔜 Planned |
| batch conversion | 🔜 Planned |
| automatic format detection | 🔜 Planned |
License
Free for personal use.
You can modify or share this tool with anyone.