Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th August 2010, 01:10   #21  |  Link
rik1138
Registered User
 
Join Date: Mar 2008
Location: LA
Posts: 620
Quote:
Originally Posted by ramicio View Post
Well I finally got it! I tried decoding the core into a wav file just to make a DTS-HD Master file with the proper header for the time (it could be silence for all the encoder cares.) Well this software screws timings up big time. I only got 1:36:39 out of it on the PCM decode. So I just stretched the file to 1:50:00 and encoded that, then copied that header to the beginning of the ripped file, and ripped away. Success! I just figured it would either stop where it was supposed to or give an unexpected end of file error, but no error, it just stopped where it was supposed to. I think this thread could be informative to people in the future. Thank you very much, Rik! You are a genius!
Cool to hear, glad it worked! I was just thinking of encoding a 2-hr silence and asking you to use that header, but it sounds like you had the same idea. And it worked, awesome!

Now, we have to get ArcSoft to fix their stupid decoder, and this won't be a problem. Not everyone has the DTS tools at their disposal...

I'm surprised they did a true mono track. The studios usually try to up-convert everything to 5.1 or something. Or, at least using the mono track on the left and right creating 2-channel mono. Since they stuck with the mono, I'm glad to see they did it right.

Rik
rik1138 is offline   Reply With Quote
Old 14th August 2010, 01:13   #22  |  Link
rik1138
Registered User
 
Join Date: Mar 2008
Location: LA
Posts: 620
Quote:
Originally Posted by ramicio View Post
BTW for you naysayers on quality...The new flac file is 62.6% its original size. The flac made from the lossy core (only 16-bit mind you)
Ooo... I forgot about DTS being 24-bit... I was using a 16-bit WAV file... Maybe that's why there was a timecode problem? Not sure...
rik1138 is offline   Reply With Quote
Old 14th August 2010, 01:21   #23  |  Link
ramicio
Banned
 
Join Date: Mar 2004
Location: PA, US
Posts: 683
Quote:
Originally Posted by rik1138 View Post
Ooo... I forgot about DTS being 24-bit... I was using a 16-bit WAV file... Maybe that's why there was a timecode problem? Not sure...
That could be it! 16/24 = 2/3, and the ratio of the 2 different times comes out to be ~74%, so with the crazy messed up time codes, it was probably because of that!
ramicio is offline   Reply With Quote
Old 14th August 2010, 08:19   #24  |  Link
nurbs
Registered User
 
Join Date: Dec 2005
Posts: 1,460
Quote:
Originally Posted by ramicio View Post
BTW for you naysayers on quality...The new flac file is 62.6% its original size. The flac made from the lossy core (only 16-bit mind you) is 43.5%! Much more quality and actual sound information to fill a file with. If I was to take a studio music rip that is 24/192, they are usually around 40-50% when losslessly compressed. If I took that original PCM and resampled it down to 24/96 and compressed it losslessly, I would get a much higher number, usually 60-70%. This just shows that lossy is crap!
Bigger doesn't mean better quality.
Suppose you have two flac files. File A was encoded straight from the source. File B was encoded after adding noise to the source. You'll want file B because it's bigger and you believe it to be better quality.

Difference in filesize after compression doesn't directly translate in audible difference.
See LossyWAV. Lossless compression will work much better after preprocessing with it, but it's transparent on most sources with the defaults, let alone higher quality settings.
nurbs is offline   Reply With Quote
Old 14th August 2010, 17:08   #25  |  Link
ramicio
Banned
 
Join Date: Mar 2004
Location: PA, US
Posts: 683
I was illustrating that the lower quality file (24/96) vs. the higher quality (24/192) has a higher percentage because the 24/192 does not use all of its dynamic range. When you resample it in half, it gets a more economical use of it when you losslessly compress it. And that in the case of my core vs. lossless files, the opposite is holding true, so therefore to the ears my lossless is much better. There were also obvious compression artifacts heard with the core file. When you losslessly compress something that has already been lossily compressed, it sees that it was compressed and it means it can compress lossless even more. I may not be wording it nicely, I'm not good at that.

