Alright, think I got it! I realized after my last post I was going in the wrong direction just going by difference in amplitude, so I started studying up more on the FFT method. Unfortunately, switching to frequency domain also has its issues, and this is mostly a time domain problem for us since the tracks should be very similar if mono.
So I went back to the drawing board yet again, and looked into some different ideas for comparing two data sets, namely correlation and Mean Squared Error. Essentially, you multiply the 2 samples against each other, then divide by the root. You're left with a value between 0-1, with the closer to 1, the closer the two are to being the same.
Using this new metric I re-ran tests for all the tracks I've been looking at it, and its done the best without any sort of optimizations like normalizing a channel or cutting out content from the beginning and end. Anything close to 1 is mono, and anything 0.5 or less is definitely stereo. Will do a little more experimenting and see if I can improve the scores with a few tweaks, but I think I'm on the right track now.
So I went back to the drawing board yet again, and looked into some different ideas for comparing two data sets, namely correlation and Mean Squared Error. Essentially, you multiply the 2 samples against each other, then divide by the root. You're left with a value between 0-1, with the closer to 1, the closer the two are to being the same.
Using this new metric I re-ran tests for all the tracks I've been looking at it, and its done the best without any sort of optimizations like normalizing a channel or cutting out content from the beginning and end. Anything close to 1 is mono, and anything 0.5 or less is definitely stereo. Will do a little more experimenting and see if I can improve the scores with a few tweaks, but I think I'm on the right track now.
Code:
Stereo Examples
---------------------------------
Akira (LD): 0.49
Akira (BD): 0.508
Commando (JP LD): 0.400
Twin Peaks (LD): 0.628
Sorcerer (LD): 0.512
Predator (JP LD): 0.318
Mono Examples
---------------------------------
Day of the Dead (BD): 0.998
Day of the Dead (VHS): 0.963
Day of the Dead (LD): 0.868
Vampire Hunter D (LD): 0.942
Vampire Hunter D (VHS): 0.940
Rear Window (UHD): 1.000


