IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Ogg-to-Ogg transcoding "bug" found...
Martel
post Dec 14 2005, 08:59
Post #1





Group: Members
Posts: 559
Joined: 31-May 04
From: Czech Rep.
Member No.: 14430



I found a really strange transcoding "bug" in Vorbis encoder, the whole story is here:
http://www.volny.cz/martel

This post has been edited by Martel: Dec 14 2005, 09:00


--------------------
IE4 Rockbox Clip+ AAC@192; HD 668B/HD 518 Xonar DX FB2k FLAC;
Go to the top of the page
+Quote Post
user
post Dec 14 2005, 11:41
Post #2





Group: Members
Posts: 873
Joined: 12-October 01
From: the great wide open
Member No.: 277



QUOTE (Martel @ Dec 14 2005, 08:59 AM)
I found a really strange transcoding "bug" in Vorbis encoder, the whole story is here:
http://www.volny.cz/martel


Ogg transcoding test - for educational purposes

Not long ago, while trying to transcode a 192kbit Ogg into a 128kbit one, i found something really strange. The resulting 128kbit Ogg bore some heavy artifacting and L/R disbalance at high frequencies (metal percussions - hat and such). I was just about to start using Oggs for archival purposes (instead of MPCs) but this event effectively prevented the transition (luckily for me!). Because 192kbit Oggs sounded up really great ("near" CD) i wondered what was the cause of such mess and whether any other transcodings into 128kbit Ogg would bear the same flaws.

Setup:
I picked up a juicy test sample (17 seconds CDDA->WAV, Czech heavy metal band Arakain) and commited a little test.
First, i encoded the WAV into Oggs using various -q settings (oggenc 2.8, libvorbis aoTuV 4.51). Also used MPC --standard and --xtreme for comparison.
Then, decoded these Oggs/MPCs back into waves (oggdec 1.0.1).
Then, encoded them all into Oggs using -q 4 cmdline switch (filename indicates the source Ogg/MPC bitrate):
direct encode into a -q 4 Ogg
transcode from a -q 6 Ogg into a -q 4 one
transcode from a -q 7 Ogg into a -q 4 one
transcode from a -q 8 Ogg into a -q 4 one
transcode from a -q 9 Ogg into a -q 4 one
transcode from a --standard MPC into a -q 4 Ogg
transcode from a --xtreme MPC into a -q 4 Ogg
transcode from a -q 6 Ogg into --insane MPC, then into a -q 4 Ogg

Results:
The -q 6 result is extraordinarily awful, even without comparison!
The -q 7 file is quite better but still there is a clearly audible artifacting in the first cymbal crash as well as some panning instability of the hat.
The -q 8 file is very close to the directly encoded Ogg but still, there is a slight panning issue of the hat and some artifacting in the first cymbal crash.
Even the -q 9 file still bears some traces of artifacting in the first cymbal crash and the hat in the first part of the sample! If you quickly swap the MPC --xtreme, the Ogg -q 9 and the directly encoded samples, listen to the hat that goes together with the first bass drum kick in the sample. Sure the hat sounds different (a bit deeper) in the Ogg-sourced file than in the rest.
MPC-transcoded files don't bear any mark of the Ogg->Ogg flaw.
The --standard file sounds a bit clumsy with less stereo separation (regarding just high frequencies), but the --xtreme file is completely OK (for a "transcoded-from-238kbits" file). I wonder if someone could even ABX the CD-DA-sourced Ogg from the MPC--xtreme-sourced one!

This is the best part :-))
The last file's quality is completely against my wits. I took the CD-DA source, encoded into a -q 6 Ogg, decoded to WAV, encoded to --insane MPC, decoded to WAV, encoded into a -q 4 Ogg. Not even in a dream i would imagine that inserting a MPC into a Ogg->Ogg transition could substantially improve the process, yet it did! The resulting file sounds exactly the way i would expect the direct-transcode to sound up. I think it even beats the -q 9 Ogg transcoding!
Someone should look into this because something really weird is going on.

