Audio nerd question

Audio nerd question

So I'm normalizing (EBU R128) audio using ffmpeg

First I'm doing compand like:
ffmpeg -i "$FILE" -map 0:1 -af "compand=0|0:1|1:-90/-900|-70/-70|-30/-9|0/-3:6:0:0:0" -c:a pcm_s16le "compandaudio_$FILE"

(lossless)

This is a dynamic audio to compress gain distances. for example if I have an audio file with sound from -30dB to 0.0dB (movies and the like) I can compress it down to -12dB to 0.0dB this way quieter parts are less quiet and we don't have to change the volume 30 times per movie.

my question from pic related, shown in audacity.. that is clipping right? if maybe 0.1% or less of my video has that it shouldn't matter, but that is still clipping, yes?

my second audio filter is
ffmpeg-normalize "compandaudio_$FILE" -o "normalizeaudio_$FILE" -vn -mn -sn -c:a aac -b:a 160k -lrt 15 -tp 0 -t -5

(lossy)

this normalizes the audio up to 0db

Attached: Screenshot from 2018-04-12 03-10-22.png (1225x1085, 25K)

Other urls found in this thread:

ffmpeg.org/ffmpeg-filters.html#compand
github.com/slhck/ffmpeg-normalize
google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjzjb6PtLTaAhVPyaYKHTQtAkAQFggnMAA&url=https://en.wikipedia.org/wiki/Dynamic_range_compression&usg=AOvVaw3dzuSSWKmQr_LE67fk3Ykf
en.wikipedia.org/wiki/Dynamic_range_compression
imgur.com/gallery/pMwArbU
sourceforge.net/projects/equalizerapo/
sourceforge.net/projects/peace-equalizer-apo-extension/
twitter.com/NSFWRedditImage

looks like it
what will tell you 100% though is if you zoom in
and it looks like it should be sort of sine-ish, but instead of a sinewave going up and smoothly back down the crest of the wave is chopped off

compression will effect things however because what was supposed to be very quiet in the mix now will not be as quiet as what is loud. So everything is mashed that way. That's a half ass explanation of compression for audio though look it up.

You want to just normalize a movies mix and not use a compressing effect as well. Normalization will bring the loudest value to a certain value, but not compress the mix.

normalization with loudnorm (EBU R128) which is by far the best one I've used seemed to help with peaks decently, but they were still there. I'm trying to get rid of them.

My family hates turning the tv up and down to watch a movie, for quiet parts they're changing volume from 20 to 60 on the tv and then back down to 20 when an action scene happens.

Normalization made that not as bad. the dynamic compression instead of linear normalization made that 100% non existent.


that image is decently big though I was very zoomed in. that clip is 2 hours long lol
those pieces that are clipped are fractions of a second, though

with both compand and normalization you bring something like:
[Parsed_volumedetect_0 @ 0x55e5974353e0] n_samples: 1058990080
[Parsed_volumedetect_0 @ 0x55e5974353e0] mean_volume: -28.0 dB
[Parsed_volumedetect_0 @ 0x55e5974353e0] max_volume: -2.0 dB
[Parsed_volumedetect_0 @ 0x55e5974353e0] histogram_1db: 22
[Parsed_volumedetect_0 @ 0x55e5974353e0] histogram_2db: 236
[Parsed_volumedetect_0 @ 0x55e5974353e0] histogram_3db: 440
[Parsed_volumedetect_0 @ 0x55e5974353e0] histogram_4db: 1479
[Parsed_volumedetect_0 @ 0x55e5974353e0] histogram_5db: 3379
[Parsed_volumedetect_0 @ 0x55e5974353e0] histogram_6db: 14258
[Parsed_volumedetect_0 @ 0x55e5974353e0] histogram_7db: 82226
[Parsed_volumedetect_0 @ 0x55e5974353e0] histogram_8db: 122354
[Parsed_volumedetect_0 @ 0x55e5974353e0] histogram_9db: 199478
[Parsed_volumedetect_0 @ 0x55e5974353e0] histogram_10db: 350778
[Parsed_volumedetect_0 @ 0x55e5974353e0] histogram_11db: 525064


to

[Parsed_volumedetect_0 @ 0x55bea7318a60] n_samples: 1058992128
[Parsed_volumedetect_0 @ 0x55bea7318a60] mean_volume: -13.1 dB
[Parsed_volumedetect_0 @ 0x55bea7318a60] max_volume: 0.0 dB
[Parsed_volumedetect_0 @ 0x55bea7318a60] histogram_0db: 1421093

with only normalization it'd be something like:
[Parsed_volumedetect_0 @ 0x55bea7318a60] mean_volume: -19.1 dB
[Parsed_volumedetect_0 @ 0x55bea7318a60] max_volume: -1.7 dB

of course I fixed my normalization to raise the max to 0.0 so it'd be 0.0 and −17.4

ffmpeg.org/ffmpeg-filters.html#compand

idk how anyone can understand this fucking compand thing.
the examples are terrible and don't explain the points at all really.

ahh ok well yea if you don't like the LOUDDDD OMG then.. very soft... can't hear... thing yes you want to go for compression

get your threshold set right so you're bringing up the soft stuff and with a decent knee so you cut off the extra loud, attack and release should probably be somewhat quick but not too quick.

If you can find a scene where it goes from ultra loud back to somewhat soft then listen to the compression live at that spot
probably where scenes change isn't a bad option

however it seems that this might be somewhat difficult since everything could vary so much over a movie I'm not sure.
I mean you could really just mash the fuck out of it so almost everything comes out close in volume but it might be weird

gotta just demo your compressor setting live, listen to it with the effect and without in a good spot and you'll hit the settings, then export them shits and you're ready to go.

this will be easier inside audacity/daw of course than from command line

start with a 2:1 ratio, not too aggressive knee and set the threshold just right below the average loud spots you see there

I can't see the scale of the db in those images but look for markings for that if it has it or watch the vu meter to see what the db is as it's playing in that spot

attack and release should be like 50ms attack 200ms release something like that

threshold and knee first then dick with the attack/release

>that is clipping right?
Yes, I noticed some MP3's I made had trouble on old rubbish speakers because the encoding of the track wasn't preventing clipping, even though it played fine on the actual DAW.

pic for example is john wick chapter 2 with compress AND normalize together.

got this from a superuser post:
compand=0|0:1|1:-90/-900|-70/-70|-30/-9|0/-3:6:0:0:0


attacks=0|0
decays=1|1
points=-90/-900|-70/-70|-30/-9|0/-3
soft-knee=6
gain=0
volume=0
delay=0

>tfw 16 core processor and this shit is single threaded

so my knee here is 6, I'm going to hop down to 5.

trying to do command line since I have like 2000 videos to do lol, so I can automate it.
just using audacity to kinda compare visually. In the audio it sounds all flat and 1 level which is ok but maybe a bit more dynamic is better.

Attached: Screenshot from 2018-04-12 03-53-38.png (2410x1177, 77K)

oh wait I just learned I wasn't zoomed out on audacity, never really use it.

I don't think the things were clipping as much as it seemed. Let me do some more encodes

I think you're normalizing first then compressing right?
def want to be doing that and if you're going for a bulk approach you can ballpark the compressor setting
however I bet you'll find some movies that have a wide dynamic range with some very quiet parts and very loud parts, so that compression setting won't have much an effect on it

if you really wanted to just try to remove that range on everything, set the threshold very low and then you might have to add gain after it to get the mix as close to 0 db as possible
so it would be normalize -> compress -> add gain

hahah the irony of my post. It was actually clipping way more than it appeared to be. after zooming out the dB levels you can see entire sections getting cut off

how the fuck do I just raise quiet parts? I don't actually need to raise loud parts, normalize does that fine for me..

I thought the gain of the compand took care of that, which is why it's at 0?

pic related. top is original. bottom 2 are compand ffmpeg (compressed)
looks like shit, lots of the high audio is cut off
in fact it looks like it wasn't dynamic at all. it looks like it raised all of the volume and just cut off the loud parts

it doesn't sound like that at all. though!!!

Attached: Screenshot from 2018-04-12 04-13-35.png (2398x887, 78K)

my normalization settings bring it up to 0.0db

no I was doing that second. I'll do it first now though I couldn't really find anyone who said which order to do.

github.com/slhck/ffmpeg-normalize

this tool allows me to bring the MAX gain to 0.0 while also normalizing with the best algorithm that exists (EBU R128) (loudnorm) so I am comfortable using it. I feel it works extremely well. My issues are fully in the compressed.

