forked from KnightDanila/BAT_FFMPEG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Video-CutAccurateBeta.bat
48 lines (40 loc) · 1.6 KB
/
Video-CutAccurateBeta.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
REM https://superuser.com/questions/499380/accurate-cutting-of-video-audio-with-ffmpeg
REM https://superuser.com/questions/138331/using-ffmpeg-to-cut-up-video
REM https://stackoverflow.com/questions/15629490/how-to-cut-part-of-mp4-video-using-ffmpeg-without-losing-quality
@echo off
echo %CD%
echo %~dp0
cd /d %~dp0
REM For first file
REM %1
REM For multiple files
echo %*
set COUNTER=0
for %%x in (%*) do (
echo %%x
set /A COUNTER+=1
)
echo COUNTER = %COUNTER%
if %COUNTER% GTR 0 (
if %COUNTER% EQU 1 (
echo _____GET ONE FILE_____
) else (
echo _____GET MULTI FILES: %COUNTER% files_____
)
for %%x in (%*) do (
REM //////////////////// MAIN \\\\\\\\\\\\\\\\\\\\\\\\\
REM -ss - start
REM -to - duration
REM hh:mm:ss.mss
REM ffmpeg -i %%x -vcodec copy -acodec copy -ss 00:00:25 -to 00:25:33 "%%~nx_output_CUT.mp4"
REM ffmpeg -ss 00:00:00 -i %%x -to 00:02:28.327 -acodec copy -vcodec copy -map_metadata 0 -map 0 "%%~nx_output_CUT.mkv"
REM ffmpeg -ss 00:00:00 -i %%x -ss 00:00:00 -to 00:02:28.327 -acodec copy -vcodec copy -map_metadata 0 -map 0 "%%~nx_output_CUT.mkv"
REM ffmpeg -ss 00:03:10.360 -i %%x -to 00:05:28.327 -acodec copy -vcodec copy -map_metadata 0 -map 0 "%%~nx_output_CUT.mkv"
REM ffmpeg -i %%x -ss 00:16:28.000 -to 00:28:28.327 -acodec copy -vcodec copy -map_metadata 0 -map 0 "%%~nx_output_CUT.%%~xx"
ffmpeg -i %%x -ss 00:16:21.000 -to 00:45:28.327 -acodec aac -vcodec copy -map_metadata 0 -map 0 "%%~nx_output_CUT.%%~xx"
REM ffmpeg -i %%x -vcodec copy -acodec copy -ss 00:00:11.2 -to 00:00:13.2 "%%~nx_output_CUT.mp4"
)
) else (
echo _____GET NO ONE FILES_____
)
pause