Kodi Community Forum
[WINDOWS][PATCH]Bitstream output of HD audio formats - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: [WINDOWS][PATCH]Bitstream output of HD audio formats (/showthread.php?tid=121877)



- Alz2605 - 2012-02-06

voip-ninja Wrote:Can you provide some example titles with the problem? I would like to test them on my rig if I have them... I've only tested a handful of titles but so far they all appear to be working with no frame drops.

Avatar mkv and Back to the Future m2ts I remember giving me stuttering. Can't remember what else I tested. The Dark Knight, Drive and Tinker Tailor Soldier Spy ripped in m2ts played fine for me.


- greysquirrel - 2012-02-06

You are amazing!
I have spent so much time with the old hd hack and then all of last week trying to configure dsplayer. Aside from truehd files (created with makemkv and run slowly) it works perfectly, I only wish I had this 6 months ago!


- DDDamian - 2012-02-06

fezster Wrote:It turns out setting System -> Audio Output to 5.1 solves it. I now get my FLAC files playing correctly at multichannel, and any bitstreamed audio still plays correctly at up to 7.1.

I dont have any FLAC files > 6 channels, so not sure if they'd play correctly or not.

I'm guessing this is a bug that WASAPI exclusive does not work when 7.1 is selected ?

I'm guessing a driver bug - it works for me regardless of the Windows channel layout. That said, all my FLACs are 5.1 or less. Gonna try a quick test extracting DTS-MA 7.1 to FLAC and I'll let you know how that goes Cool


- Alz2605 - 2012-02-06

@ DDDamian,

Main specs of my pc are

Processor: AMD Athlon II X4 processor 620NVIDIA GeForce 9100 chipset
Memory: 8 GB DDR3-SDRAM
Graphics: ATI Radeon HD 5570 with 1 GB

I've tried video clock settings


- voip-ninja - 2012-02-06

DDDamian Wrote:WASAPI exlusive mode *should* be independent of the Windows channel setup. What is important is to check "Allow applications to take exclusive control of this device" and "Give exclusive mode applications priority" in the Windows sound settings under "Advanced". This is likely the cause of the error in the log posted above (against forum etiquette!).

On my rig, even with those options selected I only ever got stereo until I went in and configured the WASAPI driver for 5.1.

Probably a driver bug, but from what I see reported, others have to do the same to get 5.1 working properly.


- voip-ninja - 2012-02-07

fezster Wrote:It turns out setting System -> Audio Output to 5.1 solves it. I now get my FLAC files playing correctly at multichannel, and any bitstreamed audio still plays correctly at up to 7.1.

I dont have any FLAC files > 6 channels, so not sure if they'd play correctly or not.

I'm guessing this is a bug that WASAPI exclusive does not work when 7.1 is selected ?

XBMC knows my setup is 5.1 and, like you, I did not get better than 2.0 channels from PCM, etc, until I set it explicitly to 5.1 audio for the WASAPI driver in windows control panel.


- voip-ninja - 2012-02-07

Alz2605 Wrote:Avatar mkv and Back to the Future m2ts I remember giving me stuttering. Can't remember what else I tested. The Dark Knight, Drive and Tinker Tailor Soldier Spy ripped in m2ts played fine for me.

I will test with Avatar, stay tuned.


- DDDamian - 2012-02-07

Hey folks - here's some test files for 7.1 audio only. Posted in .flac, 16bit and 24bit samples, extracted from DTS official sample: samples
Ripped from m2ts using eac3to as wavs, inspected in Audacity for all channels, exported in the two bitdepths.
Play fine in XBMC, VLC and Foobar with Windows set to either 2.0 or 7.1 channels (although only Foobar uses 24bit output). Not sure why you guys are having issues.
Amp reads Multi CH In 7.1, lights all 7.1 channels and outputs sound from all channels, again regardless of Windows setting for channel layout.


- voip-ninja - 2012-02-07

voip-ninja Wrote:I will test with Avatar, stay tuned.

Okay, so I've tested with a few things, and unfortunately the results are not so great.

I haven't explicitly noticed stuttering, but it is happening, as I can see the dropped frame count increment, about 1-2 frames every 7-10 minutes or so on every title that I try with HD audio.

So, with Avatar, after watching for about 20 minutes (and not particularly paying much attention to it) I went from zero initial frame drops to about 4. I suspect that this has to do with the fact that the "match refresh rate to source" AND "sync to display" options are set and with bitstream HD audio this does not work quite correctly (I believe I am using the default option for match refresh rate that does audio re-sampling, perhaps that is the culprit).

Another odd thing I notice is that with the regular Beta 2 (and Beta 1) builds of Eden, I would observe a quick flicker or pause at the start of playback when the display synced back up to the XBMC source, strangely with this build that does not seem to be happening, I never observe a pause during sync, even though I can see by looking at the diagnostic data that the frame rate is changing from 1080p/60 in the menus to 1080p/23.976 during media playback.

Very very odd.


- DDDamian - 2012-02-07

Alz2605 Wrote:@ DDDamian,

Main specs of my pc are

Processor: AMD Athlon II X4 processor 620NVIDIA GeForce 9100 chipset
Memory: 8 GB DDR3-SDRAM
Graphics: ATI Radeon HD 5570 with 1 GB

I've tried video clock settings

Not a horsepower issue then. Try running true fullscreen not windowed? Any other processes running?


- fezster - 2012-02-07

DDDamian Wrote:I'm guessing a driver bug - it works for me regardless of the Windows channel layout. That said, all my FLACs are 5.1 or less. Gonna try a quick test extracting DTS-MA 7.1 to FLAC and I'll let you know how that goes Cool

Just to be clear, I have left Windows Sound Control Panel at 2.0 stereo. I had to change the audio output in Xbmc (System -> Audio) to 5.1. It does not work when set to 7.1.

Thanks.

Quote:Play fine in XBMC, VLC and Foobar with Windows set to either 2.0 or 7.1 channels (although only Foobar uses 24bit output). Not sure why you guys are having issues.

What do you have set in the Xbmc settings ?


- PatrickBateman - 2012-02-07

Hey,

Just a bit of feedback...
So I tested the build last night in my ion based htpc and my AMD based htpc.

Ion does not bitstream dts-ma or dts-hr but it does still work as a htpc with 7.1 pcm etc so I used this to test if any bugs were present in a generic build that was not exclusively bit streaming, and was instead decoding true hd streams to PCM etc etc etc.. Just incase these patches had Introduced any bugs else where...

From what I can see it works perfectly for the generic users who are not bit streaming HD audio. No bugs seem to have been introduced for those not bit streaming...

I did notice a small screen flicker in the video that was not present in beta2 so I've not idea if this bug was introduced by version of xbmc this is merged with of if it was directly related to this patch. I'm going to roll back today and test the same video, but I definetly noticed a screen flicker (a similar bug was mentioned in the help forum for beta users so i assume it's a xbmc code issue not related to this patch)

Second, i tested bitstreaming from my AMD 6320HD and what I can see there was no major issues noticed except my dropped frames jumped from an average of about 1 MAX per movie (if that) to about 4 per movie.

This could be xbmc code related again, as I mentioned above there seems to be a video glitch causing screen flicker in the beta builds (mentioned by other users in the help threads)

I then tested as many formats as I could and all SEEMED ok, with the exception of DD+. this format gave me the most issues? It seemed to stutter and stammer quite regularly? (by regularly I mean more than 4 per movie but less than 8) which during a 90 minute film was about once every 15 minutes? Strange as DD+ is not a high Bitrate etc as TrueHD which seemed to be ok (again with the exception that most of my movies have dropped frames ranging and averaging between 4/8 now rather than the original 0/1 at most.

I tried virtually all combinations i could think of and overalls I think if this is merged with the Eden release then I think it'll be good to go as overall it was far more successful than the AE builds (at the moment) on my htpcs.

Tl;dr
Some dropped frames, some video flicker which may infact be coming from xbmcs beta code and not this patch, but overall pretty successful.

Great work Daniela Nod


- fezster - 2012-02-07

Another issue which Im sure occurs consistently is that gui sounds are not enabled when resuming from sleep.


- Dullie - 2012-02-07

I tested the patch with several movies, DTS MA, THD, and flac 5.1 and everything is fine! My settings in XBMC are as follows DXVA Renderer, DXVA 2 Enabled, Adjust refresh rate enabled, Sync playback enabled, AV Sync method is Video clock (Drop/Dupe Audio), True Fullscreen enabled, VSYNC always enabled. I havent noticed any drops of frames or any kind of stuttering. However, I notice the dropped frames in numbers when I bring up the video OSD info by pressing "O". My system is an i7, nVidia 460 GTX, Denon 3808CI AVR and a Kuro 5090.

Thanks Dani Smile


- Mati24 - 2012-02-07

I just install, it will works perfect !
I have an Ati HD6870 with HDMI -> Pioneer VSX920 with DTS HD and TrueHD

Thank you