View Bug Details

IDProjectCategoryView StatusLast Update
0001382DCP-o-maticFeaturespublic2021-10-31 21:56
Reporterfrank@frankkoppelmans.nl Assigned To 
PrioritynormalSeveritymajorReproducibilityN/A
Status acknowledgedResolutionopen 
PlatformMacOSOS XOS Version10.10
Product Version2.10.5 
Summary0001382: Support adjustment of audio to fit R128
Description

Hi,

It would be sooo nice to have DCP-o-matic adjust the audio to 1r128 levels as is required for all DCP's
Now I do this by transporting the audio to my Audio app (Nuendo) to adjust it to r128 and then reimport it into DCP-o-matic.

thanks

Tagsaudio, major
Branch
Estimated weeks required
Estimated work requiredMedium

Activities

carl

2018-10-16 13:25

administrator   ~0002717

I guess loudnorm can do this.

Carsten

2019-05-01 14:15

manager   ~0003298

Last edited: 2019-05-01 14:29

I don't even think any special code is necessary. The trouble is, we need to establish a specific LUFS value as normative (or at least as recommended).

If we e.g. see a LUFS value of -15, lower overall gain by e.g. -6dB. But someone needs to take responsibility for that -21 LUFS ;-)
The trouble is, once we do that, we get complaints that -21 LUFS turned out too high or too low for 'their' content. Then we're back at explaining that even a sophisticated loudness number can't express the proper presentation level for every given content.

I plead guilty for suggesting -20 LUFS in the german translation, but that is triggered only if peak level is too high. Maybe, similar as peak approaching 0dB, we could trigger for too low and too high LUFS and issue hints?

But - LUFS is not defined for DCP. Also, for the intended (broadcast) LUFS use, -23 is the target value. People may confuse that with a suitable LUFS for cinema (which is a higher level than for broadcast).

BTW - there was a discussion about some guy from italy recently having implemented LEQ and applying it to DCPs. Maybe he is working or willing to add his code to FFMPEG? Or maybe he would be willing to add it to DCP-o-matic?

Having LEQ would be a better base for a level suggestion or automation (although I personally use LUFS often to my satisfaction).

BTW - at some point, we may need to deal with that analysis properly between content and DCP related. In many project layouts, content derived R128 numbers mean nothing (e.g. with individual channel files). For some simple 1:1 layouts, content and DCP analysis are identical. I don't think many users understand that difference. One could go as far as disabling R128 for content, and only showing it for DCP.

  • Carsten

Carsten

2019-05-01 15:07

manager   ~0003299

It is luca dot trisciani at dcp-werkstatt dot ch

I'll contact him about it.

  • Carsten

Carsten

2019-05-01 15:12

manager   ~0003300

Oops...

https://github.com/lucat/leqm-nrt

Carsten

2019-05-02 13:08

manager   ~0003301

By the way - are we sure that R128 in DCP-o-matic is always using the proper channel set for analysis?

  • Carsten

overlookmotel

2019-05-07 16:56

developer   ~0003322

Just to say, I have had bad experiences with FFMPEG's loudnorm filter.

I was trying to use it to target -23 LUFS with max true peak no higher than -1dB.

loudnorm filter includes a limiter so you can add gain in order to get to your desired LUFS value, but the limiter brings down the peaks and prevents them going "into the red". Sounds great!

However, in practice, I couldn't get it to work. You have to provide target integrated loudness, max true peak AND loudness range. Problem is, I don't think we care about loudness range, but you have to specify it.

I tried using high loudness range values in the hope that it would be taken as targeting that range as maximum, but it didn't work that way. It prioritised targeting this high range and so didn't increase the LUFS. On the other hand, with a lower range value, it achieved the desired LUFS and max true peak, but often went beyond that and heavily compressed the dynamic range.

I remember one film in particular with a quiet scene where a character meanders through a corn field. It was rendered as a deafening cacophony of bird song and insect noises - what had been subtle background effects were whacked up to the same volume as dialogue.

So, unfortunately I've still found no good way to achieve this. Would be very happy to hear if anyone else has!

overlookmotel

2019-05-07 19:06

developer   ~0003323

I've posted a question about this on Super User and emailed the author of loudnorm filter.

https://superuser.com/questions/1434096/ffmpeg-loudnorm-filter-without-target-range

Carsten

2019-05-07 22:18

manager   ~0003327

Last edited: 2019-05-07 22:23

I think it is not a good idea to deal with this within dcp-o-matic. I think it's good to give an indication about peak and average and LUFS or LEQ(m). But people still need to make their own decisions about the proper level. No software can decide wether a cacophony of bird song and insects is in a lyric nature documentary or a horror movie...

The idea of a tool in DCP-o-matic is to have clear indicators to cinema referenced loudness, and to help in deciding wether it's too soft or too loud.

I think it would be a big improvement if Carl could implement https://github.com/lucat/leqm-nrt in DCP-o-matic. And then find a way to suggest a useful level change to the user. Many users now have to obey TASA or SAWA level recommendations. That is a challenge beyond personal loudness preference.
LEQ(m) would allow this without guessing from LUFS to LEQ(m).

  • Carsten

carl

2020-04-17 23:55

administrator   ~0003772

Last edited: 2020-04-19 00:53

@carl some hacks done to leqm-nrt in my local branch. Working towards a 'push' interface so that it fits well inside analyse_audio_job.cc. Last thing was to remove multiprocessing; now I have to remove the Worker class and inline it into the current caller.

carl

2020-04-19 23:22

administrator   ~0003773

@carsten: can you explain what you mean by "By the way - are we sure that R128 in DCP-o-matic is always using the proper channel set for analysis?"

Carsten

2020-04-19 23:54

manager   ~0003774

I guess I was just thinking wether DCP-o-matic or the EBU R128 filter is always using the correct set of audio channels for analysis. What if e.g. we use a 5.1 DCP channel layout, but have only L and R populated? What about 7.1, where 7,8,9,10 are empty? What about HI/VI-N tracks?

  • Carsten

carl

2020-04-20 00:00

administrator   ~0003775

Shouldn't a 5.1 DCP with only L/R populated be analysed as if it were a 5.1 DCP with "very quiet" C/Lfe/Ls/Rs? I'll have to look into how the EBU R128 FFmpeg stuff handles channel mappings.

Carsten

2020-04-20 12:09

manager   ~0003776

Last edited: 2020-04-20 12:10

I don't know how that filter works for multichannel. I think there are modules in it that detect typical speech patterns. One would think that it should know something about a dedicated center channel? It may be sufficient to sum everything up - but then at least, we need to take care of HI/VI-N and back surrounds? And these channels (surrounds in 7.1 systems) are calibrated to a lower SPL than the others.

Not trying to make something up here - so far, I haven't been disappointed by the results of the analysis. I now use it for all DCPs that contain audio.

Carsten

2020-04-20 21:02

manager   ~0003777

It would probably be sufficient to do some simple test using some special mappings, based on any 5.1 mix:

  • put stereo into a 2ch package - memorize LUFS

  • put stereo into a 5.1ch package - LUFS should stay the same

  • put stereo into a 7.1+HI/VI-N package, map L/R additionally to 7/8 - LUFS should stay the same

  • plain 5.1 to a 6ch DCP - memorize LUFS

  • map e.g. L/R additionally to 7/8 for an 8ch/ simulated HI-VI-N package - LUFS shouldn't change.

  • map e.g. L/R additionally to 11/12 for a simulated 7.1/12ch package - LUFS should increase

carl

2020-04-20 22:28

administrator   ~0003778

OK, those tests should be in the unit testing, I'll add them. First crack at LEQ(m) is in 2.15.52 if anybody wants to try it.

lukegb

2021-10-31 21:00

reporter   ~0004627

Hmm - how do you build 2.15.52+? I can't find the source for leqm-nrt as a library, which seems to be what's required for newer DCPomatic versions.

carl

2021-10-31 21:56

administrator   ~0004628

leqm-nrt is here: https://github.com/cth103/leqm-nrt

Bug History

Date Modified Username Field Change
2018-10-16 12:49 frank@frankkoppelmans.nl New Bug
2018-10-16 12:49 frank@frankkoppelmans.nl Tag Attached: audio
2018-10-16 13:25 carl Note Added: 0002717
2018-10-16 13:25 carl Status new => acknowledged
2018-10-16 13:25 carl Target Version => 2.14.0
2019-01-08 00:38 carl Target Version 2.14.0 => 2.16.0
2019-05-01 10:57 carl Estimated work required Unknown => Undecided
2019-05-01 11:02 carl Summary verzoek om AES r128 => Support adjustment of audio to fit R128
2019-05-01 11:02 carl Estimated work required Undecided => Medium
2019-05-01 14:15 Carsten Note Added: 0003298
2019-05-01 14:17 Carsten Note Edited: 0003298
2019-05-01 14:19 Carsten Note Edited: 0003298
2019-05-01 14:20 Carsten Note Edited: 0003298
2019-05-01 14:23 Carsten Note Edited: 0003298
2019-05-01 14:24 Carsten Note Edited: 0003298
2019-05-01 14:26 Carsten Note Edited: 0003298
2019-05-01 14:27 Carsten Note Edited: 0003298
2019-05-01 14:28 Carsten Note Edited: 0003298
2019-05-01 14:29 Carsten Note Edited: 0003298
2019-05-01 15:07 Carsten Note Added: 0003299
2019-05-01 15:12 Carsten Note Added: 0003300
2019-05-02 13:08 Carsten Note Added: 0003301
2019-05-07 16:56 overlookmotel Note Added: 0003322
2019-05-07 19:06 overlookmotel Note Added: 0003323
2019-05-07 22:18 Carsten Note Added: 0003327
2019-05-07 22:23 Carsten Note Edited: 0003327
2019-11-27 19:41 carl Tag Detached: audio
2019-11-27 19:41 carl Tag Attached: audio
2019-11-27 19:41 carl Tag Attached: major
2020-04-17 23:55 carl Note Added: 0003772
2020-04-19 00:53 carl Note Edited: 0003772
2020-04-19 23:22 carl Note Added: 0003773
2020-04-19 23:54 Carsten Note Added: 0003774
2020-04-20 00:00 carl Note Added: 0003775
2020-04-20 12:09 Carsten Note Added: 0003776
2020-04-20 12:10 Carsten Note Edited: 0003776
2020-04-20 21:02 Carsten Note Added: 0003777
2020-04-20 22:28 carl Note Added: 0003778
2021-05-23 00:01 carl Target Version 2.16.0 =>
2021-10-31 21:00 lukegb Note Added: 0004627
2021-10-31 21:56 carl Note Added: 0004628