added ffmpeg scripts for clipping and removing sound for windows

This commit is contained in:
Lucca Pirovano
2026-07-07 16:29:57 -04:00
parent 802744551b
commit 14847a4caa
3 changed files with 64 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
@echo off
setlocal
if "%~3"=="" (
echo Usage: %~nx0 input_file start_time end_time
echo Example: %~nx0 video.mp4 00:01:30 00:02:45
echo Example: %~nx0 video.mp4 90 165
exit /b 1
)
set "INPUT=%~1"
set "START=%~2"
set "END=%~3"
set "OUTPUT=%~dpn1_cropped%~x1"
ffmpeg -hide_banner -loglevel error ^
-ss %START% ^
-to %END% ^
-i "%INPUT%" ^
-c copy ^
"%OUTPUT%"
if errorlevel 1 (
echo Failed.
exit /b 1
)
echo Done.
echo Output: "%OUTPUT%"
+34
View File
@@ -0,0 +1,34 @@
@echo off
setlocal enabledelayedexpansion
REM Process all video files in the parent directory.
REM Copies the video stream without re-encoding and removes all audio.
REM Output files are written to the current directory.
for %%F in (
"..\*.mp4"
"..\*.mkv"
"..\*.mov"
"..\*.avi"
"..\*.webm"
"..\*.m4v"
"..\*.ts"
"..\*.mts"
"..\*.m2ts"
"..\*.flv"
"..\*.wmv"
) do (
if exist "%%~F" (
echo Processing: %%~nxF
ffmpeg -hide_banner -loglevel error -y ^
-i "%%~F" ^
-map 0:v ^
-c:v copy ^
-an ^
"%%~nxF"
)
)
echo.
echo Done.
pause