Help - Search - Members - Calendar
Full Version: stereotype
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
audiofile
Hi, I really like this board for its informativeness, and its entertaining combination of cold technical considerations with passionate contrary opinions.

I have a few questions about stereo encoding in Lame. First of all, why does dual stereo sound so bad in Lame 3.97? I've read about this somewhere else and read that it's a bug. Has it been fixed, or are they intentionally doing it because they don't want people to use dual stereo? (I would doubt that would be the reason)

I also have a question about m-s joint stereo. Anywhere else this would go in the technical section but it seemed like I should put it here. I understand the concept of J-S, but at the same time it doesn't make sense. If I'm correct, the idea of joint-stereo is something that only works in a digital world, where information is represented as bits. I know that sounds obvious, but partly what I'm getting at is that on older records, or just anything that's originally recorded/mastered to tape, I don't understand how any piece of information could be the same as something on the other side, because of the nature of tape being an actual material, the actual music in material form, as it were, as opposed to a digital representation. So to me, especially with older records, that means that even when one signal is panned to one side, creating the stereo image, the actual tape material is different on either side (not to mention other random variables of the recording process which might create inconsistencies) and each signal will literally be an independent entity, not just a louder or softer version of the same signal. Does this change when something that's originally analog is mastered to a digital or CD format? Do the two signals that are probably imperceptibly different translate to one 16-bit representation? That's the only way I could think lossless Joint Stereo would be possible.

Also, does something encoded in Joint Stereo achieve this in actual real-time, or frame-by-frame. If it's the latter, this is another reason why Joint Stereo does not appeal to me, although I think it has its uses. If it Joint-Stereo is an effect that occurs on a frame-to-frame basis, again I'm confused as to how it could be lossless.
Jimmy The Clam
In all honesty, I can't hear the difference.

Maybe I'm deaf, or just have a tin ear, but I never could tell the difference without looking. blink.gif

I record in J-Stereo anyways.
Gecko
Mid/side (M/S) stereo is still two channels, however one contains the sum of the left and right channel while the other contains the difference. In a mathematical sense you can convert from one represantation to the other without loss.

On material where the difference between the two stereo channles is small, the M/S represantation compresses more efficiently. Normally (i.e. if you use Lame with the recommended or default settings), it will choose L/R or M/S on a frame by frame basis; whichever is more efficient.
Pio2001
There is no difference between analog and digital for this matter.
I don't understand what's wrong. You seem to worry about what would happen if the file was converted into mono. But joint stereo is not mono. It is either left-right stereo, either mid-side stereo.
audiofile
QUOTE(Pio2001 @ Apr 15 2006, 09:50 PM) *

There is no difference between analog and digital for this matter.
I don't understand what's wrong. You seem to worry about what would happen if the file was converted into mono. But joint stereo is not mono. It is either left-right stereo, either mid-side stereo.


I'm not necessarily against J-Stereo. Thanks for the replies, but my question is I guess a little more esoteric, but still valid. When something is mastered to tape, as are some recordings even still today (or they're recorded analog anyway), there are literally two sides (tracks) of the tape, the left and the right. Obviously everything that's on tape originally is then converted to digital. Basically I'm saying that since you're dealing with a more organic, fallible medium as tape, even if the drums, guitar, whatever are recorded as simply one signal and then just panned so you hear it more on one side than the other (i.e. stereo), then by the time they're split into two separate sides of tape, they're independent entities, with minutely subtle differences, aside from just being different in the sense of volume. So to me, this implies that the tracks don't technically have any sound in common from which to base Joint Stereo on. I guess, maybe I could just draw my own conclusions and assume that when these tracks are converted to digital, any differences in a recorded sound (guitar, whatever) between the left and the right on tape would be so subtle as to be negligible to the conversion and you'd have bits of information common to both sides, whereas originally on tape they wouldn't really have, in reality, been exactly the same. I was hoping someone could confirm that or say that I was wrong about it.
dreamliner77
For a moment forget about tracks and just think about a single "sample" where all you need to represent is frequency and left/right.....
Garf
QUOTE(audiofile @ Apr 16 2006, 07:13 AM) *
then by the time they're split into two separate sides of tape, they're independent entities, with minutely subtle differences, aside from just being different in the sense of volume. So to me, this implies that the tracks don't technically have any sound in common from which to base Joint Stereo on. I guess, maybe I could just draw my own conclusions and assume that when these tracks are converted to digital, any differences in a recorded sound (guitar, whatever) between the left and the right on tape would be so subtle as to be negligible to the conversion and you'd have bits of information common to both sides, whereas originally on tape they wouldn't really have, in reality, been exactly the same. I was hoping someone could confirm that or say that I was wrong about it.


It's so easy to verify this with a simple experiment with any audio editing program that's senseless to make any assumptions or have a discussion about them.

All that is going to happen is that the subtle differences end up in the Side channel, and the Mid channel will be entirely unaffected.

(And for the record, codecs do the Mid/Side transformation in the frequency domain.)
halb27
It doesn't matter whether the signal is in digital or analog form. Sums and differences can be created from analog signals as well.
It may help to remember that FM radio uses sum/difference representation of the stereo signal. This is done for the sake of compatibility with FM mono radios which just get the sum signal.
With tape recordings the m/s represantation could be used as well. There is just no advantage when doing so.
With digital compression m/s representation is more effective in many cases. Look at a mono recording. In l/r representation each channel carries the same information, so independent compression of the l and r channel obviously is not adequate. With m/s representation the side signal is zero, the m signal carries the same information as does the l and r channel, so this is the adequate way to go.

It's as easy as: m = l + r and s = l - r (apart from a scaling factor)
which is equivalent to l = m + s and r = m - s (apart form a scaling factor).

Joint stereo uses the l/r or m/s representation whatever seems more appropriate.

With lossless compression joint stereo is the obvious way to go.
With lossy compression things are more difficult. A psychoacoustical model used for the l/r repesentation cannot simply be used for the m/s representation. So things become more complicated. Moreover care has to be taken that switching the different representations does not produce audible artifacts. This is the reason why we read about suspected joint stereo problems from time to time on HA.
Firon
M/S stereo itself doesn't make any difference for audio quality (except for CBR files, since it "saves" bits), since it's lossless. What does happen is that LAME might starve the difference (S) channel, which MAY cause artifacts. This is apparently common with DPL-II content, where the rear channels sound horrible because of it.

audiofile
QUOTE(Firon @ Apr 16 2006, 09:01 AM) *

M/S stereo itself doesn't make any difference for audio quality, since it's lossless. What does happen is that LAME might starve the difference (S) channel, which MAY cause artifacts. This is apparently common with DPL-II content, where the rear channels sound horrible because of it.


Thanks for the info, guys. To me this still begs the question of why the lame encoder has a "stereo" option (not dual stereo, just 'stereo'). Is it for people like me who are a little bit skeptical toward joint stereo? I know there are technical and justifiable reasons (besides someone who is skeptical of J-Stereo) for using dual stereo, but why would there be a "stereo" option? Just as a side note, I use audiograbber and have noticed that the files I click J-stereo for aren't encoded 100% m/s, which annoys me but I guess it's not a problem.
kjoonlee
QUOTE(audiofile @ Apr 17 2006, 03:46 AM) *
Just as a side note, I use audiograbber and have noticed that the files I click J-stereo for aren't encoded 100% m/s, which annoys me but I guess it's not a problem.

If all frames had totally different values for the left and right channels, 100% m/s would actually be inefficient. That's why mid-side/left-right switching takes place.
Axon
Think of a vinyl record. The groove is modulated horizontally for the mono (L+R) signal - the mid - and vertically for the stereo (L-R) signal - the side. There are two reasons for this. The first is that it's backwards compatible with mono players. The second is that the side signal simply does not matter as much as the mid signal, as far as perceptual quality is concerned. And the L-R signal is objectively worse in distortion and noise compared to the L+R signal on a record. But it is not as offensive as the alternatives.

Mid-side encodings for MP3 (and any other codec) operate on the same principle. You have a number of bits available to represent the audio in a compressed form. Representing the L+R signal accurately is more important than representing the L-R signal accurately. Therefore, you should switch from L/R channels to L+R/L-R channels, and allocate bits based on that. Make sense?

Straight stereo is still there because a) MP3 supports it and b) there are actually a couple corner cases where you might actually need it. The only one that comes to mind though is DPL surround encodings or similarly matrixed stuff.
Lyx
QUOTE(audiofile @ Apr 16 2006, 08:46 PM) *

Thanks for the info, guys. To me this still begs the question of why the lame encoder has a "stereo" option (not dual stereo, just 'stereo'). Is it for people like me who are a little bit skeptical toward joint stereo?

It is because of "backwards-compatibility". For the LAME-devs, the 3.9x series is about backwards-compatibility, so they do not want to remove stuff like that, even though they(the options) dont make much sense anymore.

There have been multiple discussions in the recent years calling to remove the stereo-option - when a lame-dev replied, the response was usually "not going to happen in 3.9x because of backwards-compatibility".

- Lyx
halb27
QUOTE(audiofile @ Apr 16 2006, 08:46 PM) *

Thanks for the info, guys. To me this still begs the question of why the lame encoder has a "stereo" option (not dual stereo, just 'stereo'). Is it for people like me who are a little bit skeptical toward joint stereo? I know there are technical and justifiable reasons (besides someone who is skeptical of J-Stereo) for using dual stereo, but why would there be a "stereo" option? Just as a side note, I use audiograbber and have noticed that the files I click J-stereo for aren't encoded 100% m/s, which annoys me but I guess it's not a problem.

dual stereo:
the l and r channels are encoded and treated seperately given the same amount of encoded audio data space (useful for instance for multi-language applications).

stereo:
the l and r channels are encoded seperately but one channel can give away some of its audio data space to the other channel whenever the encoder thinks this is more appropriate. (AFAIK Fraunhofer mp3 encoders prefer this over joint stereo when using high bitrate).

joint stereo:
a mixture of left/right and mid/side representation of the stereo signal according to what the encoder thinks is more appropriate.

For the understanding of stereo and joint stereo mode it is essential to consider the audio streams as a sequence of audio frames. Each frame consists of a certain number of wav samples, and decision making for lr/ms-switching resp. which amount of data to give to the l and r channel is done on a frame-by-frame basis.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.