loudnorm changes the sample rate of the output file to 192000 Hz. I use the tokens to select the value of the sample rate of the input file to generate the output file correctly, however, the command is giving an error.
command: FOR /F "tokens=1,2 delims=," %%b IN ('ffprobe -v 0 -select_streams a -show_entries "stream=sample_fmt,sample_rate" -of "csv=p=0" "!filename!.wav"') DO ( ffmpeg -hide_banner -i "!filename!.wav" -af "loudnorm=linear=true:I=!vLUF!:LRA=11:tp=!vPEAK!:measured_I=!II!:measured_LRA=!ILRA!:measured_tp=!ITP!:measured_thresh=!IT!:offset=!TO!:print_format=summary" -c:a -sample_rate:a %%c "C:\Users\%username%\Desktop\Convertendo_lufs\!filename!.wav" error message: Guessed Channel Layout for Input Stream #0.0 : stereo Input #0, wav, from 'Genesis - I Can't Dance.wav': Duration: 00:04:05.67, bitrate: 1411 kb/s Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s [NULL @ 00000233ad2957c0] Unable to find a suitable output format for '44100' 44100: Invalid argument Note: I tried two other ways: 1 Run the command without any output parameters, there is no error, but the file is 179 MB in size, the original is only 41.3 MB. This is precisely because the sample rate is 192000 Hz. 2 Run with the parameter -af aformat=s%%b:%%c only a warning message appears, but the file is not normalized. see message below: Multiple -filter, -af or -vf options specified for stream 0, only the last option '-filter:a aformat=s16:44100' will be used. What is the correct parameter to be able to get the sample rate value coming from the tokens and generate the output file correctly? _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".