Take a CD, rip a track to wav. Compress the wav with flac. Note the percentage. Compress the wav with a lossy format you feel is transparent. Take that lossily-compressed track and decompress it into a wav. Now compress that wav with flac, and note the percentage. It WILL be lower.

Take a bmp, rar or zip it. Compress the bmp to jpg. Save that jpg back to a bmp, compress that bmp with rar or zip. Yea, the bmp that came from the jpg should be smaller!

Also, with the noise debate, like it or not, vinyl has a lot of noise, but the fidelity is superior to CDs. Noise makes up part of the sound. They argue that there are frequencies on vinyl that are pointless because you can't hear them, but sound affects sound even if you can't hear it, so to me it is necessary to keep as much from the master recording intact as possible, even if its noisy. I was in my car at a red light, and a semi was sitting next to me. I had my windows partially open. I have a loud exhaust. Well the sound of his engine, which was very low in frequency, resonated with my exhaust note, and the way the windows were open, to make my car sound like it was idling half the speed it really was. I couldn't hear what sound from the truck was doing this. It was out of my audible range.

Last edited by ramicio; 14th August 2010 at 17:14.
ramicio is offline   Reply With Quote
Old 14th August 2010, 17:26   #26  |  Link
TinTime
Registered User
 
Join Date: Jan 2009
Location: UK
Posts: 403
Quote:
Originally Posted by ramicio View Post
Take a CD, rip a track to wav. Compress the wav with flac. Note the percentage. Compress the wav with a lossy format you feel is transparent. Take that lossily-compressed track and decompress it into a wav. Now compress that wav with flac, and note the percentage. It WILL be lower.
That depends on the precision you decode the lossy version to.
TinTime is offline   Reply With Quote
Old 14th August 2010, 17:55   #27  |  Link
Thunderbolt8
Registered User
 
Join Date: Sep 2006
Posts: 2,197
Quote:
Originally Posted by rik1138 View Post
Wait, hold on... A file encoded straight from the DTS-HD MA encoder will _not_ work with eac3to, the author of eac3to never programmed it to work with raw files, only files demuxed from a Blu-ray disc.
what you can do is demux the file DTS-HD MA file created by dts master suite with tsmuxer, then it becomes readable by eac3to. in a second step apply a delay of -21ms to that demuxed track so that the track will have exactly the same length as the original created file (seems to be a bug? of tsmuxer when demuxing such tracks)
Thunderbolt8 is offline   Reply With Quote
Old 14th August 2010, 19:06   #28  |  Link
ramicio
Banned
 
Join Date: Mar 2004
Location: PA, US
Posts: 683
Quote:
Originally Posted by TinTime View Post
That depends on the precision you decode the lossy version to.
What precision? What does that even mean? You can't get back data from a lossy source because it tosses it out. If it didn't it would be called lossless. No matter how good your encoder and decoder is, you lose information. If you can't tell the difference between a lossy and a master, perhaps you have low end to average sound equipment, which would be most onboard sound out there. There are a few that feautre the x-fi, and are probably more onboard with good codecs behind them, but most are crap.
ramicio is offline   Reply With Quote
Old 14th August 2010, 19:40   #29  |  Link
nurbs
Registered User
 
Join Date: Dec 2005
Posts: 1,460
Quote:
Originally Posted by ramicio View Post
And that in the case of my core vs. lossless files, the opposite is holding true, so therefore to the ears my lossless is much better. There were also obvious compression artifacts heard with the core file.
Maybe you can hear it. Maybe in this case the lossy track is worse than the lossless one, but considering it's a 756 kbps mono DTS track I doubt it. People often make claims like that, but when they actually do a blind ABX test they suddenly can't tell lossy from lossless any more.
I won't press you on your opinion, but you can't generalize that simply because it compresses better the quality will audibly worse. That's why I linked the LossyWAV page. Preprocessing with it can bring down the bitrate of the resulting flac by 20 to 40 percent and people are generally unable to ABX the difference, hence for most people on most samples it will be inaudible.

