Skip to content

Instantly share code, notes, and snippets.

@mark-lumbao
Last active March 17, 2022 14:57
Show Gist options
  • Save mark-lumbao/aef04b86c2018e9f354d4ebc1100f93b to your computer and use it in GitHub Desktop.
Save mark-lumbao/aef04b86c2018e9f354d4ebc1100f93b to your computer and use it in GitHub Desktop.
Concatenate multiple audio and video files into one .mkv file
#!/bin/env bash
# Concatenate multiple audio and video files
# that are in the same directory into one .mkv file
ls |
xargs -I @ echo "file '@'" >> input.txt &&
ffmpeg -f concat -i input.txt -c copy output.mkv &&
rm input.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment