Skip to content

Instantly share code, notes, and snippets.

@umihico
Created August 4, 2018 05:29
Show Gist options
  • Save umihico/50efebf84769a8040de7a16f999adbf0 to your computer and use it in GitHub Desktop.
Save umihico/50efebf84769a8040de7a16f999adbf0 to your computer and use it in GitHub Desktop.
windowsコマンドプロンプト・ffmpeg経由でmp4,mov動画ファイルを結合
for %%i in (*.mp4 *.mov) do (
ffmpeg -i %%i -c copy -bsf:v h264_mp4toannexb -f mpegts %%i.ts
)
type nul > _list.txt
for %%i in (*.ts) do (echo file %%i) >> _list.txt
ffmpeg -f concat -i _list.txt -c copy concated_temp.ts
ffmpeg -i concated_temp.ts -c copy -bsf:a aac_adtstoasc output.mp4
del /q *.ts _list.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment