-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsort-all.cmd
More file actions
55 lines (45 loc) · 1.08 KB
/
sort-all.cmd
File metadata and controls
55 lines (45 loc) · 1.08 KB
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
47
48
49
50
51
52
53
54
55
@echo off & setlocal enabledelayedexpansion
:INIT
set "dp=%~dp0"
:MAIN
for %%I in (*.mkv *.mp4 *.mpg *.mov *.avi *.webm) do (
call :PROCESS_FILE "%%I"
)
goto END
:PROCESS_FILE
set "VideoFile=%~1"
set "CheckMarkerFile=%~n1.checked"
set "NVEnc_Res="
set "NVEnc_Codec="
set "NVEnc_Crop=0:0:0:0"
if exist "!CheckMarkerFile!" exit /b
for /f "delims=" %%a in ('ffprobe -v error -select_streams v:0 -show_entries stream^=codec_name -of default^=noprint_wrappers^=1:nokey^=1 "%VideoFile%" 2^>nul') do (
set "NVEnc_Codec=%%a"
)
if /I "!NVEnc_Codec!"=="hevc" (
echo.
echo Verschiebe HEVC: "%VideoFile%"
if not exist "_HEVC" mkdir "_HEVC"
move "%VideoFile%" "_HEVC\"
exit /b
)
echo.
echo Verarbeite: "%VideoFile%" (Codec: !NVEnc_Codec!)
call run_probe.cmd "%VideoFile%"
echo.
if "!NVEnc_Res!"=="" (
set "NVEnc_Res=_Check"
)
if not "!NVEnc_Crop!"=="0:0:0:0" (
if not exist "!NVEnc_Res!" (
mkdir "!NVEnc_Res!"
)
move "%VideoFile%" "!NVEnc_Res!\"
) else (
type nul > "!CheckMarkerFile!"
attrib +h "!CheckMarkerFile!"
)
exit /b
:END
endlocal
exit /b 0