-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaudio_extract_fix_to_mp3_256_44100_to_fixed_folder.cmd
69 lines (60 loc) · 1.54 KB
/
audio_extract_fix_to_mp3_256_44100_to_fixed_folder.cmd
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@echo off
:: Enable Unicode support.
chcp 65001 2>nul >nul
mkdir "%~sdp1fixed" 2>nul >nul
:LOOP
::has argument ?
if ["%~1"]==[""] (
echo done.
goto END;
)
::argument exist ?
if not exist %~s1 (
echo not exist
goto NEXT;
)
::file exist ?
echo exist
if exist %~s1\NUL (
echo is a directory
goto NEXT;
)
::OK
echo is a file
set "FILE_INPUT=%~s1"
set "FILE_OUTPUT=%~sdp1fixed\%~n1.mp3"
set ARGS=
::program switches
set ARGS=%ARGS% -y -hide_banner -loglevel "info" -stats -threads "2" -strict "experimental"
::flags
set ARGS=%ARGS% -flags "+low_delay+global_header-unaligned-ilme-cgop-loop-output_corrupt"
set ARGS=%ARGS% -flags2 "+fast+ignorecrop+showall+export_mvs"
set ARGS=%ARGS% -fflags "+ignidx+genpts+nofillin+discardcorrupt-fastseek"
set ARGS=%ARGS% -movflags "+faststart+disable_chpl"
set ARGS=%ARGS% -avoid_negative_ts "make_zero"
::ignore invalid data
set ARGS=%ARGS% -ignore_unknown
::start/finish
set ARGS=%ARGS% -ss "00:00:00.001"
::set ARGS=%ARGS% -to "00:00:05.000"
::meta data processing
set ARGS=%ARGS% -map_chapters "-1"
set ARGS=%ARGS% -map_metadata "-1"
::explicit "audio only" mode
set ARGS=%ARGS% -sn -vn
::audio processing
set ARGS=%ARGS% -af "asetpts=PTS-STARTPTS,aresample=async=1:min_hard_comp=0.100000" -vsync "1"
::audio quality
set ARGS=%ARGS% -b:a 256k -ar 44100
echo.
echo Encoding Audio Stream.
@echo on
call ffmpeg.exe -i "%FILE_INPUT%" %ARGS% "%FILE_OUTPUT%"
@echo off
echo.
echo.
:NEXT
shift
goto LOOP
:END
pause