Author Topic: (Version 1.3.4) EBUR 128 - Loudness and Dynamic Range Plugin / Tagging Tool  (Read 32155 times)

sveakul

  • Sr. Member
  • ****
  • Posts: 2459
Thanks!  It would probably be best to move the whole content of your Reply#5 post to the the first post, so finding the current version and the installation/usage instructions is easy.
Last Edit: March 29, 2019, 12:42:34 AM by sveakul

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346
Thanks!  It would probably be best to move the whole content of your Reply#5 post to the the first post, so finding the current version and the installation/usage instructions is easy.

Will do.

Hoping to get some feedback from the people who plan on using it before finalizing the README and creating a beta release.

I'm not interested in adding too much more, but I definitely want to add some customization for the result set.

captain_paranoia

  • Full Member
  • ***
  • Posts: 207
Just gave it a try.
Put the DLL in the MusicBee Plugins install directory.
Put the Dependencies folder in the 'C:\Users\User\AppData\Roaming\MusicBee' folder
Started MB.
Needed to add the plugin in Preferences.
Needed to restart MB to get the DR tool to appear in the context menu
Selected an album (Metallica's notorious 'Death Magnetic', in FLAC) in AlbumArt view, and hit the EBU R128 option.
Generated this eror report, which closed MB on clicking 'OK':

MusicBee v3.2.6760.38310 (Win6.1), 25 Apr 2019 1:28:

System.IO.FileNotFoundException: Could not find file 'C:\Users\User\AppData\Roaming\MusicBee\Dependencies\LoudnessTextFiles\Broken,Beat&Scarred-Metallica-FLACaudiofile-625.txt'.
File name: 'C:\Users\User\AppData\Roaming\MusicBee\Dependencies\LoudnessTextFiles\Broken,Beat&Scarred-Metallica-FLACaudiofile-625.txt'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
   at System.IO.StreamReader..ctor(String path)
   at MusicBeePlugin.Plugin.ParseValues(Int32 currentSong)
   at MusicBeePlugin.Plugin.<>c__DisplayClass21_0.<AnalyzeSong>b__0(Object sender, EventArgs e)
   at System.Diagnostics.Process.OnExited()
   at System.Diagnostics.Process.RaiseOnExited()
   at System.Diagnostics.Process.CompletionCallback(Object context, Boolean wasSignaled)
   at System.Threading._ThreadPoolWaitOrTimerCallback.WaitOrTimerCallback_Context(Object state, Boolean timedOut)
   at System.Threading._ThreadPoolWaitOrTimerCallback.WaitOrTimerCallback_Context_f(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading._ThreadPoolWaitOrTimerCallback.PerformWaitOrTimerCallback(Object state, Boolean timedOut)

Is it essential to name the custom tags...? I didn't...

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346


System.IO.FileNotFoundException: Could not find file 'C:\Users\User\AppData\Roaming\MusicBee\Dependencies\LoudnessTextFiles\Broken,Beat&Scarred-Metallica-FLACaudiofile-625.txt'.

File name: 'C:\Users\User\AppData\Roaming\MusicBee\Dependencies\LoudnessTextFiles\Broken,Beat&Scarred-Metallica-FLACaudiofile-625.txt'



Does this file exist? Does the filename match the one above, exactly?

It sounds like it either didn't generate the file, or maybe permissions are preventing it from reading it.

Do any files work?

Please let me know! I'm going to begin updating this plugin and refining it.



captain_paranoia

  • Full Member
  • ***
  • Posts: 207
The folder exists (as copied; didn't need admin rights to copy, unlike the DLL), the files don't.

I tried with MP3 files, with the same result.

Permissions struck me as a possibility, but MB is able to copy the plugin to the AppData folder. It look like it wasn't generated; maybe ffmpeg didn't execute?

captain_paranoia

  • Full Member
  • ***
  • Posts: 207
This was the problem...

C:\Users\User\AppData\Roaming\MusicBee\Dependencies>ffmpeg
This version of C:\Users\User\AppData\Roaming\MusicBee\Dependencies\ffmpeg.exe is not compatible with the version of Windows you're running.
Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.

I downloaded the latest static, 32-bit x86 build from https://ffmpeg.zeranoe.com/builds/ and I can now run ffmpeg from the command line. And the EBU R128 tagger now runs, launching lots of copies of ffmpeg, taking quite a long time on my bedroom media all-in-one PC...

So it looks like your plug-in will need to have 32-bit & 64-bit option downloads, or else refer people to get their own ffmpeg.

I might also suggest the plug-in be configurable to allow the maximum number of ffmpeg instances it will launch in parallel to be user specified.

Thanks for this plug-in; I've been looking for a DR tagger for some time. I'll have to install it on my main PC to get it to process all 70k tracks I've got...

sveakul

  • Sr. Member
  • ****
  • Posts: 2459
Is it essential to name the custom tags...? I didn't...

captain_paranoia:  did you need to first create the custom tag labels for it to start working, or was just getting the right ffmpeg.exe enough?  I agree with you on having a user-selectable option for maximum running instances of ffmpeg.

captain_paranoia

  • Full Member
  • ***
  • Posts: 207
I tried adding the tag labels last night; no joy. I'm pretty sure it was just the incompatible ffmpeg.exe, which is why it crashed out with an error message so quickly. The expected text files are now created by the correct ffmpeg.exe

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346
This was the problem...

C:\Users\User\AppData\Roaming\MusicBee\Dependencies>ffmpeg
This version of C:\Users\User\AppData\Roaming\MusicBee\Dependencies\ffmpeg.exe is not compatible with the version of Windows you're running.
Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.

I downloaded the latest static, 32-bit x86 build from https://ffmpeg.zeranoe.com/builds/ and I can now run ffmpeg from the command line. And the EBU R128 tagger now runs, launching lots of copies of ffmpeg, taking quite a long time on my bedroom media all-in-one PC...

So it looks like your plug-in will need to have 32-bit & 64-bit option downloads, or else refer people to get their own ffmpeg.

I might also suggest the plug-in be configurable to allow the maximum number of ffmpeg instances it will launch in parallel to be user specified.

Thanks for this plug-in; I've been looking for a DR tagger for some time. I'll have to install it on my main PC to get it to process all 70k tracks I've got...

Shoot. I totally forgot to mention that for this plugin. I did mention the 64 bit requirement for my other plugin which utilizes FFMPEG.

I've got a couple of big improvements in the pipeline, so keep posted.

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346
Update:

Added a settings panel which allows you to select which stats to collect and which Custom Tags to use:







Consolidated menu items into subfolder:






Added prompt notifying end of tagging process:



Last Edit: April 30, 2019, 02:53:18 AM by zkhcohen

hiccup

  • Sr. Member
  • ****
  • Posts: 7856
Great idea and work zkhcohen!

I have a suggestion/request:

Would it be possible to add the option to populate a custom tag with the Integrated Loudness of a track, taking into account the adjustment that will be made by the calculated adjustment value present in the Tack Gain tag?
Then you could easily see if the resulting integrated loudness after gain adjustment is what you are aiming for.

For example, I am usually aiming for -21 LUFS for my non-classical library tracks. (-3 on MB's slider)
But currently it is hard to know if tracks that have a track gain tag present were calculated with the aim of -21 LUFS, and thus, how loud they will actually be playing.

hiccup

  • Sr. Member
  • ****
  • Posts: 7856
And a suggestion for the user interface:

When you initiate the tag function, a popup displays 'Tagging selected files...' and a button labeled 'OK'.

Firstly, at first encounter it is not clear what 'OK' would do. Is it a confirmation to begin tagging?
No it isn't, tagging is in progress already.
So if you would want a button there, maybe something like 'cancel' or perhaps 'hide' would be appropriate, but 'OK' is a bit vague.

Secondly, if you don't press OK and are waiting until the operation has finished, you keep waiting, since the popup will not disappear after tagging has concluded.
Only after you finally do press 'OK' at some point, then you get the popup 'Tagging complete'.

Maybe the first popup could disappear automatically after tagging has completed?

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346
Those suggestions shouldn't be too difficult to implement.

I'll try to do it ASAP.

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346
Great idea and work zkhcohen!

I have a suggestion/request:

Would it be possible to add the option to populate a custom tag with the Integrated Loudness of a track, taking into account the adjustment that will be made by the calculated adjustment value present in the Tack Gain tag?
Then you could easily see if the resulting integrated loudness after gain adjustment is what you are aiming for.

For example, I am usually aiming for -21 LUFS for my non-classical library tracks. (-3 on MB's slider)
But currently it is hard to know if tracks that have a track gain tag present were calculated with the aim of -21 LUFS, and thus, how loud they will actually be playing.


Would you simply want the option to map the input_i parameter with with IL and MusicBee's track gain, or did you want to just input your own target value?

https://peterforgacs.github.io/2018/05/20/Audio-normalization-with-ffmpeg/

OR... were you looking for double-pass normalization?

Just a soft reminder that I'm not an audio engineer so I'm doing this through Google and your recommendations.

hiccup

  • Sr. Member
  • ****
  • Posts: 7856
Would you simply want the option to map the input_i parameter with with IL and MusicBee's track gain, or did you want to just input your own target value?

How I am guessing this would work is that your plugin does everything it is already doing, but additionally looks for an existing track gain tag value in a track, and adds/substracts that value to/from the integrated loudness value that your plugin has calculated, and writes that value to a custom tag.

So e.g. if a track already has a track gain tag present of let's say +3 dB, and your plugin calculates an integrated loudness of -20 LUFS for it, you can have it write a custom tag saying -17 LUFS.

That will make it possible to see how loud the track will actually be playing.
That is something MusicBee cannot do.


edit:
Thinking it a bit through, perhaps it would be better to create a virtual tag for this, since that would show and update that value after MB has performed a loudness analysis.
So before you put any work into this, let's first see how that would work.

edit2:
It looks like virtual tags cannot perform simple mathematical functions such as add/subtract.
(somebody please correct me if I am wrong)
That means you would additionally need to install and setup the Additional Tagging Tools plugin.

So I think it would indeed be nice if your plugin could do this by itself.
Last Edit: May 01, 2019, 08:17:29 AM by hiccup