Quote:
Originally Posted by ramicio View Post
Also, with the noise debate, like it or not, vinyl has a lot of noise, but the fidelity is superior to CDs. Noise makes up part of the sound. They argue that there are frequencies on vinyl that are pointless because you can't hear them, but sound affects sound even if you can't hear it, so to me it is necessary to keep as much from the master recording intact as possible, even if its noisy.
I have several issues with that.
Random noise being introduced at playback doesn't make it higher fidelity, it makes it lower fidelity. I'm not saying that Vinyl is bad, I have several records myself and enjoy them. The noise adds a certain flair, but still fidelity is how well the input is reproduced and Vinyl is worse at that than CDs. The noise you hear when you play it back wasn't present in the master (mostly), it is an artifact introduced by the playback device.
There aren't any frequencies on Vinyl that can't be on CDs. On average a Vinyl record will be able to reproduce frequencies between 60 Hz and 18 kHz, maybe a bit more when it's in perfect condition. The dynamic range is about 12 bit under perfect conditions.
Basically that means everything that can be deliberately put on Vinyl, excluding noise added at playback, can be perfectly contained on a CD which supports frequencies up to 22 kHz with 16 bits dynamic range.

You can like the noise, you can argue that in some cases the Vinyl was made from a better master, but technically it's sound reproduction quality is inferior.

Quote:
Originally Posted by ramicio View Post
What precision? What does that even mean?
Precision refers to the bitdepth the samples will have after decoding. Due to the methods used in lossy compression you can decode the files to more or less arbitrary bitdepths. If you have an AAC file and you decode it to 16 bit PCM that's one representation of its content; by decoding it to 24 bit you'd get a more accurate representation.
nurbs is offline   Reply With Quote
Old 14th August 2010, 19:41   #30  |  Link
TinTime
Registered User
 
Join Date: Jan 2009
Location: UK
Posts: 403
Quote:
Originally Posted by ramicio View Post
What precision? What does that even mean? You can't get back data from a lossy source because it tosses it out. If it didn't it would be called lossless. No matter how good your encoder and decoder is, you lose information. If you can't tell the difference between a lossy and a master, perhaps you have low end to average sound equipment, which would be most onboard sound out there. There are a few that feautre the x-fi, and are probably more onboard with good codecs behind them, but most are crap.
Fine. Why don't you run your proposed test? Let's assume that AC3 is our lossy codec of choice. Start with a CD track ripped to wav - orig_track.wav

Now run it through eac3to a couple of times to encode to AC3 and decode back to PCM:

Code:
eac3to.exe orig_track.wav inter_track.ac3
eac3to.exe inter_track.ac3 new_track.wav
Convert orig_track.wav and new_track.wav to FLAC. Which has the better compression ratio? Which is the higher quality?
TinTime is offline   Reply With Quote
Old 14th August 2010, 20:22   #31  |  Link
ramicio
Banned
 
Join Date: Mar 2004
Location: PA, US
Posts: 683
Quote:
Originally Posted by nurbs View Post
Basically that means everything that can be deliberately put on Vinyl, excluding noise added at playback, can be perfectly contained on a CD which supports frequencies up to 22 kHz with 16 bits dynamic range.
Not true at all. A sine wave is better represented in analog than digital, because it is pure. You can't make a CD rip sound better by upsampling it. It is what it is. If you record a vinyl at 24/44.1 and re-record it at 24/192, which will sound better? The 24/192. There is more horizontal resolution to accurately produce the wave at playback. For bits it would be the vertical resolution of the wave. Just because there is noise in vinyl doesn't mean you are throwing bits away, it is still higher fidelity and an actual analog waveform.



Both waves are a 10 khz sine wave. Top file format is 24/192. bottom is 24/44.1. So you're saying a cd will sound better on a sole reason of having no noise? That's 10 khz. Less than half the total frequency a CD can reproduce. They become square waves at that point and sound bad. I know musical instruments don't produce their audible frequencies that high, except cymbals, which is the one thing that annoys me when listening to CDs. The cymbals sound artificial. CDs are fine for rap music or electronic stuff that is supposed to sound artificial. That's why I prefer to listen to my classic rock on 24/96 vinyl rips. Oh, and there's the turntable with lasers as a pickup. That would be the ultimate for someone who can afford it, as there would be no noise, and quite possibly the closest you can get to a master recording.
ramicio is offline   Reply With Quote
Old 14th August 2010, 20:32   #32  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,769
This discussion is off-topic, however, I'll add something: one can't hear the digital sound: this will be converted to analog, and according to the D/A-converter in use, the "steps" will be attenuated.

