Last active
September 19, 2020 07:09
-
-
Save KenshoFujisaki/f3026fba0e4ba4f8fd8fdac6b7ef8ffa to your computer and use it in GitHub Desktop.
複数のMP4ファイルを無劣化で連結するシェルスクリプト ワンライナー
This file contains 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
# 使い方) | |
# video_1.mp4, video_2.mp4, video_3.mp4,… を video.mp4 に連結したい時、 | |
# 冒頭のfilenameにファイル接頭辞videoを渡す。つまり、filename=videoとする。 | |
# ※FFMPEGを事前インストールしておく必要があります。 (macの場合は、$ brew install ffmpeg) | |
filename=ファイル名接頭辞;ffmpeg -f concat -safe 0 -i <(for f in ${filename}_*.mp4; do echo "file '$PWD/$f'"; done) -codec copy ${filename}.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment