Audio level not calibrated?

I haven’t tried it yet.
However, I found that SC has a built-in tone generator. :open_mouth:
The tone generated is a stereo tone. In this case, it is also a sinusoidal tone at 1kHz and an audio level of 0 dB as seen in the picture.


This tone gets a perfect reading on the loudness meter.
My tests were based on a 1 kHz sinusoidal tone generated in Audacity, so I compared the tone generated in SC with the tone generated in Audacity.
I found the first difference. The tone I generated in Audacity had an amplitude of 0.8 (default), and the tone in SC takes as reference 0 dB which is equivalent to amplitude 1.

As @vhsfun says in his conclusions, it seems that the issue is in the measurement of a mono or stereo source.
I think today I will measure with some of the sonority plugins, the tone generated by SC to contrast and if the result is correct, finish the comparisons.

I loaded in SC a 1kHz mono tone from Audacity and then applied the Panoramic filter: when Left channel is selected in the PAN filter SC displays upper and lower waveforms at -3dB. When the Right channel is selected in PAN then SC displays only the upper channel waveform at 0dB (no waveform on the lower channel).

Since SC generates a stereo tone, it is normal from what we have seen so far to have a correct waveform displayed. But still, the peak meter is at +1.6dB where it should be 0dB. The inter-sample error at 1kHz is almost 0 and cannot explain this difference.

There is an automatic filter that conforms the source channels to the output channels (Settings > Audio Channels) using FFmpeg libswresample. When going from mono to stereo, it duplicates the channel, but it also appears to do some level adjustment: see Rematrixing here:
http://ffmpeg.org/libswresample.html

If you edit in your installation share/mlt/core/loader.ini and remove “swresample,” from the line starting with “channels”:
channels=audiochannels

And restart Shotcut, you will see that now it simply copies the channel from left to right and mono gives the same level as stereo input.

Editing loader.ini, as Dan indicates, causes the meters (peaks and loudness) to give the same values in mono and stereo, however, there is still the issue of incorrect peak meter measurement.
Taking as reference the stereo tone created by SC, I made comparisons and obtained the following:
Standard peak measurement over the generated tone in SC (stereo 0dB) final value 0dB

However, the value on the SC peak meter is 1.6dB (not 0dB).

Anotaci%C3%B3n%202019-05-14%20111357

In addition, I compared the loudness meter (in case there was an automatic filter in the audio export from SC). The result is 0dB (image below) which matches the values of the SC loudness meter (upper image).

There seems to be something that affects the SC peak meter but does not affect the SC loudness meter.

In the loader.ini file, there is also a resample instruction.

# audio filters
channels=swresample,audiochannels
resampler=resample

Can this automatic audio filter (resample) affect the error in the peak meter?

On FFmpeg libswresample, I will keep the loader.ini file as default, as I only used a mono audio source to check the peak meter functionality. Since SC can create a reference tone (and create a stereo track), it is not necessary for me to remove the “swresample” instruction.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.