Created
July 10, 2015 05:46
-
-
Save Fire-/5f88514915eb8358d87b to your computer and use it in GitHub Desktop.
cut content with ffmpeg
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 | |
:begin | |
if "%~1" == "" goto end | |
set "done=" | |
set "start_ts=" | |
set "end_ts=" | |
echo( | |
echo "Cutting: %~1" | |
echo( | |
set /p start_ts="Enter starting timestamp ( Format: hh:mm:ss.mus, eg: 00:38:32.570 ): " | |
set /p end_ts="Enter ending timestamp ( format: hh:mm:ss.mus, eg: 00:57:42.700 ): " | |
ffmpeg -i "%~1" -ss %start_ts% -to %end_ts% -c copy "%~1_%date:~7,2%-%date:~4,2%-%date:~10,4%_%time:~0,2%_%time:~3,2%_%time:~6,2%".mp4 | |
echo( | |
set /p done="Done with this file? [Y|n]: " | |
if not "%done%" == "n" (shift) | |
goto begin | |
:end | |
echo( | |
echo "All done!" | |
echo( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It requires ffmpeg's executable to be in the
PATH
note:
echo(
prints a blank line