Skip to content

Commit a73a15b

Browse files
authored
test with normalisation in all audio extract
1 parent 4ef656d commit a73a15b

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,6 @@ async fn read_full_pcm_f32(path: &Path, target_sr: u32) -> Result<(u32, Vec<f32>
228228
"1".to_string(), // downmix to mono
229229
"-ar".to_string(),
230230
target_sr.to_string(), // resample
231-
"-af".to_string(),
232-
"loudnorm=i=-23.0:lra=7.0:tp=-2.0:linear=true:print_format=json".to_string(), // loudness normalization
233231
"-f".to_string(),
234232
"f32le".to_string(),
235233
"-acodec".to_string(),
@@ -352,8 +350,6 @@ async fn correlate_overlap_save(
352350
"1".to_string(), // downmix to mono
353351
"-ar".to_string(),
354352
target_sr.to_string(), // resample
355-
"-af".to_string(),
356-
"loudnorm=i=-23.0:lra=7.0:tp=-2.0:linear=true:print_format=json".to_string(), // loudness normalization
357353
"-f".to_string(),
358354
"f32le".to_string(),
359355
"-acodec".to_string(),

src/video.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ def extract_audio_in_part(self,language,exportParam,cutTime=None,asDefault=False
182182
baseCommand.extend(["-ar", exportParam['SamplingRate']])
183183
if 'Channels' in exportParam:
184184
baseCommand.extend(["-ac", exportParam['Channels']])
185+
baseCommand.extend(["-af", "loudnorm=i=-23.0:lra=7.0:tp=-2.0:linear=true:print_format=json"])
185186
audio_pos_file = 0
186187
wait_end_big_job()
187188
if cutTime == None:

0 commit comments

Comments
 (0)