Skip to content
Snippets Groups Projects
Commit 0d958f97 authored by Simpel's avatar Simpel
Browse files

fix: enclose extracted output file w/ quotes


Signed-off-by: default avatarConrad Zelck <git@simpel.cc>
parent a4d01bf4
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
#AutoIt3Wrapper_Icon=Icons\peakmeter.ico
#AutoIt3Wrapper_Res_Comment=Measure loudness with ffmpeg according to R128.
#AutoIt3Wrapper_Res_Description=Measure loudness with ffmpeg according to R128.
#AutoIt3Wrapper_Res_Fileversion=1.1.0.19
#AutoIt3Wrapper_Res_Fileversion=1.1.0.20
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=p
#AutoIt3Wrapper_Res_CompanyName=Norddeutscher Rundfunk
#AutoIt3Wrapper_Res_LegalCopyright=Conrad Zelck
......@@ -181,15 +181,17 @@ GUISetState(@SW_SHOW)
Global $hTimerStart = TimerInit()
$sOutputFileWithoutExtension &= "_" & $iTrackL & "+" & $iTrackR
ConsoleWrite("Layout: " & $iLayout & @CRLF)
Switch $iLayout
Case $eMONO
$sCommand = '-i "' & $sFile & '" -filter_complex "[0:' & $iTrackL - 1 + $iCounterVideo & '][0:' & $iTrackR - 1 + $iCounterVideo & '] amerge" -c:a pcm_s24le -ar 48000 -y ' & @TempDir & '\' & $sOutputFileWithoutExtension & '.wav'
$sCommand = '-i "' & $sFile & '" -filter_complex "[0:' & $iTrackL - 1 + $iCounterVideo & '][0:' & $iTrackR - 1 + $iCounterVideo & '] amerge" -c:a pcm_s24le -ar 48000 -y "' & @TempDir & '\' & $sOutputFileWithoutExtension & '.wav"'
Case $eSTEREO
$sCommand = '-i "' & $sFile & '" -map 0:' & $iTrackR / 2 - 1 + $iCounterVideo & ' -c:a pcm_s24le -ar 48000 -y ' & @TempDir & '\' & $sOutputFileWithoutExtension & '.wav'
$sCommand = '-i "' & $sFile & '" -map 0:' & $iTrackR / 2 - 1 + $iCounterVideo & ' -c:a pcm_s24le -ar 48000 -y "' & @TempDir & '\' & $sOutputFileWithoutExtension & '.wav"'
Case $eMULTI
$sCommand = '-i ' & $sFile & ' -af "pan=stereo|c0=c' & $iTrackL - 1 + $iCounterVideo & '|c1=c' & $iTrackR - 1 + $iCounterVideo & '" -c:a pcm_s24le -ar 48000 -y ' & @TempDir & '\' & $sOutputFileWithoutExtension & '.wav'
$sCommand = '-i ' & $sFile & ' -af "pan=stereo|c0=c' & $iTrackL - 1 + $iCounterVideo & '|c1=c' & $iTrackR - 1 + $iCounterVideo & '" -c:a pcm_s24le -ar 48000 -y "' & @TempDir & '\' & $sOutputFileWithoutExtension & '.wav"'
EndSwitch
ConsoleWrite("Command extract audio: " & $sCommand & @CRLF)
_runFFmpeg('ffmpeg ' & $sCommand, $sPathFFmpeg, 1)
GUICtrlSetData($Progress1, 100) ; if ffmpeg is done than set progress to 100 - sometimes last StderrRead with 100 is missed
......@@ -197,6 +199,7 @@ If Not FileExists(@TempDir & '\' & $sOutputFileWithoutExtension & '.wav') Then ;
GUICtrlSetData($Edit, "Error: Could not extract audio.")
Else
$sCommand = '-i "' & @TempDir & '\' & $sOutputFileWithoutExtension & '.wav" -filter_complex ebur128=framelog=verbose:peak=true -f null -'
ConsoleWrite("Command measure audio: " & $sCommand & @CRLF)
_runFFmpeg('ffmpeg ' & $sCommand, $sPathFFmpeg, 2)
GUICtrlSetData($Progress2, 100) ; if ffmpeg is done than set progress to 100 - sometimes last StderrRead with 100 is missed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment