J2897

Clip a video using FFmpeg

Aug 16th, 2019
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.57 KB | None | 0 0
  1. @echo OFF
  2. cls
  3. set "PAUSES=1"
  4. setlocal
  5.  
  6. :: This is just for stripping the intro and outro from a video using FFmpeg.
  7.  
  8. REM The beginning and end of the clip [hh:mm:ss].
  9. set "START=00:00:12"
  10. set "END=00:14:19"
  11.  
  12. REM The source file and destination.
  13. set "INPUT=D:\Videos\ASMR.mp4"
  14. set "OUTPUT=D:\Videos\ASMR-clip.mp4"
  15.  
  16. REM FFmpeg variables.
  17. set "FFMPEG=%USERPROFILE%\Programs\ffmpeg\bin\ffmpeg.exe"
  18. set "OPTIONS_BEGIN=-hide_banner"
  19.  
  20. REM Main command.
  21. "%FFMPEG%" %OPTIONS_BEGIN% -i "%INPUT%" -ss %START% -to %END% -c copy "%OUTPUT%"
  22.  
  23. endlocal
  24. if %PAUSES% EQU 1 (pause)
Add Comment
Please, Sign In to add comment