以下の内容はhttps://marginalia.hatenablog.com/entry/20170905/1504627521より取得しました。


動画の連結

ffmpeg を使う。

連結する動画のファイル名から、以下のようなテキストファイルを作る。パスはフルパスを指定。
input.txt

file '/home/***/Documents/Ruby/video/sample1.mp4'
file '/home/***/Documents/Ruby/video/sample2.mp4'
file '/home/***/Documents/Ruby/video/sample3.mp4'
file '/home/***/Documents/Ruby/video/sample4.mp4'
file '/home/***/Documents/Ruby/video/sample5.mp4'

で、以下を実行。

$ ffmpeg -f concat -safe 0 -i input.txt -c copy output.mp4

「-safe 0」は

[concat @ 0x378c5e0] Unsafe file name '/home/***/Documents/Ruby/video/sample1.mp4'
input.txt: Operation not permitted

というエラーが出るため(フルパスを指定しなかった場合は必要ない)。

※参考
動画ファイルの連結|Linux活用メモ
【ffmpeg】動画・音声を連結する concat の使い方 其の3 - ニコニコ動画研究所




以上の内容はhttps://marginalia.hatenablog.com/entry/20170905/1504627521より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14