Conclusion:
I consider Vorbis to the best codec out there but the fact that it can't transcode its own files properly makes Vorbis look somehow strange to me. If you have 192kbit Oggs at your disposal, sadly, there's just a very awkward way to transcode them into 128kbit (thru MPC, of course!) without sacrificing quality. I'll stick with the verified MPC--insane for archiving (less than 250kbits avg and transcodes perfectly, thus no need of 480kbit Oggs or something like that).

Appendix:
My equipment:
SB Live! soundcard, Sennheiser HD 490 Live headphones (60 Euro-class), 25-years-old ears (can't complain so far :-))
Playback by WinAmp 2.81, Nullsoft Vorbis Decoder v1.2.2 (using DirectSound on Windows XP)

Created using "notepad.exe" on 13th December 2005.


*



Thanks for your report.


--------------------
www.High-Quality.ch.vu -- High Quality Audio Archiving Tutorials
Go to the top of the page
+Quote Post
Martel
post Dec 22 2005, 14:05
Post #3





Group: Members
Posts: 559
Joined: 31-May 04
From: Czech Rep.
Member No.: 14430



There's something i'd like to know:
1) Why did you ("user") copy the web page into the forum? It is 24-7-web-hosted...
2) Who did increase my warning level?
3) What's
"The General forum is not the "put-everything-here-and-let-moderation-sort-it" forum."?
I am quite capable of reading English but i can't make any sense out of that sentence. :-(

You see, it is a rather complicated story and everyone interested should read it as a whole.
And the web space provider would be annoyed if i linked the sample files from another web space (this forum).


--------------------
IE4 Rockbox Clip+ AAC@192; HD 668B/HD 518 Xonar DX FB2k FLAC;
Go to the top of the page
+Quote Post
Saoshyant
post Dec 24 2005, 15:56
Post #4





Group: Members
Posts: 68
Joined: 26-July 05
From: Portugal
Member No.: 23539



Matel, you seem to have posted this on the wrong forum, and moderators are not supposed to sort threads out for you.

Vorbis is a lossy format. It's never recommended to transcode itself, although your report sounds strange, as in MPC shouldn't help transcoding quality since it's another lossy format. Maybe someone could use some of its spare time to try this out, and report if the effect is the same.


--------------------
Join //spreadopenmedia.org to promote Vorbis, FLAC, Speex, etc
Go to the top of the page
+Quote Post
Caroliano
post Dec 24 2005, 18:00
Post #5





Group: Members
Posts: 67
Joined: 21-December 05
Member No.: 26559



Well, I fast compared the original aganist the "transcode from a -q 6 Ogg into a -q 4 one" and "transcode from a -q 6 Ogg into --insane MPC, then into a -q 4 Ogg".

The second one, with MPC between, sounded better for me, but was easier to ABX. This may be the problem. The first ir closer to original, but the second smoothered the things making it apear better. That was my opinion testing it quick.

Anyway, you shoud not transcode from lossy formats. The best is from the original or an lossless format. Take a look also in an short listening test that Guruboolez done about it: http://www.hydrogenaudio.org/forums/index....showtopic=32440

Vorbis has a feature called 'bitrate peeling' but no toll implemented it yet. This way you can take an higher bitrate ogg and convert in an lower bitrate ogg with almost no diference than direct converting from the source.
Go to the top of the page
+Quote Post
guruboolez
post Dec 24 2005, 18:30
Post #6





Group: Members (Donating)
Posts: 3474
Joined: 7-November 01
From: Strasbourg (France)
Member No.: 420



Martel> Did you compare all these files blindly? I see in your reports:

