Created
May 23, 2019 17:11
-
-
Save Domin8-IPTV/70e6fe102d06645027efcad71ce752f0 to your computer and use it in GitHub Desktop.
ffmpeg concatenate all media files in the current directory with .mp4 extension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# use ffmpeg to concatenate all the mp4 files in the media directory | |
# make file executable and run like this | |
# ./make247.sh /path/to/media/folder | |
# | |
IN_DIR="$1"; | |
if [ "$IN_DIR" = '' ] ; then | |
IN_DIR="." | |
fi | |
for f in ${IN_DIR}/*.mp4; do echo "file '$f'" >> concat-list.txt; done | |
ffmpeg -noautorotate -safe 0 -f concat -i concat-list.txt -c copy output.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment