Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Multichannel LPCM audio playback (Read 28884 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Multichannel LPCM audio playback

Can someone suggest soft audio or media player that can directly play 5.1 LPCM audio? Pls don't tell that any player can, because in my experience NONE can. What plugins should I use to enable Foobar2000 play 5.1 LPCM?

Also, what utility can show media info data of a multichannel LPCM file? I tried MediaInfo and Gspot - they can't show any info about LPCM file.

What Media Server can transcode 5.1 Flac to 5.1 LPCM, and stream it to a Samsung BD Player over LAN?

Multichannel LPCM audio playback

Reply #1
I've never had a problem playing multichannel (5.1) .WAVs in foobar2000. I'm guessing that the file you have isn't a "normal" 5.1 PCM file. Maybe it's corrupted somehow?

Also ... if this file happens to be from a DVD-Audio disc, be aware that the "LPCM" on DVD-As isn't raw PCM, it's actually compressed and encrypted with a lossless codec known as MLP. However, decrypting/uncompressing the MLP audio is illegal in many places, and is against the rules to discuss on HydrogenAudio.

I don't have experience with Blu-ray or other next-gen formats, but they all use encryption schemes, so that files you'd grab directly off the disc wouldn't be playable as-is, without decrypting first.

Multichannel LPCM audio playback

Reply #2
foobar2000 can indeed play 5.1 audio. That's what I'm using to play 5.1 FLAC files. It should work with DirectSound, but I would recommend the WASAPI plugin if you have at least Windows Vista. It also depends on what playback device you select and your soundcard's capabilities.

For me it only works with Speakers as playback device. S/PDIF is limited to 2 channels, but depending on the specific sound card it is possible to use it for 5.1 (it needs S/PDIF to be internally HDMI). If your S/PDIF goes out through coax or toslink, then it's not possible to use it like that at all.

As a matter of fact, I'm trying to push the WASAPI plugin to be changed in such a way that it will be possible to use my sound card (Xonar HDAV1.3) to do multichannel pass-through. What sound card do you have? What error do you get when trying to play the file?

Multichannel LPCM audio playback

Reply #3
S/PDIF is limited to 2 channels, but ...

That's not quite accurate.  S/PDIF has bandwidth that is insufficient to carry uncompressed 5.1, but DTS will provide compressed 5.1 over S/PDIF.

Normally, HDMI is a safer choice for 5.1 sound.

Multichannel LPCM audio playback

Reply #4
foobar2000 can indeed play 5.1 audio. That's what I'm using to play 5.1 FLAC files. It should work with DirectSound, but I would recommend the WASAPI plugin if you have at least Windows Vista. It also depends on what playback device you select and your soundcard's capabilities.

For me it only works with Speakers as playback device. S/PDIF is limited to 2 channels, but depending on the specific sound card it is possible to use it for 5.1 (it needs S/PDIF to be internally HDMI). If your S/PDIF goes out through coax or toslink, then it's not possible to use it like that at all.

As a matter of fact, I'm trying to push the WASAPI plugin to be changed in such a way that it will be possible to use my sound card (Xonar HDAV1.3) to do multichannel pass-through. What sound card do you have? What error do you get when trying to play the file?

AFAIK WASAPI exclusive can't bypass the Xonar's driver/mixer/resampler. I don't see how the fb2k developers could fix that. I used to have that card back when it was actually a bit useful (before the release of bitstreaming "HD" lossless capable GPUs), but it had too many limitations even then (like bitstreaming only with one proprietary player), and I got fed up and returned it. WASAPI exclusive didn't work either, so its one advantage, auto-switching channels over an HDMI connection, didn't work. Since the release of the ATI 5000 cards and bitstreaming equivalents form NV and Intel, and also the ability to decode DTS-HD into e.g. the ATI 4000 series and NV and Intel equivalents (multi-ch LPCM but no bitstreaming) was developed, this and the Auzen card are not of much value anymore, and more of a hindrance.

In any case, WASAPI exclusive is not the OP's problem, but there's also not much advantage unless you're using HDMI output into a multichannel receiver. In fact, I'd prefer to use DirectSound with an auto-channel switcher instead of having to use exclusive mode, like it could be done for a while with the ATI 4000 and some older Realtek drivers for it, with Reclock.

Multichannel LPCM audio playback

Reply #5
That's not quite accurate.  S/PDIF has bandwidth that is insufficient to carry uncompressed 5.1, but DTS will provide compressed 5.1 over S/PDIF.

Normally, HDMI is a safer choice for 5.1 sound.


The S/PDIF in my soundcard that goes out of coax and into the A/V receiver can carry 2.0 at 192 kHz. I just tested it, and it indeed works (receiver displays receiving stereo signal at 192 kHz and sound comes out of the speakers with no stuttering or anything). That means S/PDIF, at least in some hardware implementations, should be able to carry 4.0 at 96 kHz or 8.0 at 48 kHz if it's capable of 2.0 at 192 kHz in terms of available bandwidth. However, sending less channels at higher sampling will probably reduce overhead a little.

By checking information of the S/PDIF specification (http://www.hardwarebook.info/S/PDIF), 2.0 at 48 kHz is the maximum supported in uncompressed form (with a bit rate of roughly 3 Mbps), which means my soundcard and A/V receiver are nuts, but they like each other anyway.

S/PDIF comformant implementations, just as you said, do not have the bandwidth for anything beyond 2.0 (22.5 kHz is not an option here), neither is it possible to specify in the transmitted block that more than 2 channels exist (even if bandwidth allowed for it).

In short, and ignoring esoteric hardware implementations, bandwidth and block specification are the reasons 2.0 cannot carry uncompressed 5.1, or even 4.0.

Multichannel LPCM audio playback

Reply #6
Quote
The S/PDIF in my soundcard that goes out of coax and into the A/V receiver can carry 2.0 at 192 kHz. I just tested it, and it indeed works (receiver displays receiving stereo signal at 192 kHz and sound comes out of the speakers with no stuttering or anything). That means S/PDIF, at least in some hardware implementations, should be able to carry 4.0 at 96 kHz or 8.0 at 48 kHz if it's capable of 2.0 at 192 kHz in terms of available bandwidth. However, sending less channels at higher sampling will probably reduce overhead a little.

Make sure it isn't sending a 2.0 DTS or a 2.0 Dolby Digital stream.

ADAT can carry 8 uncompressed channels at 24 bit, 48Khz using exactly the same optical cable that S/PDIF uses. ADAT isn't very common in consumer products, but I have seen a few onboard soundcards supporting ADAT a few years back.

HDMI is the best option to send uncompressed 5.1 audio to a A/V receiver, but make sure that the A/V receiver sends back the correct EDID. If it is incorrect then Windows will not pick up that it supports 5.1 uncompressed audio through HDMI.
There are ways to override the EDID.

Multichannel LPCM audio playback

Reply #7
The S/PDIF in my soundcard that goes out of coax and into the A/V receiver can carry 2.0 at 192 kHz. I just tested it, and it indeed works (receiver displays receiving stereo signal at 192 kHz and sound comes out of the speakers with no stuttering or anything). That means S/PDIF, at least in some hardware implementations, should be able to carry 4.0 at 96 kHz or 8.0 at 48 kHz if it's capable of 2.0 at 192 kHz in terms of available bandwidth. However, sending less channels at higher sampling will probably reduce overhead a little.


I can't find any information anywhere that says S/P-DIF allows anything more than 48KHz. Some will allow 24-bits but more often than not the last 4 bits are ignored. I very much doubt it's uncompressed LPCM.

Multichannel LPCM audio playback

Reply #8
SPDIF can carry 96kHz (tried myself over optical) and I think also 192kHz, what it can't is multichannel uncompressed. Ceniza's situation is baffling to me (there's another thread discussing it).

Multichannel LPCM audio playback

Reply #9
I can't find any information anywhere that says S/P-DIF allows anything more than 48KHz. Some will allow 24-bits but more often than not the last 4 bits are ignored. I very much doubt it's uncompressed LPCM.


SPDIF commonly transfers stereo 192/24 in PCM bitperfectly and receivers support this mode.

Multiple channels cannot be transferred since the SPDIF format allows only two channels (I think it is two channels exactly)

Multichannel LPCM audio playback

Reply #10
I can't find any information anywhere that says S/P-DIF allows anything more than 48KHz. Some will allow 24-bits but more often than not the last 4 bits are ignored. I very much doubt it's uncompressed LPCM.


SPDIF commonly transfers stereo 192/24 in PCM bitperfectly and receivers support this mode.

Multiple channels cannot be transferred since the SPDIF format allows only two channels (I think it is two channels exactly)


Can you point me at some references please?

Multichannel LPCM audio playback

Reply #11
I can't find any information anywhere that says S/P-DIF allows anything more than 48KHz. Some will allow 24-bits but more often than not the last 4 bits are ignored. I very much doubt it's uncompressed LPCM.


SPDIF commonly transfers stereo 192/24 in PCM bitperfectly and receivers support this mode.

Multiple channels cannot be transferred since the SPDIF format allows only two channels (I think it is two channels exactly)


Can you point me at some references please?


Many AV receivers as well as standalone DACs support 192/24 over coax.

For testing - get any decent 192/24 soundcard with spdif input (e.g. envy24-based), another with 192/24 spdif output and test a loopback for bit-perfection. That is how I test soundcard drivers in linux.

The spdif preamble will not carry information about the current rate (there is no code for 192kHz, iirc), but the chain will work fine and decent SPDIF receivers detect incoming rate by comparing to independent clock anyways.

Multichannel LPCM audio playback

Reply #12
Can you point me at some references please?


At least for the 2 channels limitation you can check http://www.hardwarebook.info/S/PDIF, or even Wikipedia (there seems to be a setting for 4 channels, but it belongs to another specification S/PDIF is based on [AES3]).

As for higher bitrates, it just works, although it is not part of the specification. Even in Windows I can choose 2.0 at 192 kHz for S/PDIF, and the test works properly.

Multichannel LPCM audio playback

Reply #13
I've never had a problem playing multichannel (5.1) .WAVs in foobar2000. I'm guessing that the file you have isn't a "normal" 5.1 PCM file. Maybe it's corrupted somehow?

WAV file is MS implementation of LPCM uncompressed audio, which includes a header. Raw LPCM doesn't have such header, hence the question of this thread that was almost forgotten by SPDIF talk: what audio player can play raw multichannel LPCM? Ideally, it would also need to stream it over LAN to a BD Player for playback via connected to it A/V Receiver using 7.1 RSA Analog or HDMI Out of the player.

Multichannel LPCM audio playback

Reply #14
How can a player find samplerate and number of channels to play these headerless raw data?

Multichannel LPCM audio playback

Reply #15
I've never had a problem playing multichannel (5.1) .WAVs in foobar2000.


If you mean by S/PDIF, I'm guessing your 5.1 wavs are lossy.  (e.g. dts .wav or ac3 .wav -- lossy data in a .wav wrapper).  I have never heard of lossless 5.1 audio (at  44/16 or higher rates) being transmittable by S/PDIF.

HDMI would work for lossless 5.1, though, as long as the soundcard mfr hasn't 'crippled' it to 2.0 channel maximum.





Multichannel LPCM audio playback

Reply #16
Nope, I don't mean by S/PDIF - I've never used it or mentioned it in this topic. Just using the analog 6-channel output (3x 3.5mm jacks) on my sound card.

In any case the OP's replied ... it seems he's looking for a player that can interpret raw PCM (as in, without a WAV header). I know of applications that can do it for stereo files. When you try to import a file without a header, it will ask you for the bit-depth, sample rate, and # of channels ... However the apps I've just tested (GoldWave and Adobe Audition 3.0) only give "mono" or "stereo" as options for # of channels.

I really expected Audition to be able to do this. Version 3.0 is already 5 years old, perhaps a newer version supports multichannel? Someone else is gonna have to take it from here...

Is it possible that you could just insert a WAV header at the beginning of the file? Like, generate a .WAV with the desired attributes then just copy+paste the header? I don't know enough about how the format works internally to say if it's possible or not.

Multichannel LPCM audio playback

Reply #17
Audacity allows to import multichannel raw files, and if imported with correct manually entered parameters, it will play fine most such files. I also know of some video players like VLC and Daum PotPlayer that claim to play multichannel LPCM - possibly only when muxed with video, assuming such mux carries some info about audio. It looks like an impossible task to find such an audio player. Of course, one can transcode LPCM to WAV, but the task was to stream LPCM from an audio player to a BD Player connected to an A/V Receiver for playback. And supported by streaming content renderers DLNA protocol only supports lossless LPCM, I should say only its .l16 44100\16\2 variety.

Multichannel LPCM audio playback

Reply #18
Audacity allows to import multichannel raw files, and if imported with correct manually entered parameters, it will play fine most such files. I also know of some video players like VLC and Daum PotPlayer that claim to play multichannel LPCM - possibly only when muxed with video, assuming such mux carries some info about audio. It looks like an impossible task to find such an audio player. Of course, one can transcode LPCM to WAV, but the task was to stream LPCM from an audio player to a BD Player connected to an A/V Receiver for playback. And supported by streaming content renderers DLNA protocol only supports lossless LPCM, I should say only its .l16 44100\16\2 variety.


Converting lpcm to anything is simple (e.g. using sox in command line), but what streams does your BD player accept? Why do you need the BD in the middle at all? Cannot you output from your PC to the AVR directly?

Multichannel LPCM audio playback

Reply #19
I also know of some video players like VLC and Daum PotPlayer that claim to play multichannel LPCM - possibly only when muxed with video, assuming such mux carries some info about audio.

And many audio players can play multichannel LPCM if it is "muxed" into WAV, MKA, FLAC etc.

Of course, one can transcode LPCM to WAV, but the task was to stream LPCM from an audio player to a BD Player connected to an A/V Receiver for playback.

A player should be able to read WAV/FLAC/MP3/... files, decode, and send LPCM stream to your BD player. LPCM files are useless and unnecessary for your task.

Multichannel LPCM audio playback

Reply #20
I also know of some video players like VLC and Daum PotPlayer that claim to play multichannel LPCM - possibly only when muxed with video, assuming such mux carries some info about audio.

And many audio players can play multichannel LPCM if it is "muxed" into WAV, MKA, FLAC etc.

Of course, one can transcode LPCM to WAV, but the task was to stream LPCM from an audio player to a BD Player connected to an A/V Receiver for playback.

A player should be able to read WAV/FLAC/MP3/... files, decode, and send LPCM stream to your BD player. LPCM files are useless and unnecessary for your task.


I've just spent a long time trying to get Mediatomb to transcode FLAC to a format that VLC, Foobar2000 and my Android phone can understand, and I can tell you this: Foobar2000 accepts LPCM with a mimetype of "audio/L16", which as far as I'm aware means 16-bit LPCM (44.1Khz is implied by the standard I think). VLC doesn't take it. VLC does, however, accept an LPCM stream if it's simply given the mimetype of "audio/wav", whereas Foobar doesn't like it when you do that and refuses to play ball. Both Foobar and my phone (Desire S) were perfectly happy for the LPCM stream to have a mimetype of "audio/L16", but seeking didn't work (as is to be expected when transcoding). Here's the interesting thing: when I fooled VLC by using the "audio/wav" mimetype both VLC and my phone were able to seek back and forth in the buffered part of the file.

I don't know exactly what information goes into the WAV header, but if the byte order is correct (the RIFF standard is big-endian is it not? WAV is a little-endian format, I know that) then there should be nothing stopping the BD player from accepting the stream apart from the wrapper. I also don't know how much information Mediatomb supplies with the stream based on the mimetype.

Quote
Also, what utility can show media info data of a multichannel LPCM file?


This is an interesting one, as an LPCM file can't contain such information. However, my phone now has a (UPnP) media library full of files that are neatly tagged and yet are ostensibly 44.1Khz WAVs. I'm pretty sure VLC couldn't manage that, but Mediatomb does it.

So: as far as the OP's question goes (assuming he's still struggling three months down the line), I'd suggest Mediatombe. All the stream parameters can be changed with xml and a few command line options to flac and ffmpeg. I've had it transcoding stereo FLAC into various formats and being picked up by Foobar, VLC and my phone (but unfortunately not all three simultaneously because Foobar doesn't like being lied to about mimetype and VLC can't handle the raw, headerless truth). I haven't tried with 5.1, but I don't have a 5.1 system 

Also, has the OP tried streaming from VLC with the RAW encapsulation? I think if he were to stream a WAV with no header (that's what RAW does, right?) then that would essentially be L16.
If I've written something blindingly stupid please be nice - this is just my understanding from trial and error.

Multichannel LPCM audio playback

Reply #21
I also know of some video players like VLC and Daum PotPlayer that claim to play multichannel LPCM - possibly only when muxed with video, assuming such mux carries some info about audio.

And many audio players can play multichannel LPCM if it is "muxed" into WAV, MKA, FLAC etc.


Agreed.

This seems to be a good resource:

Multichannel .wav file examples

Multichannel LPCM audio playback

Reply #22
I've just spent a long time trying to get Mediatomb to transcode FLAC to a format that VLC, Foobar2000 and my Android phone can understand, and I can tell you this: Foobar2000 accepts LPCM with a mimetype of "audio/L16", which as far as I'm aware means 16-bit LPCM (44.1Khz is implied by the standard I think). VLC doesn't take it. VLC does, however, accept an LPCM stream if it's simply given the mimetype of "audio/wav", whereas Foobar doesn't like it when you do that and refuses to play ball. Both Foobar and my phone (Desire S) were perfectly happy for the LPCM stream to have a mimetype of "audio/L16", but seeking didn't work (as is to be expected when transcoding). Here's the interesting thing: when I fooled VLC by using the "audio/wav" mimetype both VLC and my phone were able to seek back and forth in the buffered part of the file.


I have dozens of multichannel MLPCM and LPCM audio files that I've ripped from my DVD-A collection as multichannel .wav (using either DVD Audio Extractor or DVDA Extractor), and converted to FLAC.  Foobar2000 has no problem playing them via HDMI + WASAPI.  I've never had to check the mimetype.  Most are 48kHz or higher SR, 24 bit format, and retain that format identification when examined in foobar Properties or in Audition.

Multichannel LPCM audio playback

Reply #23
I'm upping this old topic with a suggestion and a question:

I've tried many players and I believe the only one that plays 6/8-channel files correctly is the Sony SoundForge. Yes, it's not exactly a player, however you can see that it opens a multichannel (FLAC/WAV/PCM) file and plays it correctly - the sound card's control panel shows that the card itself receives different signal on all 8 channels.

The thing is - SoundForge plays only audio files, it doesn't have a playlist, because it's not made to be a player, but an editor and also it doesn't open/play video files. Also it does not passthrough the currently played 8-channel content to the receiver in a recognizable (by the receiver) format. So if I use the sound card's analog outputs, it will work, but not through a HDMI connection . I have some videos in MKV format with 6 or 8-channel FLAC in them and I'm unable to find a player with which to play them on my system in such a way that the receiver recognize them correctly and get 8-channels instead of 2. The system is a PC with a GTX780 connected with a HDMI cable to a receiver Denon AVR-4520, also I have an Auzentech X-Fi HTHD on the same PC, connected to the same receiver with an optical S/PDIF cable.

So for 2-channel FLAC playback I prefer to use the S/PDIF, but I also need to be able to play multichannel FLACs integrated into video files and I can't find the right software for this.

Any suggestions and ideas will be appreciated. Thank you in advance.

Multichannel LPCM audio playback

Reply #24
I just got the answer on another forum. I'll share it here for future reference:

The Media Player Classic Black Edition supports the Windows WASAPI interface (Windows Vista and up) and plays multichannel files correctly (through HDMI output) either with or without video track attached to them.