Jump to content
Kvalsvoll

The Bass EQ for Movies Thread

Recommended Posts

52 minutes ago, Kvalsvoll said:

There is no dsp available on the computer. But that is possible to fix, this is a linux machine running ubuntu and kodi, it would be difficult to implement at the time it was built, but there may be options available now.

I haven't tried it myself but https://github.com/bmc0/dsp/wiki/System-Wide-DSP-Guide gives an example of how to use LADSPA for system wide dsp. It looks like there is a script for converting REW filters into a format LADSPA can use too so that might make it quite easy. Another (not free) option would be jriver as their linux build now has video support.

Share this post


Link to post
Share on other sites
3 hours ago, 3ll3d00d said:

I haven't tried it myself but https://github.com/bmc0/dsp/wiki/System-Wide-DSP-Guide gives an example of how to use LADSPA for system wide dsp. It looks like there is a script for converting REW filters into a format LADSPA can use too so that might make it quite easy. Another (not free) option would be jriver as their linux build now has video support.

Kodi uses alsa on my machine, and this dsp can use alsa. But it will not work for movies, because audio is sent to hdmi directly as passthrough, for external decode in the av processor. It would be possible to configure to allow software processing if the movie audio is re-encoded to pcm, but then you still would need to extract, decode, encode and re-mux.

Options here are severely limited due to the proprietary formats of audio in movies.

Which leaves processing post-bm in the bass-system dsp is the best option for quick and reasonable quality bass-eq. This also eliminates problems with clipping.

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, 3ll3d00d said:

@Kvalsvoll I built the latest build on my (debian testing) box, I don't have any other distros here to try it on but it works on this machine so give it a try and see if it works.

https://github.com/3ll3d00d/beqdesigner/releases/download/0.0.3/beqdesigner

I may be the only one trying to run beqdesigner on linux, so it's like you did this for me, and I feel obliged to test it. I will see if I get the motivation to give it another try, requires some effort to upgrade to the right version of everything, including the right python version.

I will report back when I have tried it, and thanks.

Share this post


Link to post
Share on other sites
26 minutes ago, Kvalsvoll said:

I may be the only one trying to run beqdesigner on linux, so it's like you did this for me, and I feel obliged to test it. I will see if I get the motivation to give it another try, requires some effort to upgrade to the right version of everything, including the right python version.

I will report back when I have tried it, and thanks.

this is built with pyinstaller so it should just mean download it and run it, nothing else required at all (except for the only known external dependency, i.e. libsndfile)

all my linux boxes are configured the same way though so hard for me to tell if it works in other situations, could spin up a VM I guess...

Share this post


Link to post
Share on other sites

I think I've worked out the incantation required to get ffmpeg to apply filters to individual channels so was thinking about how to test whether it does this correctly (re the concerns mentioned earlier about clipping). Any suggestions on what a simple, easily repeatable, test would be for this? i.e. generate a specific signal, apply some filter, output should be x.

Share this post


Link to post
Share on other sites

If it were me, I would probably study the source code more carefully to try to figure out what it will do, but a quick test would be to try a pair of filters that cancel each other, for example:

Low Shelf gain=+X; Low Shelf gain=-X at a common frequency, where the X is some relatively big number that will cause clipping depending on how much internal headroom the processor has.  After running a track through the pair of filters, the input and output should be very nearly identical unless clipping or severe precision loss occurred.  If the internal processing is floating point, then internal headroom and precision should be very high.

  • Like 1

Share this post


Link to post
Share on other sites

I like the quick test

https://imgur.com/a/8HopqIx

which shows there is zero headroom available. I suppose this is not that surprising as ffmpeg filters are treated as completely independent blocks.

not ideal though perhaps not a blocker as it would be simple enough to attenuate before filtering, good enough for analysis purposes perhaps (though not for the "create remuxed file" case)

sample command for reference - https://gist.github.com/3ll3d00d/40be3ec6e1a5c0466ae324350be65cb0#file-gistfile1-txt

 

Share this post


Link to post
Share on other sites

Apply gain -10dB before filtering, that should leave enough headroom. After applying all filters, you can fix the gain (+10dB), and perhaps give a warning if clipping occurs.

But remember that for dsp processing during playback there may be more headroom available, if the dsp is located after master volume in the signal chain.

Share this post


Link to post
Share on other sites

