Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal EnableDelayedExpansion
- set path1=%CD%
- cd temp
- set path2=%CD%
- cd old
- set path3=%CD%
- cd %path2%
- cd apps
- set path4=%CD%
- cd %path1%
- set seg=1
- set /p infile=What is the name of the input file you want to cut?
- set /p outfile=What do you wish to name the output file?
- :loopc1
- set /p start=Timecode to start the segment?
- set /p end=Timecode to end the segment?
- %path4%\ffmpeg -ss %start% -i %infile% -to %end% -copyts -vcodec copy -acodec copy %path2%\%seg%.ts
- Choice /M "another segment to cut?"
- If Errorlevel 2 Goto check
- end
- If Errorlevel 1 Goto add
- end
- :add
- set /a "seg+=1"
- goto loopc1
- :check
- cd %path2%
- (for %%i in (*.ts) do @echo file '%%i') > %path2%\cat.txt
- copy %path4%\ffmpeg.exe %path2%
- cd %path2%
- %path2%\ffmpeg -f concat -i %path2%\cat.txt -c copy %path1%\%outfile%.ts
- cd %path3%
- mkdir %outfile%
- cd %path2%
- move *.* %path3%\%outfile%
- :finnish
- exit
Add Comment
Please, Sign In to add comment