QUOTE
My equipment:
SB Live! soundcard, Sennheiser HD 490 Live headphones (60 Euro-class), 25-years-old ears (can't complain so far :-))
Playback by WinAmp 2.81, Nullsoft Vorbis Decoder v1.2.2 (using DirectSound on Windows XP)


Otherwise, the test is interesting. I already performed a short transcoding listening test and it appeared that transcoding from MP3 to MP3 produced the worst (by far!) results. Your test could show that the same process (i.e. encoding from one format to the same one) is really a bad thing. Several people are convinced that transcoding is better (or "less bad") if you keep the same format or encoder. Tests may show the opposite. Surprising, isn't it? smile.gif
Go to the top of the page
+Quote Post
Wintershade
post Dec 30 2005, 11:23
Post #7





Group: Members
Posts: 138
Joined: 27-July 04
Member No.: 15817



QUOTE (Caroliano @ Dec 24 2005, 07:00 PM)
The second one, with MPC between, sounded better for me, but was easier to ABX. This may be the problem. The first ir closer to original, but the second smoothered the things making it apear better.


Meaning it is actually much worse.
Anyway, why transcode from 192 kbps Vorbis to 128 kbps Vorbis is beyond me.

If you really have to transcode, I'd reccommend trying the P3MOD or P4MOD compile (deending on the processor you have) rather than aoTuV, and playing around a bit with impulse_noisetune, impulse_trigger_profile and lowpass_frequency switches.
I use those for transcoding from a very high bitrate files (no matter the format) into lower bitrate Vorbis and in 99% cases fail to hear the artifacts. Needless to say, it is ABXable, but doesn't hurt (much) when you listen to it with a lot of other noise around you.

Cheerz =]

edit: typos

This post has been edited by Wintershade: Dec 30 2005, 11:27


--------------------
Only the best is good enough.
Go to the top of the page
+Quote Post
Otto42
post Dec 30 2005, 15:20
Post #8





Group: Members
Posts: 1075
Joined: 15-October 03
From: Memphis, TN
Member No.: 9323



QUOTE (guruboolez @ Dec 24 2005, 12:30 PM)
Several people are convinced that transcoding is better (or "less bad") if you keep the same format or encoder.
*

I thought it was generally accepted that the opposite was the case? Because using the same format & encoder twice produces similar artifacts which have a tendancy to reinforce each other (*very* broadly speaking, of course).

Anyway, I thought that the conventional wisdom was "if you have to transcode lossy->lossy, do it to a different format entirely".


--------------------
http://ottodestruct.com
Go to the top of the page
+Quote Post
Wintershade
post Dec 30 2005, 15:36
Post #9





Group: Members
Posts: 138
Joined: 27-July 04
Member No.: 15817



QUOTE (Otto42 @ Dec 30 2005, 04:20 PM)
I thought that the conventional wisdom was "if you have to transcode lossy->lossy, do it to a different format entirely".


The conventional wisom is:
1. Don't transcode
2. If you must transcode, refer to rule no. 1
3. If you really have to transcode, test a few encoders, formats and settings, and use one most suitable for you; don't sh**e those files
4. Refer to rule no. 1

Cheerz =]


--------------------
Only the best is good enough.
Go to the top of the page
+Quote Post
Martel
post Jan 3 2006, 15:55
Post #10





Group: Members
Posts: 559
Joined: 31-May 04
From: Czech Rep.
Member No.: 14430



I don't usually transcode from ogg@192 to ogg@128, i do transcode from mpc@insane.
This was a rare event when i did not have the high-bitrate backup and accidentaly found the "bug", then looked into it closer.
Generally, i made the post because i see some people on this forum abandoning MPC as archival codec and going to ogg-only. And if the ogg has these problems with transcoding, perhaps the migration is not a good idea.
If you wish to keep a to-ogg-transcodable archive of oggs, you have to choose a considerably higher bitrate (due to reported problems) than you would have to with a MPC-based archive.
This could be because of MPC being based on MPEG-1 Layer 2, possibly having a distinct filtering/FFT-framing structure than MP3-based codecs (i guess the ogg is a Layer 3 based...).
I got the idea of using the MPC between the ogg-to-ogg transition to "de-ogg" the source (remove that taint that corrupted the transcoded file), it wasn't a random mad man's idea! smile.gif


