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 8th September 2010, 03:12   #1  |  Link
patmann03
Registered User
 
Join Date: Aug 2010
Posts: 15
Playing Flac to Multiple Channels

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 is offline   Reply With Quote
Old 8th September 2010, 03:15   #2  |  Link
patmann03
Registered User
 
Join Date: Aug 2010
Posts: 15
Not sure if this is relevant or not, but the container I'm using for the videos is mkv
patmann03 is offline   Reply With Quote
Old 8th September 2010, 05:33   #3  |  Link
Snowknight26
Registered User
 
Join Date: Aug 2007
Posts: 1,430
Quote:
Originally Posted by patmann03 View Post
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.
Snowknight26 is offline   Reply With Quote
Old 8th September 2010, 07:31   #4  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,769
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?
Ghitulescu is offline   Reply With Quote
Old 8th September 2010, 11:01   #5  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
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.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 8th September 2010, 12:05   #6  |  Link
patmann03
Registered User
 
Join Date: Aug 2010
Posts: 15
Yes, my flac files are indeed multi-channel.
Code:
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.
patmann03 is offline   Reply With Quote
Old 8th September 2010, 13:27   #7  |  Link
Hagbard23
23sKiDdOo!
 
Hagbard23's Avatar
 
Join Date: May 2010
Location: Germany
Posts: 182
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.

Last edited by Hagbard23; 8th September 2010 at 13:34.
Hagbard23 is offline   Reply With Quote
Old 8th September 2010, 13:29   #8  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,769
As I said it many times, use a standalone for playing media and the PC only for creating it.
Ghitulescu is offline   Reply With Quote
Old 8th September 2010, 13:34   #9  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by patmann03 View Post
... playing multi-channel uncompressed audio with SPDIF.
Use HDMI for multichannel uncompressed audio (PCM).

Quote:
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)
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 8th September 2010, 13:52   #10  |  Link
patmann03
Registered User
 
Join Date: Aug 2010
Posts: 15
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.

Last edited by patmann03; 8th September 2010 at 13:54.
patmann03 is offline   Reply With Quote
Old 8th September 2010, 14:01   #11  |  Link
Hagbard23
23sKiDdOo!
 
Hagbard23's Avatar
 
Join Date: May 2010
Location: Germany
Posts: 182
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).
Hagbard23 is offline   Reply With Quote
Old 8th September 2010, 14:07   #12  |  Link
TinTime
Registered User
 
Join Date: Jan 2009
Location: UK
Posts: 403
Quote:
Originally Posted by patmann03 View Post
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 is offline   Reply With Quote
Old 8th September 2010, 14:12   #13  |  Link
TinTime
Registered User
 
Join Date: Jan 2009
Location: UK
Posts: 403
Quote:
Originally Posted by Hagbard23 View Post
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.
TinTime is offline   Reply With Quote
Old 8th September 2010, 15:59   #14  |  Link
ramicio
Banned
 
Join Date: Mar 2004
Location: PA, US
Posts: 683
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?
ramicio is offline   Reply With Quote
Old 8th September 2010, 16:05   #15  |  Link
Hagbard23
23sKiDdOo!
 
Hagbard23's Avatar
 
Join Date: May 2010
Location: Germany
Posts: 182
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.
Hagbard23 is offline   Reply With Quote
Old 8th September 2010, 16:19   #16  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,769
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.
Ghitulescu is offline   Reply With Quote
Old 8th September 2010, 17:18   #17  |  Link
patmann03
Registered User
 
Join Date: Aug 2010
Posts: 15
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.
patmann03 is offline   Reply With Quote
Old 8th September 2010, 17:26   #18  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,769
Quote:
Originally Posted by patmann03 View Post
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?

Quote:
Originally Posted by Ghitulescu View 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.
Ghitulescu is offline   Reply With Quote
Old 8th September 2010, 17:29   #19  |  Link
ramicio
Banned
 
Join Date: Mar 2004
Location: PA, US
Posts: 683
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.
ramicio is offline   Reply With Quote
Old 8th September 2010, 18:06   #20  |  Link
patmann03
Registered User
 
Join Date: Aug 2010
Posts: 15
Quote:
Originally Posted by Ghitulescu View Post
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 is offline   Reply With Quote
Reply

Tags
flac 5.1


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 05:23.


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