Page 1 of 1

VLC AC3 SPDIF Output

Posted: 03 Apr 2008 13:30
by mclane8
Hello the last time I successfully heard ac3 Out via SP DIF from an DVD was in Version VLC 0.8.1 In all versions above sound is active but not understandable

I am using win Xp Sr2 and I am quite sure that I tested all the upcoming versions of Vlc (really like it very much) today I checked vlc-0.8.6f-win32.exe

My sound card is a terratec sixpack 5.1 and my dolby digital receiver a harman kardon avr 4000 connected via optical TOS Link cable.

Does anyone have an idea or what is changed here since version 0.8.1?? :cry:

kind regards
Alex

Re: VLC AC3 SPDIF Output

Posted: 03 Apr 2008 15:13
by VLC_help
Nobody is sure what happenet but there has been some fixes on nightly builds. If setting output to waveout doesn't help then you have to wait for upcoming versions.

Re: VLC AC3 SPDIF Output

Posted: 03 Apr 2008 15:44
by mclane8
You were really right if I change the audiooutputmodule from standard to waveout it works fine :D -just whats the difference between the 2 modules?? until now I thought there won´t be any differnce?

But thank you for this workround

kind regards
Alex

Re: VLC AC3 SPDIF Output

Posted: 07 Apr 2008 19:19
by ZkilfinG
Edit: Sorry, seems this is a known issue discussed in this thread: viewtopic.php?f=14&t=45593&p=144192&hilit=pdif#p144192
I thought it was an unrelated issue when I first checked the thread, sorry for that, but perhaps this helps devs somewhat anyway.

---

I have a similar issue, and changing to waveoutput did help me as so far that instead of uncomprehensible laggy sound I now have choppy sound :P

I've been using VLC for a couple of years and it's worked great. Now I have built a new computer though, and something isn't working like it used to. It could be some setting which I did on my old system which I've now forgotten about (I know I had some issues when setting everything up back then, but I think it was something silly simple like not using S/PDIF at all). Anyway, the things that have changed are these:

* New soundcard (Realtek HD Audio integrated on Asus P5K Pro)
* New optical cable, RCA instead of TOS Link (due to different sound card)
* Vista instead of XP

This works:
* Stereo sound
* Realtek test audio (DTS, DD, WMA) all output true surrund which the reciever identifies correctly

I haven't installed any strange codecs except for AC3Filter which didn't help (is it used at all by VLC? if not I can exclude this from my troubbleshooting leaving me one less thing to worry about). I haven't gotting it working in any other player (have only tried WMP and it didn't have the codecs it needed).

wave log:

main debug: control type=1
a52 debug: emulated sync word (no sync on following frame)
main warning: computed PTS is out of range (1429000), clearing out
main warning: PTS is out of range (1429000), dropping buffer
main warning: output PTS is out of range (1429000), clearing out
main debug: audio output is starving (278000), playing silence
main debug: control type=1

Standard log:

main debug: control type=1
a52 debug: emulated sync word (no sync on following frame)
main warning: computed PTS is out of range (2710000), clearing out
main warning: PTS is out of range (2710000), dropping buffer
main warning: output PTS is out of range (2710000), clearing out
main debug: audio output is starving (202084), playing silence
main debug: audio output is too slow (-242000), trashing 32000us
main debug: audio output is too slow (-306000), trashing 32000us
main debug: audio output is too slow (-151000), trashing 32000us
main debug: audio output is too slow (-183000), trashing 32000us
main debug: audio output is too slow (-215000), trashing 32000us
main debug: audio output is too slow (-247000), trashing 32000us
main debug: audio output is too slow (-279000), trashing 32000us
main debug: audio output is too slow (452000), trashing 32000us
main debug: audio output is too slow (420000), trashing 32000us
main debug: audio output is too slow (388000), trashing 32000us
main debug: audio output is too slow (356000), trashing 32000us
main debug: audio output is too slow (324000), trashing 32000us
main debug: audio output is too slow (292000), trashing 32000us
main debug: audio output is too slow (260000), trashing 32000us
main debug: audio output is too slow (228000), trashing 32000us
main debug: audio output is too slow (196000), trashing 32000us
main debug: audio output is too slow (164000), trashing 32000us
main debug: audio output is too slow (132000), trashing 32000us
main debug: audio output is too slow (100000), trashing 32000us
main debug: audio output is too slow (68000), trashing 32000us
main debug: audio output is too slow (4000), trashing 32000us
main debug: audio output is too slow (-92000), trashing 32000us
main debug: audio output is too slow (-156000), trashing 32000us
main debug: audio output is too slow (-252000), trashing 32000us
main debug: audio output is too slow (-144000), trashing 32000us
main debug: audio output is too slow (-176000), trashing 32000us
main debug: audio output is too slow (-208000), trashing 32000us
main debug: audio output is too slow (-240000), trashing 32000us
main debug: audio output is too slow (-272000), trashing 32000us
main debug: audio output is too slow (-304000), trashing 32000us
main debug: audio output is too slow (-164000), trashing 32000us
main debug: audio output is too slow (-196000), trashing 32000us
main debug: audio output is too slow (-228000), trashing 32000us
main debug: audio output is too slow (-260000), trashing 32000us
main debug: audio output is too slow (-292000), trashing 32000us
main debug: control type=1
main debug: audio output is too slow (49000), trashing 32000us
main debug: audio output is too slow (-47000), trashing 32000us
main debug: audio output is too slow (-143000), trashing 32000us
main debug: audio output is too slow (-207000), trashing 32000us
main debug: audio output is too slow (-303000), trashing 32000us

wave with "Use 32-bit float" unticked:

main debug: control type=1
a52 debug: emulated sync word (no sync on following frame)
main warning: computed PTS is out of range (2326000), clearing out
main warning: PTS is out of range (2326000), dropping buffer
main warning: output PTS is out of range (2326000), clearing out
main debug: audio output is starving (320000), playing silence
main error: picture 014EFFF8 refcount is -1
main warning: late picture skipped (17000)

Re: VLC AC3 SPDIF Output

Posted: 08 Apr 2008 18:17
by VLC_help
ZkilfinG: you tried nightly builds? AC3filter doesn't work with VLC, nor any other filters because VLC only uses build-in filters.

Re: VLC AC3 SPDIF Output

Posted: 08 Apr 2008 20:06
by ZkilfinG
Not yet, but I think I will. I suspected it wouldn't work, at least it's one less source to troubleshoot which is nice :-)

Re: VLC AC3 SPDIF Output

Posted: 08 Apr 2008 20:52
by ZkilfinG
In the latest nightly build I have the same issue with Standard output. With wave it works fine, but the signal is stereo and not surround as it should be. However I noticed it seems to be dependent on the source material. I got it working with a THX-test DVD (which I had a copy of in mounted .iso format). But not with the AC3 coded .avi or the .mkv files I've tried.

Re: VLC AC3 SPDIF Output

Posted: 09 Apr 2008 16:42
by VLC_help
Did you choose SPDIF out from VLC when using Waveout?
Image

Re: VLC AC3 SPDIF Output

Posted: 09 Apr 2008 22:47
by ZkilfinG
I either missed that, or the source I was testing with was only encoded in stereo even for S/PDIF. I've gotten it working now with vlc-0.9.0-git-20080403-0909 and waveout. Thanks a lot for the help, and you devs keep the great work going! (and get a stable release out please :P )

Re: VLC AC3 & DTS SPDIF Output

Posted: 16 Mar 2010 18:42
by jeroensky
Hello all.
I discovered that i won't get ac3 or dts 5.1 output over sp/dif. With VLC 1.0.5 Goldeneye.
The Soundblaster Audigy is configured ok(powerdvd does it good, but will cut audio if i move video to 2nd display).
VLC only send pcm stereo over sp/dif to 5.1 amplifier.
Is their a solution?
I use default vlc settings.

Got it working (my amp shows that it gets Dolby Digital or DTS signal from sp-dif computer/vlc).

I changed audio preferences:
-output type : win32 waveout
-force detection of dolby surround : off
-use s/p dif when available.

Re: VLC AC3 SPDIF Output

Posted: 17 Mar 2010 06:44
by Gurudristi
with your above configuration..is the sound output stable or are you still getting any static/stuttering / choppy audio? If yes, then you might need to change some settings on the stream output > sout stream settings.

let me know since i also had a similar problem..

Re: VLC AC3 SPDIF Output

Posted: 20 Mar 2010 11:55
by jeroensky
Sorry for late reply.
With this settings:
-output type : win32 waveout
-force detection of dolby surround : off
-use s/p dif when available.

It's perfect.
But only with the win32 waveout selection. (restart vlc after making these settings, before you start playing)
I use it with Soundblaster Audigy Platinum EX, with sp/dif out -at 96KHz samplerate-, and amplifier decodes the Dolby Digital.(on illegal winxp-because display monotor 1 isn't supported under Linux/out of sync-)
Oh by the way, if you're a soundblaster user under windows. It's tricky to update sb software. (in my case updated software told me it has no soundcard!). Solution is when using (support) creative online autoupdate: First update drivers only(!), then reboot, and after that update applications. So don't do what creative update wants, update drivers and apps at once!

Re: VLC AC3 SPDIF Output

Posted: 31 Mar 2010 03:13
by Geoff
> with your above configuration..is the sound output stable or are you still getting any static/stuttering / choppy audio?
> If yes, then you might need to change some settings on the stream output > sout stream settings.
>
> let me know since i also had a similar problem..

Please speak the magic settings...

Am using:

-output type : win32 waveout
-force detection of dolby surround : off
-use s/p dif when available.

which *almost* works - but the audio keeps dropping out. Without "win32 waveout" I'd get this weird
repetition pattern (like it would repeat a .5 second sound 10 times, then a new one 10 times, etc....)

Running any player that allows ac3filter, spdif passthru works great, but no other player decodes the
video as well, or else handles subtitles in .mkv's properly.

VLC works so great in all things except AC3 passthru :(

I get the same effects whether I use the onboard (Gigabyte P35) spdif output or my Soundblaster Audigy.

Geoff

Re: VLC AC3 SPDIF Output

Posted: 01 Apr 2010 16:46
by Gurudristi
Dear Geoff,
Try to use the following Sout >>out settings

-output type : win32 waveout
-force detection of dolby surround : on
-use s/p dif when available.

Tools>Preferences>all>stream output> Soutstream>transcode>
In Audio
Tick mark:
DTS Coherent Acoustic audio Decoder,
ATSC A/52(AC-3) audio decoder

Save the settings, close VLC player and then try...This worked for me. Do let me know if it does for you.

Re: VLC AC3 SPDIF Output

Posted: 17 May 2010 19:46
by soyuppy
I have the same problem that Geoff described. I have the latest 1.0.5 installed on WinXP SP3. Audio come out and processor is detecting and decoding the proper codec. But every 10 min or the stutter/choppy audio kick in. Each time when that happen I have to go to audio menu and re-select the A52 over SPDIF option...sort of like resetting, then it go back to normal for a while.
My MB use the Realtek HD Audio driver while my external card is RME HDSP.

Re: VLC AC3 SPDIF Output

Posted: 18 May 2010 00:08
by Jean-Baptiste Kempf
Try 1.1.0

Re: VLC AC3 SPDIF Output

Posted: 18 May 2010 13:30
by mrosche
Hi,

Tried the latest 1.1.0 rc for SPDIF out of AC3/DTS and when loading from the command line using "--spdif" as described in the help output, I receive and error window with the following message (5 different machines with 5 different sound cards, all with SPDIF output):
---------------------------------------------------------------------------------------------------------
Assertion failed!

Program: C:\Program Files\VideoLAN\VLC\vlc.exe
File: misc/variables.c
Line: 826

Expression: expected_type == 0 || (p_var->i_type & VLC_VAR_CLASS) == expected type

For more information...bla, bla, bla....


---------------------------------------------------------------------------------------------------------

This also happens in my "home brewed" IPTV client where I am using libvlc.

I noticed in the vlcrc file that when activating spdif, the entry is saved under "spdif=1" but when trying to load from the command line in this manner (i.e. vlc.exe --spdif=1), the prompt says that the command line option is not valid.

Any help solving this issue would be greatly appreciated.

Cheers!!!!

Re: VLC AC3 SPDIF Output

Posted: 18 May 2010 13:55
by mrosche
Hi again,

Also, another update to my previous post....it seems that other command-line options generate the same Assertion error...I have tried various options as described in the vlc_help.txt file and it looks like there is a discrepancy in how 1.1.0 loads the options....in the vlc_help.txt file an options is listed, for example --no-dts-dynrng, as a command line option, but the vlcrc file shows dts-dynrng=0 as the config option....when loading an option according to the vlc_help.txt file, the assertion error is generated...when loading according to the vlcrc syntax, the invalid command line option error is generated.....

Should I open a bug ticket?

This is reproducible in many cases.....

Cheers!!!!

Mark

Re: VLC AC3 SPDIF Output

Posted: 18 May 2010 16:49
by Jean-Baptiste Kempf
Yes, you should.

Re: VLC AC3 SPDIF Output

Posted: 18 May 2010 17:49
by VLC_help
I can also open ticket, if you don't want to do it by yourself.

Re: VLC AC3 SPDIF Output

Posted: 18 May 2010 23:36
by mrosche
HI,

I have registered for a trac account and will open a ticket for this issue (among others) tomorrow...

Thanks for your support!!!!

Cheers!!!

Mark :)

Re: VLC AC3 SPDIF Output

Posted: 19 May 2010 11:34
by mrosche
Hi,

Issue #3646 has been opened for this issue in trac.

Cheers!!!

Mark :)

Re: VLC AC3 SPDIF Output

Posted: 23 Jun 2010 21:22
by jeroensky
Dear Geoff,
Try to use the following Sout >>out settings

-output type : win32 waveout
-force detection of dolby surround : on
-use s/p dif when available.

Tools>Preferences>all>stream output> Soutstream>transcode>
In Audio
Tick mark:
DTS Coherent Acoustic audio Decoder,
ATSC A/52(AC-3) audio decoder

Save the settings, close VLC player and then try...This worked for me. Do let me know if it does for you.
if you enable force detection of dolby surround, then you disable 5.1 channels. (that's my experience on a 5.1 amplifier with dolbydigital & dts decoders onboard)

and why would you decode dts & atsc a/52(ac3/dolbydigital) if your amplifier has the codecs onboard.
These settings seems to be for a stereo amplifier, but not advisable for a 5.1 amp with decoders build in and connected by sp/dif.

Re: VLC AC3 SPDIF Output

Posted: 10 Aug 2011 18:05
by magooo
I have the same problem that Geoff described. I have the latest 1.0.5 installed on WinXP SP3. Audio come out and processor is detecting and decoding the proper codec. But every 10 min or the stutter/choppy audio kick in. Each time when that happen I have to go to audio menu and re-select the A52 over SPDIF option...sort of like resetting, then it go back to normal for a while.
My MB use the Realtek HD Audio driver while my external card is RME HDSP.
XP Pro sp3, vlc1.1.11,ati vid card with HDMI audio output (correct dongle) Onkyo AV to Sony LCD. All drivers up to date, tried so many settings it would take up pages.

As above but mine starts to go choppy at approx 4 minutes and then a you have done re-select A52 option. This happens only with AC3 as far as I`m aware, because of this I`m not using VLC which is a shame as I like it apart from this problem, which I don`t seem to be able to solve.

Noticed in the Modules tree under audio output "waveout" I have decoder a52 and avcodec running, could this be the prob lem and if so how do I change it?
Other players are OK.

Using Win32wav out
S/pdif on and of
even tried the sout settings to no avail.
Any help will be greatly appreciated.
Thanks