--------------------
IE4 Rockbox Clip+ AAC@192; HD 668B/HD 518 Xonar DX FB2k FLAC;
Go to the top of the page
+Quote Post
Martel
post Jan 3 2006, 16:09
Post #11





Group: Members
Posts: 559
Joined: 31-May 04
From: Czech Rep.
Member No.: 14430



QUOTE (Caroliano @ Dec 24 2005, 09:00 AM)
Well, I fast compared the original aganist the "transcode from a -q 6 Ogg into a -q 4 one" and "transcode from a -q 6 Ogg into --insane MPC, then into a -q 4 Ogg".

The second one, with MPC between, sounded better for me, but was easier to ABX. This may be the problem. The first ir closer to original, but the second smoothered the things making it apear better. That was my opinion testing it quick.
*


Well, don't take me bad, but if you could ABX the direct transcode from the original WORSE than you could ABX the MPC-between sample from the original, then you probably have something wrong with your ears/audio system... or you didn't pay attention to the highest frequencies (as i pointed out somewhere in the article).
Just the high frequencies, please! smile.gif
Other content (mids, bass) seems to be transcoded fine...


--------------------
IE4 Rockbox Clip+ AAC@192; HD 668B/HD 518 Xonar DX FB2k FLAC;
Go to the top of the page
+Quote Post
Wintershade
post Jan 3 2006, 16:25
Post #12





Group: Members
Posts: 138
Joined: 27-July 04
Member No.: 15817



Why archiving in a lossy format anyway? Ogg Vorbis (NOT just ogg, ogg is a container, not a format) has the highest bitrates quite close to some lossless formats, such as Monkeys' Audio. I really don't see a point in archiving to insanely-high-bitrate-lossy-format, because later on, you actually won't know what to do with it (transcoding will degrade it's quality a lot, and with it's original bitrate, it will probably be a heavy overkill for your iPod, iRiver, or a similar toy).


--------------------
Only the best is good enough.
Go to the top of the page
+Quote Post
singaiya
post Jan 3 2006, 18:14
Post #13





Group: Members
Posts: 365
Joined: 21-November 02
Member No.: 3830



QUOTE (Wintershade @ Jan 3 2006, 07:25 AM)
Why archiving in a lossy format anyway? Ogg Vorbis (NOT just ogg, ogg is a container, not a format) has the highest bitrates quite close to some lossless formats, such as Monkeys' Audio. I really don't see a point in archiving to insanely-high-bitrate-lossy-format, because later on, you actually won't know what to do with it (transcoding will degrade it's quality a lot, and with it's original bitrate, it will probably be a heavy overkill for your iPod, iRiver, or a similar toy).
*


(a little OT but...) Transcoding from a hybrid like Wavpack lossy results in no degradation that I've been able to discern. So for me, that's a suitable archive format. I'd be very interested to know if anybody has positively abx'd such transcodes from ~384kbps.
Go to the top of the page
+Quote Post
gameplaya15143
post Jan 8 2006, 22:50
Post #14





Group: Members
Posts: 484
Joined: 8-January 06
From: Earth
Member No.: 26978



vorbis has always never been able to transcode to vorbis very well. (at least ever since i first tried it 3 years ago)
be it due to the lossy stereo, quantitization... i dont know.

at least its capable of fooling my ears cool.gif just not the encoder sad.gif

thats why i use q 0 with vorbis, so i'll never have any reason to transcode it to a lower bitrate

transcoding from q 10 vorbis seems to work ok though


--------------------
Vorbis-q0-lowpass99
lame3.93.1-q5-V9-k-nspsytune
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th December 2014 - 19:04