Skip to content

Instantly share code, notes, and snippets.

@nyanshiba
Created May 14, 2018 10:40
Show Gist options
  • Save nyanshiba/be79aac633719c73296bcaea782a987e to your computer and use it in GitHub Desktop.
Save nyanshiba/be79aac633719c73296bcaea782a987e to your computer and use it in GitHub Desktop.
@echo on
rem カレントディレクトリをD&Dしたフォルダに
cd /d %1
rem フォルダ内のmovを順番に呼んで
for %%a in ( *.mov ) do (
rem tsに変換
ffmpeg -i "%%a" -c copy -bsf:v h264_mp4toannexb "%%~dpna.ts"
rem txtにファイルの名前のみ出力
@echo file %%~na.ts >> input.txt
)
rem 結合
ffmpeg -fflags +discardcorrupt -f concat -safe 0 -i input.txt -c copy output.mp4
pause
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment