Jump to content

Server - Add audio db level to metadata


virtualtinker

Recommended Posts

virtualtinker

I'd like to see the audio level of content added to the existing metadata.  By itself, this won't really do much, but it should open the door for clients in the future to be able to support the ability to normalize the audio level across all content so I can expect all media I watch through Emby to be at roughly the same audio level regardless of what I'm playing.

 

It sounds like ffmpeg can already pretty much do this in talking with Tikuf.  He provided me this little bit of code as an example.

 

 

 

ffmpeg -i video.mkv --af "volumedetect" -f null - > output.txt 2>&1

 

That should return something like this.

 

 

 

[Parsed_volumedetect_0 @ 0x7f8ba1c121a0] mean_volume: -16.0 dB
[Parsed_volumedetect_0 @ 0x7f8ba1c121a0] max_volume: -5.0 dB
[Parsed_volumedetect_0 @ 0x7f8ba1c121a0] histogram_0db: 87861

 

Then just parse and store the value in the metadata.

  • Like 2
Link to comment
Share on other sites

Yea it does although until there's a direct benefit it's a tough sell because users complain about anything that adds a few seconds to the library scan. We can't get that info with our existing probing, so we'd have to spawn a new ffmpeg process to do it.

Link to comment
Share on other sites

virtualtinker

Do what you did with chapter extraction where it either happens as part of the library scan or maybe as a separate job that runs after hours? Although I get your point, this is definitely more of an investment in a long term value add that even then, will be somewhat transparent to most end users, versus the more tangible short term adds that will have more of a direct impact.

 

Anyway, thought I'd bring it up in any case, as I figured not needing to change the volume really when switching media would have been a nice touch that everyone could use whether they realized it was occurrIng or not.

Link to comment
Share on other sites

  • 4 weeks later...
AxeMan

This sounds good, but what about some parts of shows that have loud intro and normal rest? Wouldn't you still struggle with volume?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...