Last active
June 5, 2023 09:13
-
-
Save seaque/97947371029d53b2432c00a69b05d1a2 to your computer and use it in GitHub Desktop.
ffmpeg batch files.
This file contains hidden or 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 | |
:again | |
ffmpeg ^ | |
-i "%~1" ^ | |
"%~p1%~n1.srt" | |
if NOT ["%errorlevel%"]==["0"] goto:error | |
echo [92m%~n1 Done![0m | |
shift | |
if "%~1" == "" goto:end | |
goto:again | |
:error | |
echo [93mThere was an error. | |
pause | |
exit 0 |
This file contains hidden or 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 | |
echo Processing: "%~nx1" | |
ffmpeg -v error -stats -y -i "%~1" "%~n1".mp4 | |
if errorlevel 1 pause |
This file contains hidden or 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 | |
echo, | |
set /P ts_start="Start: " | |
set /P ts_end="End: " | |
echo Processing: "%~nx1" | |
ffmpeg -v error -stats -y -ss %ts_start% -i "%~1" -to %ts_end% -c:v copy -c:a copy -avoid_negative_ts 1 -copyts "%~n1"_"trim".mkv | |
if errorlevel 1 pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment