Guest User

Untitled

a guest
May 4th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. @echo off
  2. setlocal EnableDelayedExpansion
  3. set path1=%CD%
  4. cd temp
  5. set path2=%CD%
  6. cd old
  7. set path3=%CD%
  8. cd %path2%
  9. cd apps
  10. set path4=%CD%
  11. cd %path1%
  12. set seg=1
  13. set /p infile=What is the name of the input file you want to cut?
  14. set /p outfile=What do you wish to name the output file?
  15. :loopc1
  16. set /p start=Timecode to start the segment?
  17. set /p end=Timecode to end the segment?
  18. %path4%\ffmpeg -ss %start% -i %infile% -to %end% -copyts -vcodec copy -acodec copy %path2%\%seg%.ts
  19. Choice /M "another segment to cut?"
  20. If Errorlevel 2 Goto check
  21. end
  22. If Errorlevel 1 Goto add
  23. end
  24. :add
  25. set /a "seg+=1"
  26. goto loopc1
  27. :check
  28. cd %path2%
  29. (for %%i in (*.ts) do @echo file '%%i') > %path2%\cat.txt
  30. copy %path4%\ffmpeg.exe %path2%
  31. cd %path2%
  32. %path2%\ffmpeg -f concat -i %path2%\cat.txt -c copy %path1%\%outfile%.ts
  33. cd %path3%
  34. mkdir %outfile%
  35. cd %path2%
  36. move *.* %path3%\%outfile%
  37. :finnish
  38. exit
Add Comment
Please, Sign In to add comment