I'll try to do the normalize first now and then compressed. let me take a pic in a second.

yea I think john wick is very dynamic which is why I chose it to get correct. I feel many other videos won't have any issue as long as I just increase all of it to around 0db

point of normalization is to find the loudest sample in the list, see how far away it is from the desired gain then apply that gain to all the rest of the values
so if you had a simple sine wave that was at all -12db and you wanted it do -6db, you would normalize and it would be as if you just turned it up
so something composed of complex shit might have those ultra loud components so the normalization just brings up that part and everything is still quiet
then you WANT the compressor to clip off that loud part and let everything else through and add gain making the mix louder
so the knee and the attack/release setting effects how that clipping happens

yea it makes it a bit easier to hear it live messing with it in a DAW or whatever
then probably you can get a good estimate of what you want to run bulk on everything

funny because this shit always drives me crazy I just end up turning up the TV loud as fuck and blowing the speaks out

>My family hates turning the tv up and down to watch a movie
You're overthinking and complicating things way too much by re-encoding and whatever else you're trying to do.
Depending on the equipment used to watch those movies (hardware, software, TV, PC, DVD player, home theater etc.) look for a feature called Dynamic Range Compression (that's the technical name) or Night Mode (that's what is called in appliances).
google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjzjb6PtLTaAhVPyaYKHTQtAkAQFggnMAA&url=https://en.wikipedia.org/wiki/Dynamic_range_compression&usg=AOvVaw3dzuSSWKmQr_LE67fk3Ykf

Attached: DRC.png (585x474, 59K)

haha good point just use a compressor built into VLC/the TV itself....

Sorry for the fucked up link, copied it wrong:
en.wikipedia.org/wiki/Dynamic_range_compression

what..? that's literally what we're working on right now..
and the tv would be doing that on the fly. they don't have that built in. this is stuff you have to pre-encode if you're normalizing on the fly it does virtually nothing. I've tested it and it isn't do-able on tv.

yea I wish I had any hardware to mess with lol
pic related is:
movie
normalized
normalized then compressed

I think it does look better than before,

Attached: Screenshot from 2018-04-12 04-26-24.png (2430x926, 92K)

Don't raise anything, just lower the loud parts. i.e. don't use makeup gain (should be fine as long as your sound system can be turned up enough)
Compressing a movie is kinda risky because you might make the dynamics worse. The only way I can think to do it is with a hard knee (3db or less) and the threshold exactly between the quiet and loud parts. That way, quiet stuff like dialogue would be unaffected, but anything louder would be turned down. The problem is finding the sweet spot for the threshold. Also you'd need to change it for every movie...
Dynamic range in movies really is a hassle. It's funny that while music has been getting more compressed and less dynamic, movies have been doing the complete opposite.

assuming nothing ever goes over 0db

what's the difference between lowering the loud parts and raising the quiet parts?
this is hollywood audio, there's no crackle and shit in the background that I've noticed. not like a home movie
(serious question)
I did test that many times

I think audacity has a built in compressor effect though I'm not sure, that would be the best way for it to click and get a feel for it
you can set a compressor differently for each track when making music so it really varies depending on what's the input to the compressor

lowering the loud parts and raising the quiet parts is compression essentially

yea so I'm not sure what he was talking about

yea luckily I'm not doing music or I'd literally go insane.

I think the trick was to do this normalization and compression second.

I'm listening to the john wick 2 right now, and the normalized + compressed sounds less clippy at very high volume than the default movie. which is good. if I turn the sound to "same levels" the re-encoded version is much better sounding on my speakers & headphones than the default hollywood one.

>using volume normalisation
Welcome to 2018. People literary hate dynamic volume.
I bet you also listen to it using Apple Airpods.

just buy one of these and hook it up in between the sound to the TV

Attached: badonkadonkdonk.png (1666x454, 933K)

>pic related is:
>movie
>normalized
>normalized then compressed
More like:
Good
Stop
Holy shit this is painful

At my house I listen to shit blaring loud and idc at all. it has it's ups and downs that's part of the "emotion" of a movie
Only headphones I own are M50s, I don't really like any headphones.

however my parents and grandparents, cousins, whoever like to listen to shit at a volume of X so flattening the volume is pretty much required for them to shutup.

>buying that for a bunch of random family around europe & USA
no thx

