[FFmpeg-user] How to create error log file ffmpeg Loudnorm?

CMG DiGiTaL cmarciog at gmail.com
Sat Feb 24 19:16:44 EET 2024


I created a bat file where I enter the LUFS values to cover several audio
files in a folder.
However, I would like to generate an error log file.
I used the command -report file=log.txt:level=16.

see below the command in my bat file:

md "C:\Users\%username%\Desktop\Normalizing_lufs"
pushd "%Userprofile%\Desktop\áudios LUFS"
FOR /F "delims=" %%a in ('where .:*.mp3 ^|findstr /vi "_LOUDNORM  _EBU"')
DO (
  SET "filename=%%~na"
  ffmpeg -hide_banner -i "%%a" -af "[0:a]loudnorm=print_format=summary" -f
null NUL 2> "%%~na.log"
  @FOR /F "tokens=3" %%b IN ('FINDSTR /C:"Input Integrated" "%%~na.log"')
DO (SET II=%%b)
  @FOR /F "tokens=4" %%b IN ('FINDSTR /C:"Input True Peak" "%%~na.log"') DO
(SET ITP=%%b)
  @FOR /F "tokens=3" %%b IN ('FINDSTR /C:"Input LRA" "%%~na.log"') DO (SET
  @FOR /F "tokens=3" %%b IN ('FINDSTR /C:"Input Threshold" "%%~na.log"') DO
(SET IT=%%b)
  @FOR /F "tokens=3" %%b IN ('FINDSTR /C:"Target Offset" "%%~na.log"') DO
(SET TO=%%b)
  DEL "%%~na.log"
  REM ECHO !II!   Input Integrated
  REM ECHO !ITP!  Input True Peak
  REM ECHO !IT!   Input Threshold
  REM ECHO !TO!   Target Offset
  FOR /F "tokens=1,2 delims=," %%b IN ('ffprobe -v 0 -select_streams a
-show_entries "stream=bit_rate,sample_rate" -of "csv=p=0"
"!filename!.mp3"') DO (
  ffmpeg -hide_banner *-report file=log.txt:level=16* -i "!filename!.mp3"
-c:v copy -id3v2_version 3 -metadata:s:v title="Album cover" -metadata:s:v
comment="Cover (front)" -acodec mp3 -b:a %%c -ar:a %%b

and see the error below:

 Successfully opened the file.
 Parsing a group of options: output url file=log.txt:level=16.
 Successfully parsed a group of options.
 Opening an output file: file=log.txt:level=16.

 [NULL @ 000002738af86200] Unable to find a suitable output format for
 file=log.txt:level=16: Invalid argument

PS: The log files are generated, but the program cancels and does not
convert the audio files!

More information about the ffmpeg-user mailing list