Zero headroom?  That's not good because it implies the processing is using integers rather than fixed or floating point.  This means that in addition to the potential for internal clipping, precision problems are likely to arise for low frequency filters, particularly below 20 Hz.  How bad it is depends on whether it's processing with 16-bit or 32-bit integers.  I'd guess that 32-bit integers might do OK except for the very low frequencies but careful testing is advised.  With 16-bit integers, the results are likely to be complete garbage for ULF filters.

I would not advise using ffmpeg for either analysis or processing unless you can figure out a way to force it to use floating point instead of integer processing.  Even then, I'd want to know whether it applies any kind of dithering when converting from float back to integer.  This is probably a pretty minor concern if the output format uses at least 24-bits but for 16-bit output, dithering is crucial to avoid raising the quantization noise floor too much, degrading sound quality particularly in quiet passages.

57 minutes ago, Kvalsvoll said:

Apply gain -10dB before filtering, that should leave enough headroom. After applying all filters, you can fix the gain (+10dB), and perhaps give a warning if clipping occurs.

While applying some gain before and after is a feasible work-around, you effectively give up signal-to-noise ratio in the process.  A reduction of -10 dB is basically equivalent to giving up 1.66 bits of information per sample.

At least reducing gain beforehand makes clip detection possible.  Without upstream gain reduction, it's impossible to tell whether the clipping occurred during the processing or was already present in the original track.

57 minutes ago, Kvalsvoll said:

But remember that for dsp processing during playback there may be more headroom available, if the dsp is located after master volume in the signal chain.

This fact is irrelevant to processing with ffmpeg because the clipping occurs within ffmpeg itself.  This is a potential issue with any DSP; however, the vast majority of competently designed DSPs do processing using fixed or floating point rather than integers and have substantial internal headroom available.

Share this post


Link to post
Share on other sites

latest builds have a split screen before/after beq spectrogram view as well as a way to check the headroom in the waveform pre/post BEQ which you may find useful (and colourful!)

  • Like 2

Share this post


Link to post
Share on other sites
On 8/3/2018 at 8:35 PM, maxmercy said:

Ready Player One BEQ (Both UHD and BD have ATMOS tracks, this correction was applied to the 7.1 channel bed)

[...]

Let me know what you think, and if you need Q values instead of slope values for the shelf filters.

Apologies for taking so long to give a review.  I *finally* watched this tonight!  I just kept putting it off because I've been working so hard on new/improved treble optimization.  I'm still not done and was thinking I'd save it for when I'm "done", but my wife got tired me of putting it off.   I'm glad I listened to her.  :)

I think this is my new favorite soundtrack, and the BEQ takes it to 110%.  I watched it (BD/Atmos soundtrack) at around "-5" on the MV.  (I forgot to check to see if there was any dialnorm modification to that, so it might have been less).  My system is configured with a pretty generous house curve (up to 10-12 dB "hot").  Pretty much all of the bass sounded full bandwidth, and the frequency balance was excellent.  At no point did the low stuff overwhelm the mid-bass nor any of the rest of the spectrum.  The sound effects were very cohesive from top to bottom, and the tactile sensations were detailed, articulate and at times brutal.  There were multiple jaw-drop "jump out of my seat" moments where things just went BOOM spectacularly.  The surround work in this mix was a big part of experience as well.

What can I say?  This this a superb demo piece: for my bass capability, my overall sound capability, for BEQ as a technique, for superb sound design, etc.  It is state-of-the-art.  A big thanks to @maxmercy for taking the time to do this!

  • Like 1

Share this post


Link to post
Share on other sites

bit quiet round here recently but in case anyone is watching... latest beta builds have a bunch of features around seeing the impact of filters on the waveform and being able to zoom into the spectrum for slices of the track while also seeing the overall track. The avs thread has some pics and details - https://www.avsforum.com/forum/113-subwoofers-bass-transducers/2995212-bass-eq-filtered-movies.html#post57032634

Share this post


Link to post
Share on other sites

@3ll3d00d, I do follow and appreciate the excellent work you have done on the beqdesigner. Especially since it is obvious now that the best we can hope for is movie sound that responds well to bass-eq, there will never be a situation where you can assume the sound is perfect from the provider.

I also follow, or at least make an attempt to see what is going on in the soundbar-forum thread.

  • Like 1
  • Thanks 1

Share this post


Link to post
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

×