Created
April 16, 2018 12:55
-
-
Save mono0x/f4aa4f6bdc39f67590f984a23094fb8c to your computer and use it in GitHub Desktop.
Concat movie files using ffmpeg (for Windows)
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
@echo off | |
setlocal EnableExtensions | |
:genuniq | |
set "tmpfile=%tmp%\bat~%RANDOM%.txt" | |
if exist "%tmpfile%" goto :genuniq | |
set "output=%~dpn1_combined%~x1" | |
:loop | |
set "f=%~f1" | |
rem replace \ to / | |
set "f=%f:\=/%" | |
rem replace & to ^& | |
set "f=%f:&=^&%" | |
echo file '%f%' >> "%tmpfile%" | |
shift | |
if not "%~1" == "" goto loop | |
ffmpeg.exe -f concat -safe 0 -i "%tmpfile%" -c copy "%output%" | |
del "%tmpfile%" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment