Welcome to my collection of Bash scripts designed to simplify the process of converting files between different formats. This repository includes scripts for converting video and image formats using powerful tools like FFmpeg, making format conversions efficient and straightforward.
- Video Format Conversion: Convert videos between popular formats (e.g.,
.tsto.mp4,.mkvto.avi) with scripts that retain quality by copying video and audio streams without re-encoding. - Image Format Conversion: Easily switch between image formats (e.g.,
.webpto.png,.jpgto.gif) with batch conversion scripts. - Customizable: All scripts are easily customizable to suit different file types, input/output directories, and conversion options.
- Automated Processing: Automate the tedious task of manually converting multiple files, whether for images or videos.
-
Clone or download the repository:
git clone https://github.com/krit-sh/Bash-Script.git
-
Navigate to the script you need, open it, and modify the input/output paths or formats to fit your requirements.
-
Run the script from your terminal:
bash script_name.sh
FFmpeg is required to perform conversions in most of the scripts. Below are the instructions to install FFmpeg on different platforms:
-
Open your terminal.
-
Update the package list and install FFmpeg:
sudo apt update sudo apt install ffmpeg
-
Verify installation by checking the version:
ffmpeg -version
-
Open your terminal.
-
Install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
Use Homebrew to install FFmpeg:
brew install ffmpeg
-
Verify the installation:
ffmpeg -version
-
Download the latest FFmpeg build from FFmpeg.org.
-
Extract the downloaded ZIP file.
-
Add the
binfolder (from the extracted files) to your system's PATH:- Right-click on "This PC" > Properties > Advanced system settings > Environment Variables.
- Under "System Variables," find
Path, and click Edit. - Click New, then paste the path to the
binfolder of FFmpeg.
-
Open Command Prompt and verify the installation:
ffmpeg -version
Now you're ready to use the conversion scripts!