View Full Version : Playing Flac to Multiple Channels
patmann03
8th September 2010, 03:12
I ripped The Lord of the Rings Trilogy recently and decided I wanted to use flac for the audio. On my computer I'm set up through a S/PDIF with the single co-axle cable going to my surround sound. When I encode audio with AC3 and 640 kb/s I get audio played through all 6 channels. However, when playing a movie with an audio encoded with flac, I'm only getting audio out of the left/right and LFE.
I have Classic Media Player set up with the FFDshow audio filter.
I've screwed around with settings within ffdshow, but have been unsuccessful. Mostly because I really have no idea what I'm doing. I have the mixer set up to handle 3/0/2 - 5 Channels with LFE checked. Under output I have all the boxes checked for Pass-through (S/PDIF, HDMI).
My main guess is that my receiver doesn't decode a flac encoded audio file properly or something. The only way I can hear it from all channels is if I check the box for AC3 (S/PDIF encode mode) which I think basically encodes the audio on the fly to AC3 and whatever bitrate I give it (not ideal as I want the lossless audio).
Is there a setting perhaps that I'm just completely missing? Or perhaps a different decoder I need installed (currently using libavcodec).
Any ideas or suggestions anyone has would be much appreciated. I apologize if this is in the wrong thread, but it seemed logical to me.
patmann03
8th September 2010, 03:15
Not sure if this is relevant or not, but the container I'm using for the videos is mkv
Snowknight26
8th September 2010, 05:33
Is there a setting perhaps that I'm just completely missing? Or perhaps a different decoder I need installed (currently using libavcodec).
S/PDIF doesn't have the bandwidth for multi-channel audio unless you reencode it on the fly to AC3.
Ghitulescu
8th September 2010, 07:31
Yes, the coax isn't suitable. However ADAT-compatible optical I/O can transport 8 channels, but it's an expensive solution (on both ends). Equally expensive is the use of 3 identical cards, so one can transport 3x2 signals at a time*; expensive because one needs at least semipro cards (resources and drivers that alow parallel function).
*This was also a workaround to get digital-out from SA-CDs (well, not soundcards but soldered chips).
PS: are the FLAC files multi-channel?
tebasuna51
8th September 2010, 11:01
To play FLAC 5.1 you have two options:
1) The player decode the FLAC file to PCM 5.1 and send multichannel PCM through HDMI conexion to a receiver than accept this.
- Standard SPDIF conexion only support PCM 2.0 (your actual situation)
- You need a receiver than accept PCM multichannel HDMI input.
- At least standalone player Xtreamer can output PCM multichannel, with a PC you need the hard (full HDMI audio compatible) and the soft (maybe ffdshow, read http://forum.doom9.org/showthread.php?t=151151 ) compatible.
2) The player decode the FLAC file to PCM 5.1, make the digital to analog conversión and send the audio to the 6 analog input of a receiver.
- You need a receiver with, at least, 6 channel analog input.
- Standard PC audio cards can add noise (interferences, thermal, ...) to analog output, without a good audio card maybe is better recode to ac3 640 Kb/s and use the SPDIF output.
patmann03
8th September 2010, 12:05
Yes, my flac files are indeed multi-channel.
Audio
Count : 141
Count of stream of this kind : 1
Kind of stream : Audio
Kind of stream : Audio
Stream identifier : 0
ID : 2
ID : 2
UniqueID : 458993544
Format : FLAC
Format/Info : Free Lossless Audio Codec
Format/Url : http://flac.sourceforge.net/
Format_Commercial : FLAC
Codec ID : A_FLAC
Codec ID/Url : http://flac.sourceforge.net
Codec : FLAC
Codec : FLAC
Codec/Family : Flac
Codec/Url : http://flac.sourceforge.net
Duration : 10765760
Duration : 2h 59mn
Duration : 2h 59mn 25s 760ms
Duration : 2h 59mn
Duration : 02:59:25.760
Bit rate mode : VBR
Bit rate mode : Variable
Channel(s) : 6
Channel(s) : 6 channels
Sampling rate : 48000
Sampling rate : 48.0 KHz
SamplingCount : 516756480
Resolution : 16
Resolution : 16 bits
Bit depth : 16
Bit depth : 16 bits
Delay : 0
Delay : 00:00:00.000
Video delay : 0
Video0 delay : 0
Writing library : reference libFLAC 1.2.1 20070917
Writing library : libFLAC 1.2.1 (UTC 2007-09-17)
Writing library/Name : libFLAC
Writing library/Version : 1.2.1
Writing library/Date : UTC 2007-09-17
But it looks like my only solution is to recode to AC3 for the multi-Channel support SPDIF in my case only supports 2.0 for a PCM connection. So basically without paying for better equipment i'm a fish out of the water as far as playing multi-channel uncompressed audio with SPDIF.
How would I go about converting the audio to analog over the SPDIF connection? My receiver has 5.1 or 6 channels.
Hagbard23
8th September 2010, 13:27
in fact, thats paradox.
SPDIF transports digital Data. If it would transport Analog Data, it wouldn't be SPDIF anymore, but a simple analog connection.
So in fact you have to use the A/D Converter of your Soundcard to transport 6 independent channels.
As said before, there are several disadvantages to it. First of all you need a Receiver, which has 6 analog inputs (often called analog 5.1 Input, which consists of 3xStereo Connectors), additionaly you have to have a Soundcard, which has 3x2 Analog outputs (most of the actual soundcards can give you this, even the Realtek chip, if it is soldered with the appropriate Connectors).
But keep in mind:
If you go that way, your bottleneck is the Soundcard of your PC and the following Analog Cable.(worst setup is: Realtek Chip with cheap cables, best setup would be HiQ Soundcard with HiQ Cables)
For "normal" playback you easily can go this way, but transporting a DIGITAL AC3 Stream at 640kbps via SPDIF may be the better solution, if you Audio Equipment lacks.
I personally don't like the SPDIF Concept and go the Analog Way, just as years before.
BTW: Don't you think the 6xPCM via SPDIF is gunning with cannons at birds? I personally do not believe you'll ever in your Life feel a significant loss of quality compared to AC3 640kbps.
But in the end: It's your choice and your money... ;)... If you have the Money, i would firstly recommend to buy a new Sound Equipment and first of that new 4Ohm Based Loudspeakers - THAT would be a quantumjump in Quality - Soundcard and/or Encoding Issues discussed here are nearly not recognizable. I have never met a person who would be able to surely and unseen separate Ac3640 from Raw-Wav Data. Unless you have First Class Audio Equipment, you should throw your Idea away, use Ac3 and try to get lucky with that.
Ghitulescu
8th September 2010, 13:29
As I said it many times, use a standalone for playing media and the PC only for creating it.
tebasuna51
8th September 2010, 13:34
... playing multi-channel uncompressed audio with SPDIF.
Use HDMI for multichannel uncompressed audio (PCM).
How would I go about converting the audio to analog over the SPDIF connection? My receiver has 5.1 or 6 channels.
You can't use SPDIF for analog audio.
You need use 6 different channels (3 stereo jacks in PC and 6 RCA input in receiver, normally)
patmann03
8th September 2010, 13:52
Well I do have an Asus O!Play, which is capable of decoding flac (not sure about 5.1 or not haven't tried it). But it also has an HDMI connector, and I assume that it will transmit the audio. Therefore, I can use the receiver I have currently hooked up to my computer and have the 5.1 PCM audio that way (hopefully). At least for now, I'll just transmit the digital audio with AC3, I doubt I'll personally notice the difference.
Although, I could have sworn when watching a blu-ray movie that I was getting the full 5.1, but my guess is that is because the SPDIF is just allowing the pass-through and not converting it at all and allowing the receiver to do all of the decoding. Do you think that might be what is happening? Again, I really don't know too much about this stuff. I've just recently started getting into it. I feel I've come a long way in about a month.
EDIT: I do have some old logitech 5.1 speakers that have the 3 plugs that I could probably use for analog sound. I just figured the digital would be better. Probably because I know nothing.
Hagbard23
8th September 2010, 14:01
It is right, that the BluRay plays at 5.1 as long as it is coded in Ac3 (which is mostly the case).
I do not know how the things look like, if the BluRay uses DTS, but since the formats are comparable, i think it would go the same way as Ac3.
As said before the Bandwith of SPDIF is the problem - and this particular Bandwith is not sufficient to transport the (HUUUUUGE) 6xPCM Data, BUT it is capable of doing so with Ac3 6Ch (since it uses smaller Bandwith).
One last word: If you want to transport 6xPCM/Wav via your ASUS O!Play, it does matter if it is able to transport 6xPCM via HDMI. It is of secondary interest if the ASUS is able to decode FLAC, because normally this should be done by a Filter inside your Player(software).
TinTime
8th September 2010, 14:07
Although, I could have sworn when watching a blu-ray movie that I was getting the full 5.1, but my guess is that is because the SPDIF is just allowing the pass-through and not converting it at all and allowing the receiver to do all of the decoding. Do you think that might be what is happening?
If you're playing a multichannel FLAC then probably the left and right channels are getting passed over S/PDIF as PCM and your receiver is applying ProLogic processing or similar to those channels.
I suppose that's another option - downmix to ProLogic / Prologic II in ffdshow. I'd stick with AC3 encoding though.
TinTime
8th September 2010, 14:12
As said before the Bandwith of SPDIF is the problem - and this particular Bandwith is not sufficient to transport the (HUUUUUGE) 6xPCM Data, BUT it is capable of doing so with Ac3 6Ch (since it uses smaller Bandwith).
I think it's a standards problem rather than bandwidth. After all you can transport 192kHz, 24 bit stereo over S/PDIF. That's the same as 8 channel, 48kHz, 24 bit.
ramicio
8th September 2010, 15:59
I think people are confusing what you can do with S/PDIF vs. what TOSLINK can now do. S/PDIF is coaxial, and you can't send 24/192 over it. TOSLINK now supports 125 mbit/s. Things were always labeled as coax and the optical both being S/PDIF because no one would ever care or know any better. But HDMI is taking both over anyway because it can do 24/192 at 8 channels, plus video.
I have some questions of my own though. What would I need to transport audio over HDMI? Say I have movies encoded with FLAC tracks and I would also want to be using mplayerc-hc to play these. Do video cards with HDMI just have an audio device driver built in to accept PCM from the bus and just stream it to HDMI then?
Hagbard23
8th September 2010, 16:05
As Far as I Know graphic cards with HDMI Connectors have to be connected to the Soundcard as well, but i am not sure.
I can only talk about my GT9600 Video Card and they (NVidia) say, that you have to connect graphic card and sound card. Maybe there is a software solution too, but i don't know that kind...
But: I am not quite sure about that. It would be helpful to hear other opinions.
Ghitulescu
8th September 2010, 16:19
Yes, but according to the specs, your graka needs S/P-DIF input into the adapter (DVI->HDMI), which returns us back to the initial story ;). I'm not sure about the HDMI add-ons (Blackmagic) whether they can reroute the digital audio to the HDMI, too, or not.
Unless your LOTR is a Bluray that has uncompressed audio, better stick with the original AC-3/DTS track. Or use the standalone to play it.
patmann03
8th September 2010, 17:18
Yes, my LOTR is Bluray. And more than likely 99% of the time I'll be using the Bluray to watch the movie, I just wanted a digital alternative that I wouldn't feel as if I cheated on my wife with a cheap prostitute and ended up with AIDS. Which is why I wanted to go with the FLAC encode. If I can get the full 5.1 from my Asus O!Play than I think I'll be satisfied. If I were to watch it on my PC, than I would just encode on the fly with ffdshow to the AC3 format. Stupid SPDIF! Not being able to handle 5.1 uncompressed audio. What if I use optical instead of Co-axle? I have that option as well.
Ghitulescu
8th September 2010, 17:26
Stupid SPDIF! Not being able to handle 5.1 uncompressed audio. What if I use optical instead of Co-axle? I have that option as well.
Have you read my post?
However ADAT-compatible optical I/O can transport 8 channels, but it's an expensive solution (on both ends). You need a [semi]pro audiocard (these have ADAT I/O) and an ADAT D/A-converter. I'm not sure about hacker solutions such as rerouting 6 channels with a normal audio card (maybe with a false header) and tweak the AVR to understand the optical signal and to play it. Should you manage, let us know.
ramicio
8th September 2010, 17:29
Optical will handle it, but you have to find a device that is updated for the new speed it offers. It may be easier to encode to a format like DTS-HD Master or TrueHD. I think ffdshow does do TrueHD bitstreaming, but it's for HDMI and select hardware. I really don't think there is any hardware out there that expanded to the new TOSLINK standards, at least not for the PC.
patmann03
8th September 2010, 18:06
Have you read my post?
You need a [semi]pro audiocard (these have ADAT I/O) and an ADAT D/A-converter. I'm not sure about hacker solutions such as rerouting 6 channels with a normal audio card (maybe with a false header) and tweak the AVR to understand the optical signal and to play it. Should you manage, let us know.
Sorry, I was a bit confused and didn't think they were quite the same thing. I'll give it a go and see what happens. Most likely if I'm understanding you correctly, the standard one that I have and the receiver I have most likely won't work. But I'll give it a go and see what happens.
patmann03
9th September 2010, 04:14
The optical output I have also acts as a S/PDIF, which is why I didn't catch what you are saying before. It basically seems like there is no difference between my coaxial and optical digital outs. They both can output 2 channel pcm at 96000 hz. So other than the connection method, they appear to work exactly the same, at least with my set up. Again, these are both on-board and not a separate audio card which may make them act differently.
Ghitulescu
9th September 2010, 10:06
S/P-DIF has at least two layers, to simplify, a transport layer and a logical one. It can be carried over coax or glass fiber (those features are set by the transport layer). AFAIK all computers can only output S/P-DIF-formatted signals over coax and optical, which limits them only to 2chn PCM, AC-3 or DTS (as set by the logical layer). To use higher bitrates or more channels, one needs to hack the optical interface (as most modern LEDs are TOSLINK compatible) or to step-up to pro interfaces (like ADAT).
ramicio
9th September 2010, 15:24
They just need to write some new drivers and then the TOSLINK jack can transport whatever they want it to.
Ghitulescu
9th September 2010, 16:05
Exactly, but it needs to be done by someone :)
patmann03
9th September 2010, 19:39
Exactly, but it needs to be done by someone :)
WTB someone to do this :D
I do appreciate all the responses I have received. Now that I have a basic understanding of how this stuff works I know what I can and can't do.
I'm pretty sure my receiver could accept a 5.1 PCM signal, just need something to send it. I 'should' be able to send this signal via HDMI from my asus O!Play, I just haven't had a chance to test it. I'm quite lazy because they are in seperate rooms.
I use my current receiver with my computer because I can switch it between my computer and xbox 360 without having to swap wires like I would have to with my logitech speakers.
Ghitulescu
12th September 2010, 07:01
... like I would have to with my logitech speakers.
If you use the logitech speakers, no matter how good or expensive were/are they, it won't make any difference whether you play FLAC/ WAV or AC-3/DTS/(good) MP3 ;)
To feel/hear a difference (as a normal user) you need an expensive set-up, where the loudspeakers generally should cost the half of the sum since they influence the most the quality of the sound.
So, in your case I'll reconvert them to AC-3 (it's a 2 minutes job) and live happy (until a HW/SW solution would appear, maybe in the form of a dedicated mediaplayer).
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.