Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Combining Vorbis and Opus to increases quality (Read 3367 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Combining Vorbis and Opus to increases quality

(Note: This topic is related to both Vorbis and Opus but I can't open a topic in two categories. Also, I was being hurry when writing this and the correct title is "Combining Vorbis and Opus to increase quality".)

Hello. I have some tracks in both Vorbis and Opus formats, and both of them are in low quality (Also, I definetely don't like those codecs). Can I get a better quality by combining them together in a way? Thanks.

Re: Combining Vorbis and Opus to increases quality

Reply #1
You could try averaging the files, but this is unlikely to improve the audio much.  Better to track down the original source and reencode. 

Re: Combining Vorbis and Opus to increases quality

Reply #2
You could try averaging the files, but this is unlikely to improve the audio much.  Better to track down the original source and reencode. 

I already know this, I was asked for a program that analyses the files and finds the best output. I could not find the original source.

Re: Combining Vorbis and Opus to increases quality

Reply #3
I already know this, I was asked for a program that analyses the files and finds the best output. I could not find the original source.

There's no program for now. That's a work for an AI; and AFAIK, nobody has tried to do this thing of combine two low quality files to get a better quality one (I thought about that, but for video, and really I can't do anything).

Re: Combining Vorbis and Opus to increases quality

Reply #4
I already know this, I was asked for a program that analyses the files and finds the best output. I could not find the original source.

There's no program for now. That's a work for an AI; and AFAIK, nobody has tried to do this thing of combine two low quality files to get a better quality one (I thought about that, but for video, and really I can't do anything).

Thank you, but I don't want to use AI for increasing quality.

Re: Combining Vorbis and Opus to increases quality

Reply #5
You could try averaging the files, but this is unlikely to improve the audio much.  Better to track down the original source and reencode. 

I already know this, I was asked for a program that analyses the files and finds the best output. I could not find the original source.

No such thing.

Re: Combining Vorbis and Opus to increases quality

Reply #6
Thank you, but I don't want to use AI for increasing quality.
In which case the only chance you have is to average the two waveforms.  Basic statistical theory.  You can do it in Audacity.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: Combining Vorbis and Opus to increases quality

Reply #7
Thank you, but I don't want to use AI for increasing quality.
In which case the only chance you have is to average the two waveforms.  Basic statistical theory.  You can do it in Audacity.
I've experimented this with low-bitrate (64kbps) MP3 and WavPack lossy (lowest bitrate possible as the lossy WavPack actually have much higher bitrate of about 205kbps than what I set it to "24kbps") encodes of the same lossless source by mixing two different lossy encodings into one audio, and for comparison purposes, a short version of the original lossless source is also provided

Re: Combining Vorbis and Opus to increases quality

Reply #8
When it comes to averaging, I don't know whether this is going to be an issue, but:
If I understand http://bernholdtech.blogspot.com/2013/03/Nine-different-audio-encoders-100-pass-recompression-test.html?showComment=1461189455297#c377771512010122228 correctly (the HA thread seems to be gone), opusenc might make a fraction-of-a-sample delay - at least on 44.1 material.
The average of two signals not aligned in time, could be worse than either source. I have no idea whether the impact is going to be any audible at all (the above experiment did repeated re-encodings) - just saying that if the average turns out bad, there might be an explanation.



Re: Combining Vorbis and Opus to increases quality

Reply #9
To the OP:
Friend, no offence but is this a troll account?
I've been reading the last few posts you started and they all concern topics that are a little, how should I put it, counter-intuitive or out of the ordinary. If these are all real questions you have, I applaud your inquisitiveness but, otherwise, I can't see how any of them may have logical applications

Re: Combining Vorbis and Opus to increases quality

Reply #10
The average of two signals not aligned in time, could be worse than either source.

Were I to be doing that, I would manually time-align the tracks imported into Audacity before combining them.  I would also check that tracks aligned at the beginning were still aligned at the end.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: Combining Vorbis and Opus to increases quality

Reply #11
I don't want to average them, I want to find the best output by a complex algorithm. I mean, I want to use the Opus one for the frequency and time combinations those are not existed in the Vorbis one. By the way, I don't have the raw Opus data, I just have a high-bitrate AAC version of it (the bitrate is very high so it is almost lossless).

Re: Combining Vorbis and Opus to increases quality

Reply #12
To the OP:
Friend, no offence but is this a troll account?
I've been reading the last few posts you started and they all concern topics that are a little, how should I put it, counter-intuitive or out of the ordinary. If these are all real questions you have, I applaud your inquisitiveness but, otherwise, I can't see how any of them may have logical applications

I ask out-of-ordinary questions because ordinary questions are generally already asked by someone else. So, these are all real questions.

Re: Combining Vorbis and Opus to increases quality

Reply #13
I don't want to average them, I want to find the best output by a complex algorithm. I mean, I want to use the Opus one for the frequency and time combinations those are not existed in the Vorbis one. By the way, I don't have the raw Opus data, I just have a high-bitrate AAC version of it (the bitrate is very high so it is almost lossless).
The issue here is how you define "best".

If one file is a "better" representation of the original data than the other, then choose that one.  If both files are of similar quality, how do you separate out aspects of one which are "better" than the other, and then combine them?  That's why AI was mentioned, but you arbitrarily vetoed it.

It seems to me the only choice left is to treat it as a problem in statistics.  If you make two measurements of some quantity, with no knowledge of the error bars associated with each measurement, the best estimate of the true measurement is the mean of the two measurements.  An audio waveform is a series of measurements taken at regular intervals, so if you have two such series then the best estimate of the true waveform is the average of the two, ie a mix of 50% of each.  Which is what I said before.

Perhaps you could convert to the frequency domain, take the max[fft(1),fft(2)], convert back to time domain – but I'm not sure that's any better than taking the average, and could end up adding noise.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: Combining Vorbis and Opus to increases quality

Reply #14
I don't want to average them, I want to find the best output by a complex algorithm. I mean, I want to use the Opus one for the frequency and time combinations those are not existed in the Vorbis one. By the way, I don't have the raw Opus data, I just have a high-bitrate AAC version of it (the bitrate is very high so it is almost lossless).
The issue here is how you define "best".

If one file is a "better" representation of the original data than the other, then choose that one.  If both files are of similar quality, how do you separate out aspects of one which are "better" than the other, and then combine them?  That's why AI was mentioned, but you arbitrarily vetoed it.

It seems to me the only choice left is to treat it as a problem in statistics.  If you make two measurements of some quantity, with no knowledge of the error bars associated with each measurement, the best estimate of the true measurement is the mean of the two measurements.  An audio waveform is a series of measurements taken at regular intervals, so if you have two such series then the best estimate of the true waveform is the average of the two, ie a mix of 50% of each.  Which is what I said before.

Perhaps you could convert to the frequency domain, take the max[fft(1),fft(2)], convert back to time domain – but I'm not sure that's any better than taking the average, and could end up adding noise.

I was already explained how I define "best". I want to use the Opus one for the frequency and time combinations those are not existed in the Vorbis one.

Re: Combining Vorbis and Opus to increases quality

Reply #15
I was already explained how I define "best". I want to use the Opus one for the frequency and time combinations those are not existed in the Vorbis one.
It's not defined until you express it as a mathematical formula!  As I said above, you seem to think Opus contains more detail than Vorbis, so just use that.

THE ONLY ALTERNATIVE is to mix some proportion of the Opus with some proportion of the Vorbis, having made sure they are time-aligned, according to taste.  If you were to play with the frequency shaping of each input before mixing, you would introduce phase shifts which resulted in unwanted cancellation when mixed.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: Combining Vorbis and Opus to increases quality

Reply #16
I was already explained how I define "best". I want to use the Opus one for the frequency and time combinations those are not existed in the Vorbis one.
It's not defined until you express it as a mathematical formula!  As I said above, you seem to think Opus contains more detail than Vorbis, so just use that.

THE ONLY ALTERNATIVE is to mix some proportion of the Opus with some proportion of the Vorbis, having made sure they are time-aligned, according to taste.  If you were to play with the frequency shaping of each input before mixing, you would introduce phase shifts which resulted in unwanted cancellation when mixed.

Opus contains some details which Vorbis does not contain, and Vorbis contains some details which Opus does not contain.

I want to work on Vorbis' MDCT area. If a frequency in an MDCT frame is defined as zero while it's below 16kHz, the amount of Opus in here should be added instead.

Re: Combining Vorbis and Opus to increases quality

Reply #17
Opus contains some details which Vorbis does not contain, and Vorbis contains some details which Opus does not contain.
Taking a mix of both will provide the detail from both.  Instead of just poo-poohing the idea, try it.

Quote
I want to work on Vorbis' MDCT area. If a frequency in an MDCT frame is defined as zero while it's below 16kHz, the amount of Opus in here should be added instead.
Isn't that pretty much what I said?  But you can't extract frames from Vorbis and interleave with frames from Opus, so you have to take the time-domain waveforms and analyse them through FFT/DCT, use some process to decide which to use at any one moment, and convert back to time domain.

But what you originally asked was:
Can I get a better quality by combining them together in a way?
...which I understand to mean "what can I do using existing tools", because I presume you are not up to creating your own tools.  If you did write your own tools to do this, it would be in hope rather than in expectation that the results are what you want.

Meanwhile, the answer to your original question (and not the goal-shifting) is the averaging you can do in Audacity.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: Combining Vorbis and Opus to increases quality

Reply #18
Opus contains some details which Vorbis does not contain, and Vorbis contains some details which Opus does not contain.
Taking a mix of both will provide the detail from both.  Instead of just poo-poohing the idea, try it.

Quote
I want to work on Vorbis' MDCT area. If a frequency in an MDCT frame is defined as zero while it's below 16kHz, the amount of Opus in here should be added instead.
Isn't that pretty much what I said?  But you can't extract frames from Vorbis and interleave with frames from Opus, so you have to take the time-domain waveforms and analyse them through FFT/DCT, use some process to decide which to use at any one moment, and convert back to time domain.

But what you originally asked was:
Can I get a better quality by combining them together in a way?
...which I understand to mean "what can I do using existing tools", because I presume you are not up to creating your own tools.  If you did write your own tools to do this, it would be in hope rather than in expectation that the results are what you want.

Meanwhile, the answer to your original question (and not the goal-shifting) is the averaging you can do in Audacity.

Thanks.

Re: Combining Vorbis and Opus to increases quality

Reply #19
I think you should try AI instead. This does not sound practical nor like it would get you any value out of the intense work you would have to do. Assuming there is a way to somehow predict the "best" passages, i think the improvement would be next to negligible.

Averaging: Easy to do, results are bad
Frequency domain or frame shenanigans: Very Hard, results are bad
Algorithmic guess: Easy to do, results are acceptable.

Sometimes i wish someone had a foobar2000 plugin that predicts what music i want to hear right now but even that seems unreasonable :)
And so, with digital, computer was put into place, and all the IT that came with it.

Re: Combining Vorbis and Opus to increases quality

Reply #20
I would try to find the tracks on youtube. The quality there is quite acceptable in many cases