give a better config then big boy

it's a joke my dude, probably one of the nicest compressors for mastering a mix in the studio... $$$

I know. I wouldn't buy them shit though.
I run a banana pi at all of their houses so I can have my own botnet of movies cloned across as many locations as possible and when seeding I can tunnel it all through sshfs to a amsterdam server with 10gbps connection

If two consecutive samples are at 100% it's probable a clip.

But if it's normalized, you want the true peak to be at 100%. But, technically, peak would be the single highest sample.

I get you. I just think it really ruins it. The difference between the quietest and loudest parts is meant to be huge.
This is also a problem with modern music, the difference between the loudest and quietest parts is a few dB at most these days. Guess most people just don't care anymore and so don't record companies.

The first one was perfect already, normalisation and compression ruined it. But if you're the user I'm replying to, it's understandable if you have bitching friends/relaties who can't listen to their movies like it's meant to.

Compression is when you turn down loud parts and then turn up the overall volume of the audio ("makeup gain"). The reason I say to just turn down loud parts is because you really don't have any room to turn anything up, since the original audio is probably very close to clipping. You should just use your speaker volume to do that. Turning up the volume of the actual audio file means you have to deal with digital clipping.

if they usin VLC there is dynamic compressor in dem shits it appears

I think it's fine on your own, in movie theaters, or with headphones

but when it comes to watching a movie in your room or in a living room in a shared space, it's really annoying.

how do I do that with compand, do you know? I don't. config is fucking scary.


lol vlc
imgur.com/gallery/pMwArbU

>from -30dB to 0.0dB (movies and the like) I can compress it down to -12dB to 0.0dB this way quieter parts are less quiet and we don't have to change the volume 30 times per movie.

A high dynamic range in a movie is a good thing user. It articulates dramatic situations and eases calm parts.
Do cinemas change the volume 30 times per movie? No, its the way its meant to be watched.

Normalising a movie really hurts in my jimmies

you don't have to listen to or watch the normalized ones
I'm well aware of volumes adding to the emotion of a movie

Audacity has a clipping indicator under View menu I think. Turn that on and it will color clipping samples with red.

oh, yea I see it. little check box. awesome. thanks

>normalisation and compression ruined
I'm disagree

Attached: YgDlB6n[1].jpg (496x718, 187K)

Normalizing is the cancer of the industry and you are a fucking pathetic loser. Theres never a case for normalizing

actually you mean compression

nearly everything that exists is normalized

You're so fucking dumb. Compression is used often to smooth out peaks and values. Its not as drastic. Normalizing is worse than a brick wall limiter. It jacks up all your valleys allowing no dynamics and fatigue on your ears especially because your range is less than 5db

Tell that to a mastering engineer and theyll piss on your grave

Youre so fucking dumb that you're normalizing thinking 0.0 on digital isnt clipping. You're not even giving at least a half of db headroom to prevent it. Itll sound like shit

Huh? I didn't say it wasn't used... Also you're wrong. Normalizing is linear. Dynamic gain aka compression is only thing that does what you're saying.

sorry for hijacking this thread but i've been wondering something for a while and I thought anons in here might know

is there any way or program to make your computer straight up ignore sounds with frequency above a certain threshold? i have tinnitus and the gay fucking EEEEEEEEEEEEEEs in some media fucks with me to no end - and I figured you might be able to fix it with some sorta equalizer of some kind.

tried googling but i couldn't find anything related, unfortunately

>48 replies
>NOBODY told OP about this
You're all terrible and should kill yourselves. Literally /v/ knows more about technology

Attached: niggr.png (477x342, 21K)

It was already told you fucking autist Do you want a low pass filter to cut off all frequencies above a specific one or to remove a certain frequency?
If your computer isn't too old, the audio driver should have some form of equalization allowed where you can tune frequencies a little bit.
Haven't used this one but further modifications to sound output can be done using this:
sourceforge.net/projects/equalizerapo/
sourceforge.net/projects/peace-equalizer-apo-extension/
From the screenshots it looks to do all sorts filtering useful in your case. I'd probably try this first.

Cut off all frequencies above a specific one, and I use an external soundcard (scarlett 2i2) which doesn't seem to let me download any audio driver with interface, although it should be able to.. dunno

thanks for the links user, although I have no idea how the hell to do this i'll probably figure it out somehow