View Full Version : Flac bitstream - is it possible?
Qaq
26th February 2011, 10:03
Looking for Flac *bitstream* solution. My AVR can download, recognise and decode Flac over Ethernet connection, so I suppose it also possible for it to recognise and decode Flac over HDMI connection. But how to stream Flac over windows audio session and HDMI? I only see *dts-wav*-like solution but for Flac. Some Wav container (header?) with Flac stream maybe. Why not just LPCM? Well, I've compared LPCM vs DTS lossless with 2.0 96/24 sample and found that LPCM sounds worse. Yes, I can DBT it. Yes, I've cheked "bit perfect" with dts-wav sample. Why Flac? It's free, easy to use and capable with 44.1kHz and x48kHz SRs. Another question if it will be capable with existing muxers. Any ideas?
G_M_C
26th February 2011, 11:09
Looking for Flac *bitstream* solution. My AVR can download, recognise and decode Flac over Ethernet connection, so I suppose it also possible for it to recognise and decode Flac over HDMI connection. But how to stream Flac over windows audio session and HDMI? I only see *dts-wav*-like solution but for Flac. Some Wav container (header?) with Flac stream maybe. Why not just LPCM? Well, I've compared LPCM vs DTS lossless with 2.0 96/24 sample and found that LPCM sounds worse. Yes, I can DBT it. Yes, I've cheked "bit perfect" with dts-wav sample. Why Flac? It's free, easy to use and capable with 44.1kHz and x48kHz SRs. Another question if it will be capable with existing muxers. Any ideas?
Somehow that doesn't make sense to me;
If you decode a flac-encoded track on your PC, you get the bit-perfect LPCM version of the original version, agreed ? And if you bitstream that bit-perfect original through HDMI to your receiver, your receiver should receive the bit-perfect original, cause the HDMI link doesnt change the signal. Agree so far too ?
So bitstreaming the FLAC or bitstreaming the decoded LPCM doesnt make a hell of a difference. The key thing here is that you need to setup you HDMI link to bitstream, and do no conversion whatsoever in between. Thats the way my system in set up (HD5770 -> HDMI -> TX-SR875) and it works fine, even on multi-channel 24/192 PCM streams.
So the whole DTV-WAV or whatnot in your post is or has to be made irrelevant. (btw: DTS is never lossless, not even with DTS24/96. Only DTS-MA is lossless).
Qaq
26th February 2011, 11:27
you need to setup you HDMI link to bitstreamI did.and do no conversion whatsoever in betweenI don't. Like I said above:
I've compared LPCM vs DTS lossless (bitstream) with 2.0 96/24 sample and found that LPCM sounds worse.Yes, I can DBT it. Yes, I've cheked "bit perfect" with dts-wav sample.
So please do not start that "LPCM vs bitstream" debate here. I only wonder "how to put Flac into Wav" and nothing else.
DTS is never lossless, not even with DTS24/96. Only DTS-MA is lossless
Yes, i meant DTS-MA as DTS lossless.
tebasuna51
26th February 2011, 12:24
...
So please do not start that "LPCM vs bitstream" debate here. I only wonder "how to put Flac into Wav" and nothing else.
...
- Don't exist debate.
LPCM can't sounds worse than DTS-MA bitstream.
Maybe you have a problem in your audio chain.
- Well, WAV is a container and maybe we can put a Flac stream inside. The problem is: I don't know a wFormatTag defined for Flac stream, and we can't say to a player than the stream is Flac.
- G_M_C say you the solution, decode the Flac audio and send by HDMI (until PCM 7.1 24/192) the decoded audio.
Qaq
26th February 2011, 13:00
Maybe you have a problem in your audio chain.
Yes and I'm trying to avoid it sending packed Flac. Packed streams sound well on my system.
G_M_C say you the solution, decode the Flac audio and send by HDMI (until PCM 7.1 24/192) the decoded audio.
I tried it and found that I need compressed bitstream though.
The problem is: I don't know a wFormatTag defined for Flac stream, and we can't say to a player than the stream is Flac.
Does it mean DTS-WAV has wFormatTag defined for DTS stream? OK, lets look into pin-info of some Flac decoder:
WAVEFORMATEX:
wFormatTag: 0xf1ac
nChannels: 2
nSamplesPerSec: 48000
nAvgBytesPerSec: 288000
nBlockAlign: 1
wBitsPerSample: 24
cbSize: 18 (extra bytes)
Is it useful?
G_M_C
26th February 2011, 19:45
[...]
I tried it and found that I need compressed bitstream though.
[...]
Why ?
Qaq
26th February 2011, 22:33
G_M_C
Please read first post. Carefully this time.
G_M_C
27th February 2011, 01:21
G_M_C
Please read first post. Carefully this time.
Dont patronize me, i did read it and disqualified this:
[...]Why not just LPCM? Well, I've compared LPCM vs DTS lossless with 2.0 96/24 sample and found that LPCM sounds worse. [...]
as BS. And, frankly, so should you.
And there is more BS in your posts;
Why in hells name would you want to stream FLAC in a DTS-WAV container ?
You say you like the sound of DTS-MA better, compared to LPCM. You also say that you are able to convert your FLACs into DTS-MA; In your fist post you state that you apparently tested the difference between decoded FLAC into DTS-MA and LPCM after all.
So, why not convert your flacs into DTS-MA and stream those ? It wont make any difference between LPCM and DTS-MA, but whatever floats you boat ... (and if it does make a difference, I vote your receiver to be in fault. But i think in this case the placebo-effect is more close to the truth).
Qaq
27th February 2011, 10:16
Dont patronize me
The topic is "How to bitstream Flac" but not "Why to bitstream Flac (and anything else)". Stay on topic or I'll ask admin to "patronize" you. It is not my problem that you can't read/understand/answer the topic. Thanks.
tebasuna51
27th February 2011, 13:11
If the only question is: "how to stream Flac over windows audio session and HDMI?"
we can close the thread with the answer: you can't.
Qaq
27th February 2011, 13:26
The question is how to put flac into some wav-like container and play it back over windows audio session and HDMI. If you give up and noone has a clue you may close the thread.
Qaq
27th February 2011, 13:52
But I'd like to see an explanation at least.
roozhou
8th March 2011, 12:35
The question is how to put flac into some wav-like container and play it back over windows audio session and HDMI. If you give up and noone has a clue you may close the thread.
FLACs are usually vbr + vfr, making them difficult to be put inside RIFF(wav, avi) containers.
roozhou, thanks, now it's a bit clearer fo me. I don't know about wav, but avi container accepts mp3 vbr AFAIK. And it's possible to make cbr + cvr Flac, right? I'd like to try it. Could you please advise any tools\hints to make "constant" Flac and put it into WAV? There is some app SUPER by eRightSoft, I've tried it, but no luck, maybe because of these vbr + vfr. Thanks.
roozhou
8th March 2011, 14:14
roozhou, thanks, now it's a bit clearer fo me. I don't know about wav, but avi container accepts mp3 vbr AFAIK. And it's possible to make cbr + cvr Flac, right? I'd like to try it. Could you please advise any tools\hints to make "constant" Flac and put it into WAV? There is some app SUPER by eRightSoft, I've tried it, but no luck, maybe because of these vbr + vfr. Thanks.
I think DTS-WAV is different from DTS in WAV container. It's fake PCM-WAV that actually contains DTS data.
To make cfr FLAC, you have to modify the FLAC encoder because there is not an option to set a fixed frame size.
It's fake PCM-WAV that actually contains DTS data.
And everything is ok because DTS has CBR...
OK, thanks. It's seems I need to learn more about windows audio mediatypes and how to make a "friendship" with Flac there.
space1999
8th March 2011, 15:50
I'm afraid there is some confusion going on...
Just like it's possible to wrap an MP3 file in a WAV container, it's also possible to do the same with a "raw" DTS file.
OTOH, if the goal is an SPDIF-ed output, it's necessary to pad the DTS sequence with zeroes and stream it as a 2.0, 44.1 or 48kHz .WAV which is more complicated than simply add a (multichannel) WAV header.
Re: FLAC, lossless audio compression would be very-inefficient if it were made in CBR-mode. And call me fool if you wish, but I'm still waiting for a new lossless audio format whose decoders have ZER0 issues with channel mappings/layouts. :devil:
pandy
10th March 2011, 19:24
FLAC is not supported on HDMI - end of case - dismiss ;)
btw
http://en.wikipedia.org/wiki/Linear_pulse-code_modulation
so simply YOU CAN'T hear difference - DTS is decoded to LPCM anyway - You can only hear difference between decoders.
Qaq
11th March 2011, 07:24
Great point.
Again, I'm not going to bitstream Flac over HDMI directly. I'm looking for something compatible with WASAPI and HDMI (and my avr, of course). And now I'd like to try something simplier than Flac with it's vbr/vfr. MP3 or AAC CBR with WAV container will be fine to check it could work at least. But I didn't find a tool to put that *something* with CBR into WAV. Any ideas?
roozhou
11th March 2011, 12:07
You can only hear difference between decoders.
If you hear difference between two decoders, at least one of them is broken.
Decoding a .zip archive by winzip and 7z should produce bit-exact identical files. As is the output from audio decoders.
pandy
11th March 2011, 18:44
@roozhou DTS is lossy compression scheme (high quality but lossy)
@Qaq - same like with AC-3 - add stuffing to fill bitrate up to LPCM - but LPCM is lossless uncompressed audio and i see no sense to use additional compressor to send data over HDMI.
I can imagine that You signaling LPCM but inside is FLAC with stuffing (just simple transcoding 16 to for example 10 bits gives you 960kbps bitrate and less unpleasant effect of playing FLAC as LPCM - however how you will signal real LPCM?)
check those 2 standards IEC 60958 and IEC 61937 - they give all details what can be transmitted over HDMI and properly signaled - anything against this standards make your configuration non-standard - fully custom.
also this can be useful http://ac3filter.net/files/docs/ac3filter_1_30b/spdif_eng.pdf and for mandatory for all HDMI stuff "CEA-861-E" and coresponding HDMI spec "HDMISpecification13a"
roozhou
13th March 2011, 17:26
@roozhou DTS is lossy compression scheme (high quality but lossy)
You cannot hear difference between two DTS decoders, though for lossy audio format decoders a small amount of rounding error(+-1) is usually allowed.
pandy
13th March 2011, 20:47
I can't hear but somebody maybe can - if someone telling me "I hear difference between DTS1 and DTS2 and DST1 is better than DTS2 - i think: hmm - maybe he can hear something - but if someone telling me - "I hear difference between DTS and LPCM and DTS is better" i can think only hmmmm...)
Qaq
13th March 2011, 21:49
i can think only hmmmm...)
This is major problem of this thread - everyone can only say hmmmm.
Anyway, does anyone want samples? Same hi-rez material (a song) presented in 1) LPCM/flac, 2) DTS-MA/mka. Sorry, no public links, PM only.
tebasuna51
14th March 2011, 00:56
This is major problem of this thread - everyone can only say hmmmm.
Anyway, does anyone want samples? Same hi-rez material (a song) presented in 1) LPCM/flac, 2) DTS-MA/mka. Sorry, no public links, PM only.
I don't say hmmmm, I say:
"LPCM can't sounds worse than DTS-MA bitstream.
Maybe you have a problem in your audio chain."
Before play a DTS-MA or a FLAC audio, a decoder must decode the stream to uncompresed PCM audio samples, after a digital/analog converter send the audio to amplifier and speakers.
The uncompressed digital audio samples must be bit identical not mather if the source is DTS-MA, FLAC or LPCM.
Qaq
14th March 2011, 07:37
I'm pretty sure they are identical. I have zero doubts, actually. Another problem of this thread that people here see no difference between data stream and real time sound stream. IMO my question belongs to programming area only, so I tried to avoid sound debates as possible, but maybe I just have choosed wrong forum.
tebasuna51
14th March 2011, 12:06
... Another problem of this thread that people here see no difference between data stream and real time sound stream...
I don't understand, what is 'data stream' and 'real time sound stream' for you?
Is 'data stream' digital compressed audio?
Is 'real time sound stream' uncompressed digital PCM audio or analog conversion?
You claim to send flac compressed data stream by HDMI to a receiver. To do this you need:
- A receiver with flac decoder to convert flac -> PCM -> digital/analog -> amplify -> speakers
Is possible but I don't know such receiver.
- A protocol to send flac compressed audio by HDMI like exist for DTS-MA/TrueHD.
Is possible but I don't know if exist.
Qaq
14th March 2011, 15:56
Is 'data stream' digital compressed audio?
Is 'real time sound stream' uncompressed digital PCM audio?
That's right.
You claim to send flac compressed data stream by HDMI to a receiver. To do this you need:
- A receiver with flac decoder to convert flac -> PCM -> digital/analog -> amplify -> speakers
Is possible but I don't know such receiver.
My AVR has a flac decoder (as I said in first post).
- A protocol to send flac compressed audio by HDMI like exist for DTS-MA/TrueHD.
Is possible but I don't know if exist.
So I wait for response from someone who knows.
tebasuna51
14th March 2011, 16:46
Yes, I remember
"My AVR can download, recognise and decode Flac over Ethernet connection"
Can you put the AVR model (and a link to specs if you know)?
Qaq
14th March 2011, 17:20
Sure: http://www.eu.onkyo.com/products/TX-NR1007.html
From manual: (there is no spoiler tag?)
Supported Audio File Formats
For server playback, the AV receiver supports the following
music file formats: MP3, WMA, WAV, FLAC,
Ogg Vorbis, AAC and LPCM.
■ MP3
MP3 files must be MPEG-1/MPEG-2 Audio Layer 3
format with a sampling rate of 8 kHz, 11.025 kHz,
12 kHz, 16 kHz, 22.05 kHz, 24 kHz, 32 kHz,
44.1 kHz, 48 kHz and a bit-rate of between 8 kbps and
320 kbps. Incompatible files cannot be played.
Number of channels: 2
Variable bit-rate (VBR) MP3 files are supported.
(Playing times may not display correctly.)
MP3 files must have a .mp3 or .MP3 filename
extension.
■ WMA
WMA stands for Windows Media Audio and is an audio
compression technology developed by Microsoft Corporation.
Audio can be encoded in WMA format by using
Windows Mediaฎ Player.
WMA files must have the copyright option turned off.
Sampling rates of 8 kHz, 11.025 kHz, 12 kHz,
16 kHz, 22.05 kHz, 24 kHz, 32 kHz, 44.1 kHz,
48 kHz and bitrates of between 5 kbps and 320 kbps,
and WMA DRM are supported. Incompatible files
cannot be played.
Number of channels: 2
Variable bit-rates (VBR) are supported. (Playing times
may display incorrectly with VBR.)
WMA Pro/Voice formats are not supported.
WMA files must have a .wma or .WMA filename
extension.
■ WMA Lossless
Sampling rates of 44.1 kHz, 48 kHz, 88.2 kHz,
96 kHz and bitrates of between 5 kbps and 320 kbps
are supported. Incompatible files cannot be played.
Quantization bit: 16 bit, 24 bit
Number of channels: 2
Variable bit-rates (VBR) are supported. (Playing
times may display incorrectly with VBR.)
WMA files must have a .wma or .WMA filename
extension.
■ WAV
WAV files contain uncompressed PCM digital audio.
Sampling rates of 8 kHz, 11.025 kHz, 12 kHz,
16 kHz, 22.05 kHz, 24 kHz, 32 kHz, 44.1 kHz,
48 kHz, 64 kHz, 88.2 kHz, and 96 kHz are supported.
Incompatible files cannot be played.
Quantization bit: 8 bit, 16 bit, 24 bit
Number of channels: 2
WAV files must have a .wav or .WAV filename
extension.
■ AAC
AAC stands for MPEG-2/MPEG-4 Audio.
Sampling rates of 8 kHz, 11.025 kHz, 12 kHz,
16 kHz, 22.05 kHz, 24 kHz, 32 kHz, 44.1 kHz,
48 kHz, 64 kHz, 88.2 kHz, 96 kHz and bitrates of
between 8 kbps and 320 kbps, are supported. Incompatible
files cannot be played.
Number of channels: 2
Variable bit-rate (VBR) files are supported. (Playing
times may not display correctly.)
AAC files must have a .aac, .m4a, .mp4, .3gp,
.3g2, .AAC, .M4A, .MP4, .3GP or .3G2
filename extension.
■ FLAC
FLAC is a file format for lossless audio data compression.
Sampling rates of 8 kHz, 11.025 kHz, 12 kHz,
16 kHz, 22.05 kHz, 24 kHz, 32 kHz, 44.1 kHz,
48 kHz, 64 kHz, 88.2 kHz, and 96 kHz are supported.
Incompatible files cannot be played.
Quantization bit: 8 bit, 16 bit, 24 bit
Number of channels: 2
Variable bit-rates (VBR) are supported. (Playing
times may display incorrectly with VBR.)
FLAC files must have a .flac or .FLAC filename
extension.
■ Ogg Vorbis
Sampling rates of 8 kHz, 11.025 kHz, 12 kHz,
16 kHz, 22.05 kHz, 24 kHz, 32 kHz, 44.1 kHz,
48 kHz and bitrates of between 48 kbps and 500 kbps
are supported. Incompatible files cannot be played.
Number of channels: 2
Variable bit-rates (VBR) are supported. (Playing
times may display incorrectly with VBR.)
Ogg Vorbis files must have a .ogg or .OGG filename
extension.
■ LPCM (Linear PCM)
Sampling rates of 8 kHz, 11.025 kHz, 12 kHz,
16 kHz, 22.05 kHz, 24 kHz, 32 kHz, 44.1 kHz,
48 kHz, 64 kHz, 88.2 kHz, and 96 kHz are supported.
Quantization bit: 8 bit, 16 bit, 24 bit
Number of channels: 2
Ghitulescu
14th March 2011, 18:10
My AVR has a flac decoder (as I said in first post).
So I wait for response from someone who knows.
I don't know exactly what you're after, but the presence of a decoder and its use/connections are completely different things.
HDMI does not allow the use of FLAC, I think someone said this already. The only possibility is to "conceal" the FLAC as private stream within an S/P-DIF protocol, which is supported by the HDMI. The question is why would spend the engineers of Onkyo so much time with something that is against the specs (they pay royalties)? To make one customer happy? A single one?
Qaq
14th March 2011, 18:35
Are there engineers of Onkyo here?? Please show me one.
It's not "against the specs". If you will pay attention to read this topic carefully, you will understand that I'm looking for "specs compatible" solution actually.
Flac bitstream is not for single one. As DTS/DD bitstream was made not for single one too. I would not bother anyone for my only personal needs. Flac is very often used codec, it supports 44.1kHz, there are flac decoders in AVRs, so why not bistream it?
Ghitulescu
14th March 2011, 19:01
FLAC is not industry supported, other than tolerated (it's a sort of marketing thing).
SeeMoreDigital
14th March 2011, 19:55
Given that many of todays network capable hardware media players offer the ability to transcode lossless FLAC audio to a lossless PCM stream, for passing via HDMI (at the same frequency and bit depth)... I don't see the necessity of passing a native FLAC bit-stream.
Besides, nobody manufactures a hardware chip-set capable of decoding native FLAC streams!
EDIT: By-the-way. The above mentioned Onkyo TX-NR1007 media serving software "transcodes" MP3, WMA, FLAC, Ogg Vorbis, AAC and FLAC audio to LPCM too!
Qaq
14th March 2011, 21:51
The above mentioned Onkyo TX-NR1007 media serving software "transcodes" MP3, WMA, FLAC, Ogg Vorbis, AAC and FLAC audio to LPCM too!
wow... what a surprise. The only hope left that's not happen with TrueHD at least! :devil:
ramicio
14th March 2011, 22:15
Anything you throw at your receiver will decode to PCM. Anything you will bitstream over HDMI to your receiver will get decoded to PCM. Anything that plays through a network or storage on your receiver will get decoded to PCM. Then the DAC takes care of converting it to analog. If you have a DTS-HD or TrueHD with no kind of DRC or anything applied to it, the data sent to the DAC will be identical as if your computer streamed PCM decoded from FLAC over the HDMI.
SeeMoreDigital
14th March 2011, 22:24
wow... what a surprise. The only hope left that's not happen with TrueHD at least! :devil:Provided you have a suitable amplifier/receiver, Dolby TrueHD and DTS-HD MA audio is passed as bit-stream via HDMI, which is in-turn is "decoded" by the surround sound amplifiers hardware decoder chip-set...
Qaq
14th March 2011, 22:36
Guys, please... I know all the things, don't worry. The only thing I don't know is how to put that damned flac into wav! (round two or maybe three)
ramicio
14th March 2011, 22:43
eac3to
Qaq
14th March 2011, 22:44
If you have a DTS-HD or TrueHD with no kind of DRC or anything applied to it, the data sent to the DAC will be identical as if your computer streamed PCM decoded from FLAC over the HDMI
Unfortunately, dac chip in my avr thinks different. I've no idea why he is so angry with me.
Qaq
14th March 2011, 22:46
eac3to
String? Note, I don't need just to decode Flac to Wav.
ramicio
14th March 2011, 22:46
No, you are just thinking things work differently. It would make NO sense from a design standpoint to have a DAC for each format on a chip die. Companies are about profit.
String? Note, I don't need just to decode Flac to Wav.
English? I don't follow.
SeeMoreDigital
14th March 2011, 22:48
The only thing I don't know is how to put that damned flac into wav! (round two or maybe three)I think you'll find it's a totally pointless exercise because there is no technical benefit in developing a muxer or a parser to decode such streams!
ramicio
14th March 2011, 22:52
I GUARANTEE you even if you got FLAC to bitstream to the receiver, the decoder would have no idea what the FLAC is. When your receiver says it supports FLAC it means it has a way to read a file system and has computer-ish components to process and decode that format, among others. The decoder chip that listens to HDMI or SPDIF is not what is decoding FLAC from a flash drive or ethernet.
Qaq
15th March 2011, 10:52
there is no technical benefit in developing a muxer or a parser to decode such streams!
AVR has decoder already.
The decoder chip that listens to HDMI or SPDIF is not what is decoding FLAC from a flash drive or ethernet.
That's possible. But you know that your "GUARANTEE" can not be accepted as an reference. Maybe I have to check the scheme carefully though.
Ghitulescu
15th March 2011, 11:32
Guys, please... I know all the things, don't worry. The only thing I don't know is how to put that damned flac into wav! (round two or maybe three)
using the flac.exe maybe? the original :)
SeeMoreDigital
15th March 2011, 11:39
AVR has decoder already. As I said before, the Onkyo amplifiers media serving software "transcodes" MP3, WMA, FLAC, Ogg Vorbis, AAC and FLAC audio streams to an LPCM stream!
Qaq
15th March 2011, 11:52
Everything becomes to PCM before DA convertion. I only want to make it on AVR side. Always. Why? As I said many times packed streams are not affected on my system. They are Data streams. Data is not affected. Period.
pandy
15th March 2011, 12:14
This is major problem of this thread - everyone can only say hmmmm.
Anyway, does anyone want samples? Same hi-rez material (a song) presented in 1) LPCM/flac, 2) DTS-MA/mka. Sorry, no public links, PM only.
DAC converting PCM to the electric current - after this there is area for only hmmmm - we have different ears.
roozhou
15th March 2011, 12:53
Everything becomes to PCM before DA convertion. I only want to make it on AVR side. Always. Why? As I said many times packed streams are not affected on my system. They are Data streams. Data is not affected. Period.
Do you mean PCM data will be modified by virus in your AVR?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.