Besides, the discussion vinyl vs. CD has its own topic. I own a medium price and quality LP-player, also a very good CD-player, medium class AVR and old-fashioned loudspeakers (not the type that has 2" tweeters and generates the basses through cunning reflexions) and the CD sounds better than the LP (on the same album), in every aspect, including the noise in the quit passages in classic music.
Ghitulescu is offline   Reply With Quote
Old 14th August 2010, 20:48   #33  |  Link
ramicio
Banned
 
Join Date: Mar 2004
Location: PA, US
Posts: 683
Quote:
Originally Posted by Ghitulescu View Post
This discussion is off-topic, however, I'll add something: one can't hear the digital sound: this will be converted to analog, and according to the D/A-converter in use, the "steps" will be attenuated.

Besides, the discussion vinyl vs. CD has its own topic. I own a medium price and quality LP-player, also a very good CD-player, medium class AVR and old-fashioned loudspeakers (not the type that has 2" tweeters and generates the basses through cunning reflexions) and the CD sounds better than the LP (on the same album), in every aspect, including the noise in the quit passages in classic music.
OK, so you have a crap turntable, and an awesome CD player, no wonder... Vinyl quality depends on the manufacturing. The first record I bought was Incredibad by The Lonely Island, brand new. The record came warped. Playback was even more disappointing. I also have some brand new records that are remasters of old rock. Boston by Boston sounds phenominal. Fool For the City by Foghat, too. Those are both very thick vinyl, and the person behind making it is making sure what you are paying extra for sounds awesome. My turntable is lower quality, too, and my cartridge isn't the best, but to me it sounds better than the CDs of the same album. Plus I enjoy my music with headphones

Last edited by ramicio; 14th August 2010 at 21:09.
ramicio is offline   Reply With Quote
Old 14th August 2010, 21:03   #34  |  Link
ramicio
Banned
 
Join Date: Mar 2004
Location: PA, US
Posts: 683
Quote:
Originally Posted by TinTime View Post
Fine. Why don't you run your proposed test? Let's assume that AC3 is our lossy codec of choice.
OK...I have Hotel California by The Eagles, which the studio conveniently ripped to 24/192 directly from the master tape.



1. the eagles - hotel california - 01 - hotel california 1.wav: This is the basis. I downsampled to 48 khz, kept it 24-bit.
2. the eagles - hotel california - 01 - hotel california 1.flac: This is the basis FLAC. 73.8%
3. the eagles - hotel california - 01 - hotel california 1.ac3: This is the first ac3 encode. 448 kbps, with eac3to.
4. the eagles - hotel california - 01 - hotel california 2.wav: This is decompressed from the eagles - hotel california - 01 - hotel california 1.ac3.
5. the eagles - hotel california - 01 - hotel california 2.flac: This would be the FLAC from the eagles - hotel california - 01 - hotel california 2.wav. 72.8%
6. the eagles - hotel california - 01 - hotel california 2.ac3: This is compressed from the eagles - hotel california - 01 - hotel california 2.wav @ 448 kbps.
7. the eagles - hotel california - 01 - hotel california 3.wav: Decompressed the eagles - hotel california - 01 - hotel california 2.ac3.
8. the eagles - hotel california - 01 - hotel california 3.flac: FLAC from the eagles - hotel california - 01 - hotel california 3.wav. 71.9%

This all is the reason why EXE files or JPG files don't compress much when you archive them in a ZIP or RAR. You get much better compression if you were to compress the source code of said EXE, or a BMP.
ramicio is offline   Reply With Quote
Old 14th August 2010, 21:11   #35  |  Link
TinTime
Registered User
 
Join Date: Jan 2009
Location: UK
Posts: 403
Quote:
Originally Posted by ramicio View Post
Both waves are a 10 khz sine wave. Top file format is 24/192. bottom is 24/44.1. So you're saying a cd will sound better on a sole reason of having no noise? That's 10 khz. Less than half the total frequency a CD can reproduce. They become square waves at that point and sound bad.
This is absolutely not how digital audio works. The waves do not become square, they do not sound bad.
TinTime is offline   Reply With Quote
Old 14th August 2010, 21:15   #36  |  Link
nurbs
Registered User
 
Join Date: Dec 2005
Posts: 1,460
Quote:
A sine wave is better represented in analog than digital, because it is pure. You can't make a CD rip sound better by upsampling it.
I agree with both statements.

Quote:
If you record a vinyl at 24/44.1 and re-record it at 24/192, which will sound better?
I'm not sure if you are talking about recording from a Vinyl (to PC) or recording what will eventually be put on a vinyl, I'm assuming the former.
They'll most likely both sound the same. Even if the first recording was made at 16 bit I'd still claim that. Higher bitdephts and samplingrates are beneficial for processing, so if you plan to do that recording higher can't hurt, but for listening it's a waste of space, especially if you record from a vinyl. Everything outside the bounds I've listed in my previous post is caused by dirt in the groves, wear of the groves and other imperfections of the playback system.
If you can actually hear a difference it's likely that something went wrong during recording. You could downsample and dither your high resolution track to 16 bit 48 kHz. An ABX test could then establish if there is an audible difference, assuming the playback hardware isn't to blame (I remember reading about one such case where the soundcard introduced artifacts at certain samplerates).
Even with samples specifically created for that purpose people are hardly able to ABX 16 bit from 24 bit and 48 kHz from 192 kHz under controlled conditions, so I don't buy that recording a Vinyl with a dynamic range and noise floor way above and beyond what the medium can provide will help.

Quote:
Both waves are a 10 khz sine wave. Top file format is 24/192. bottom is 24/44.1. So you're saying a cd will sound better on a sole reason of having no noise?
What I'm saying is that if you take the same master and use it to produce a Vinyl and a CD the CD will be a more accurate representation of that master, because it has a higher frequency range, higher dynamic range, lower noise floor and playing it back lacks the artifacts that are introduced when playing back vinyl.
Let's say you actually take your 10 kHz sine wave and put it on Vinyl and CD. You rip both, the former you record to 24 bit 192 kHz and the latter you upsample to that (or you downsample the former, doesn't matter). If you now compare both recordings to your master the CD will be closer to it because it didn't have a boatload of artifacts introduced during pressing and reading. Vinyl is analog, but the groves are neither pressed nor read with infinite precision. The values I've given are real live limits verified through extensive testing.

Again, I'm not saying you shouldn't enjoy Vinyl. All I'm saying is that when it comes to fidelity it is inferior to CD.

I recommend you go over to Hydrogenaudio and take a look at their wiki pages about Vinyl, especially the FAQ and the Myths section.
By the way if you actually have samples where the difference between 16 bit 48 kHz and 24 bit 192 kHz is audible and you can reliably identify them by ABX tests the people there will be very interested in you and your samples.

Last edited by nurbs; 14th August 2010 at 21:18.
nurbs is offline   Reply With Quote
Old 14th August 2010, 21:21   #37  |  Link
ramicio
Banned
 
Join Date: Mar 2004
Location: PA, US
Posts: 683
Quote:
Originally Posted by TinTime View Post
This is absolutely not how digital audio works. The waves do not become square, they do not sound bad.
But when you put a whole ensemble of sounds together and compress that waveform down to something like a 44.1 khz CD you start missing information. I will agree if you will agree that making something digital you lose information. My argument is just the quality of the sound you get in the end. I can totally agree with these theories, but when it comes to being in the real world, I hear much more detail of voices and instruments from the same vinyl album vs. CD.

This started as a help thread because I wanted the lossless. I wasn't asking for anyone's opinion on if the lossy would be a neglible difference. Rik was helpful, and he didn't present any opinion on why I wanted the lossless. For that I thank him. I'm not telling anyone they should buy a huge hard drive and have an entire music collection in lossless, as I do. If you like what you have and like to listen to it, great! For me I enjoy the best quality I can get. For video, I don't care as much, as long as I don't see compression artifacts I'm satisfied. Transcoding video takes a long time, this is why I don't care. Audio is different story and to transcode things takes me little time. I myself can tell a huge difference between DVD-Audio @ 24/192 and the same album on CD.

Last edited by ramicio; 14th August 2010 at 21:26.
ramicio is offline   Reply With Quote
Old 14th August 2010, 21:55   #38  |  Link
TinTime
Registered User
 
Join Date: Jan 2009
Location: UK
Posts: 403
Quote:
Originally Posted by ramicio View Post
OK...I have Hotel California by The Eagles, which the studio conveniently ripped to 24/192 directly from the master tape.
You've changed your test parameters (this is not CD audio) so you've kind of defeated the point I was trying to make. My point is that the compressibility of audio decoded from a lossy encode will be dependent on the precision (bit-depth) that the lossy audio is decoded to so it's not a particularly useful way to measure audio quality.

Quote:
Originally Posted by ramicio View Post
But when you put a whole ensemble of sounds together and compress that waveform down to something like a 44.1 khz CD you start missing information. I will agree if you will agree that making something digital you lose information. My argument is just the quality of the sound you get in the end. I can totally agree with these theories, but when it comes to being in the real world, I hear much more detail of voices and instruments from the same vinyl album vs. CD.
Yes. You lose frequencies above whatever the low pass filter is set to going in and out of digital, and you introduce noise in the form of dithering.

I'm not arguing that you should prefer CD to vinyl. That's just personal preference. I'm with you - I love records. I was just saying that your graphs with their stair steps are misleading.

Quote:
Originally Posted by ramicio View Post
This started as a help thread because I wanted the lossless. I wasn't asking for anyone's opinion on if the lossy would be a neglible difference. Rik was helpful, and he didn't present any opinion on why I wanted the lossless. For that I thank him.
Again I never offered an opinion on lossy vs lossless. That's for you to decide. I was just suggesting that decoding a lossy track and then seeing how it compresses with FLAC isn't necessarily a useful metric to judge audio quality because other factors can come into play.
TinTime is offline   Reply With Quote
Old 14th August 2010, 22:07   #39  |  Link
ramicio
Banned
 
Join Date: Mar 2004
Location: PA, US
Posts: 683
Dude, it's called lossy for a reason. You CANNOT keep information on lossy compression. This is why it's called LOSSY. It doesn't matter what sound format I used for this. To encode a 16 bit file into ac3 and have it decode to a 24 bit just shows there is loss and it needs the extra info of 24 bits to give you the info instead of rounding it. Even at 24 bits you still lost info. If you downconvert to 16 bits it will just round off the numbers. You weren't the one to tell me to just grab the lossy, with no help, it was in post #4. For me, lossy compression is fine for my iPhone, where there is not a lot of space, but for my pc, its lossless. I really hate mp3, even at 320 it sounds bad. I like AAC. At 320 it sounds damn good, and way better than mp3@320. I don't need crazy quality for my phone, I have nice Bose earbuds, but earbuds are limited in quality, and whenever I listen to music with it, the environment isn't quiet. The thing I really don't like about CD is the way they compress it. If you look at the same song on CD, vs a captured vinyl, or if you're lucky a DVD-Audio, like every sound on the CD will be at peak volume. I have witnessed a few CDs that do sound awesome, and their waveform is quieter and more natural.

Last edited by ramicio; 14th August 2010 at 22:09.
ramicio is offline   Reply With Quote
Old 14th August 2010, 22:49   #40  |  Link
nurbs
Registered User
 
Join Date: Dec 2005
Posts: 1,460
Quote:
The thing I really don't like about CD is the way they compress it. If you look at the same song on CD, vs a captured vinyl, or if you're lucky a DVD-Audio, like every sound on the CD will be at peak volume.
That's done in mastering and is a result of the Loudness War. It's not a limitation of the medium. DVD-Audio offers a higher possible dynamic range than CDs, while Vinyl has a lower dynamic range than both.
nurbs is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:23.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.