magicgoose / simple_dr_meter

An (optimized) implementation of the music DR measurement (compliant with http://dr.loudness-war.info/), it supports CUE sheets and is faster than all currently available alternatives (at the time of writing, not sure about now)
GNU General Public License v3.0
20 stars 3 forks source link

Include bits per sample in log #9

Open 4oo4 opened 2 years ago

4oo4 commented 2 years ago

It looks like this is included in most other DR meters I've seen, would it be possible to get this added? I think this would just be a matter of parsing it from the output from ffprobe, if I'm reading the code correctly?

Cheers

magicgoose commented 2 years ago

It is 100% possible, and your idea seems correct as far as I remember. I didn't add it just because I thought it's unnecessary, as it doesn't matter at all in DR calculations (even if everything was always converted to 16-bit samples before analysis, the results are near exactly the same). Maybe it can be a bit useful for source identification. I don't currently have time and access to my personal computer, but if someone makes a PR with this addition, I can review/merge.

On Mon, Apr 11, 2022 at 4:54 AM 4oo4 @.***> wrote:

It looks like this is included in most other DR meters I've seen, would it be possible to get this added? I think this would just be a matter of parsing it from the output from ffprobe, if I'm reading the code correctly?

Cheers

— Reply to this email directly, view it on GitHub https://github.com/magicgoose/simple_dr_meter/issues/9, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALADHSIVXQNLW2JJRLT3Z3VEOH7NANCNFSM5TBY7KHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

4oo4 commented 2 years ago

Cool, I was wanting it for identification purposes. I will see if I can make a PR for this when I have some time.

magicgoose commented 2 years ago

Cool! Also, IIRC, there may be potential edge cases worth extra attention: if you parse this number from ffmpeg, I've heard it may sometimes report 24 bit precision as 32. Or maybe it's no longer a problem.

On Tue, Apr 12, 2022 at 3:40 AM 4oo4 @.***> wrote:

Cool, I was wanting it for identification purposes. I will see if I can make a PR for this when I have some time.

— Reply to this email directly, view it on GitHub https://github.com/magicgoose/simple_dr_meter/issues/9#issuecomment-1095792641, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALADHWYV5CPGL7MKTQOHELVETIA3ANCNFSM5TBY7KHA . You are receiving this because you commented.Message ID: @.***>

4oo4 commented 2 years ago

Hmm, that sounds vaguely familiar, I have 32 bit float, and 24/16 bit fixed to test with, I'll see if I can find more info about that.

https://github.com/simon-r/dr14_t.meter/issues/23

EDIT: It looks like it might be from a discrepancy with different fields within ffprobe. There's sample_fmt which is an internal representation and will say 32p for a file that's actually 24-bit, but the correct one we'd want is actually bits_per_raw_sample, per:

https://trac.ffmpeg.org/ticket/5282