bigsml / vidmerger

πŸ“Ό Merge video & audio files via CLI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fusion gif

Vidmerger

A wrapper around FFmpeg which simplifies merging of multiple videos.

graph LR;
Video_A-->Vidmerger;
Video_B-->Vidmerger;
Vidmerger-->FPS_Changer;
FPS_Changer-->Merger;
Merger-->Chapterer;
Chapterer-->Video_A+B;

Vidmerger-->Merger;
Merger-->Video_A+B;

fusion gif

πŸ™‰ What is this exactly?

Vidmerger is a command-line-tool which uses ffmpeg to merge multiple video-files with the same file-extension into one file, for example running vidmerger . on mp4 files would create a merged video called output.mp4 🐣

Here is the usage help of vidmerger πŸ€—

A wrapper around ffmpeg which simlifies merging multiple videos 🎞  Everything in between the first
`-` till the fill extension of the input files will be used as chapter titles.

USAGE:
    vidmerger [OPTIONS] <TARGET_DIR>

ARGS:
    <TARGET_DIR>    Sets the input file to use

OPTIONS:
    -f, --format <format>     Specifies which formats should be merged individually, the default is
                              πŸ‘‰ 3g2,3gp,aac,ac3,alac,amr,ape,au,avi,awb,dts,f4a,f4b,f4p,f4v,flac,flv,m4a,m4b,m4p,m4r,m4v,mkv,mov,mp2,mp3,mp4,mpeg,mpg,oga,ogg,ogm,ogv,ogx,opus,pcm,spx,wav,webm,wma,wmv
        --fps <fps>           Generates videos inside a temporary folder with this fps value and
                              merges them
    -h, --help                Print help information
        --shutdown            For doing a shutdown at the end (needs sudo)
        --skip-chapterer      Skips the chapterer
        --skip-fps-changer    Skips the fps changer
        --skip-wait           Skips the wait time for reading
    -V, --version             Print version information```

✨ Installing / Getting started

You can install it on all the three major operating systems πŸ€—

x86

Platform Packager Command
🍎 MacOS 🍺 Homwbrew brew tap tgotwig/vidmerger
brew install vidmerger
🐧 Linux 🍺 Homwbrew brew tap tgotwig/linux-vidmerger
brew install vidmerger
🐧 Linux 🍺 WGET sudo wget -c https://github.com/TGotwig/vidmerger/releases/latest/download/vidmerger-linux.tar.gz -P /tmp && sudo tar -xzvf /tmp/vidmerger-linux.tar.gz -C /usr/local/bin
πŸ³οΈβ€πŸŒˆ Windows 🍫 Chocolatey choco install ffmpeg # prerequisite
choco install vidmerger

ARM

Platform Packager Command
🍎 MacOS 🍺 Homwbrew brew tap tgotwig/vidmerger
brew install vidmerger
🐧 Linux 🍺 WGET sudo wget -c https://github.com/bonny1992/vidmerger/releases/latest/download/vidmerger-linux-arm64.tar.gz -P /tmp && sudo tar -xzvf /tmp/vidmerger-linux-arm64.tar.gz -C /usr/local/bin

🐳 Run it without installing

You can also use Docker to run vidmerger without installing anything except Docker, hosted on Dockerhub.

docker container run -v <ABSOLUTE-PATH-TO-YOUR-VIDEOS>:/data tgotwig/vidmerger

Example with Bash:

docker container run -v `pwd`/data:/data tgotwig/vidmerger

βš™οΈ Developing

Built With

Rust and some listed Crates inside of Cargo.toml under dependencies.

Prerequisites

Setting up Dev

Once you are done with installing the prerequisites, you should run task to see if everything runs smooth:

git clone git@github.com:TGotwig/vidmerger.git
cd vidmerger
task

Also click on fork from the top right corner of this repository and run:

git remote add <your-github-name> git@github.com:<your-github-name>/vidmerger.git

Here is a little tutorial about working with forks along with GitKraken πŸ™

Building

Run task build to build for Mac, Linux and Windows. You can find the compressed Mac & Linux .tar.gz-archives for Github under target/tars, the .exe file for Windows under tools.

Deploying / Publishing

Automated steps

  • Homebrew (MacOS & Linux): Gets automatically deployed by release.yml after pushing a git tag.
  • Chocolatey (Windows): Gets automatically deployed by release.yml after pushing a git tag.

Manual steps

Increasing all versions by find and replace, then after task build:

  • Dockerhub: Run task publish_dockerhub.

πŸ“¦ Versioning

We use SemVer for versioning.

πŸ§ͺ Tests

  • For major tests: task test (requires yt-dlp and ffmpeg to be installed)
  • For linting tests: task lint

🌟 Style guide

πŸ“œ Licensing

MIT License with β€œCommons Clause”.

About

πŸ“Ό Merge video & audio files via CLI

License:Other


Languages

Language:Rust 98.6%Language:Dockerfile 1.4%