Re: ReplayGain Scanner - Same results for old and new versions
Reply #14 – 2022-04-12 11:37:34
Thanks, but I meant without having to use a third party component like Spider Monkey, e.g. PLR: $puts(PLR,$if(%replaygain_track_peak_db%, $puts(PLR,$sub($mul($replace(%replaygain_track_peak_db%,.,),10),$sub($mul($replace(%replaygain_track_gain%,.,),-10),18000))) $puts(PLR_TEN,$left($right($get(PLR),3),2)) $puts(PLR_ROUND,$ifgreater($get(PLR_TEN),40,$add($get(PLR),100),$get(PLR)))$iflonger($get(PLR_ROUND),4,<$left($get(PLR_ROUND),2)<.$substr($get(PLR_ROUND),3,3),$left($get(PLR_ROUND),1)<.$substr($get(PLR_ROUND),2,2)),))$get(PLR) LUFS Integrated: $if(%replaygain_track_gain%,$puts(l,$sub(-1800,$replace(%replaygain_track_gain%,.,)))$div($get(l),100).$right($get(l),2) dB,) I know that code :-) But that gives me results who are to way off the results that I get from the other ones mentioned enough here ;-) because the RG Scanner seems to calculate the RG track gain in EBU R128 mode not correctly or in a different way as the other tools. That said the result of calculations based on the RG results can't be better.. Theoretically if you can compute PLR and LUFS with ffmpeg (and sure you can) it would be trivial to add those tags to the list of tags to be calculated by my script. That's it... if you find ffmpeg being more accurate (?). I have to note that my RG results are pretty accurate too though (compared to audition, music bee, Izotope,... , so maybe there is an error on your config at some place (?). This is an example of my batch file, which outputs LRA to a json fileREM Helper to execute ffmpeg.exe (%3) on input (%1) and save output to file (%2) REM Retrieves LRA data as json @ECHO OFF %3 -i %1 -af loudnorm=dual_mono=true:print_format=json -nostats -f null - 2>&1 | > %2 FINDSTR /BIR "{ .*\" }" If you manage to do the same for PLR and LUFS (it would be preferable to have both values calculated at once), I would gladly code the other part (menu entries, tagging, etc.).Thanks regor! I've just discovered your great tools the other day and I'm trying to getting used to it. Since a day or two I get error warnings when I re-open foobar. Error warning? Or slow script popup? The second is not a problem of my scripts but a SMP thing, you can configure SMP to adjust the time before warning at advanced config.