Kodi Community Forum
[WINDOWS] Internal Directshow Based Player [NO LONGER DEVELOPED] - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
+---- Thread: [WINDOWS] Internal Directshow Based Player [NO LONGER DEVELOPED] (/showthread.php?tid=61355)



- blinkseb - 2010-06-06

dlmh Wrote:Hi,

I just got my new hardware (Intel DH57JG + Core i3 530), installed Windows 7 Home Premium (32-bit) and the latest build of XBMC DSPlayer, but I'm having some issues with playback:

(using DVDPlayer)
1: My display (Samsung LE46A686) is set to 60Hz in Windows, as is in XBMC. I've set "Switch refreshrate" to ON. When directly connected to the display a 24p source will play perfectly @ 24Hz.

When connected through my receiver (Onkyo TX-SR875), after starting a video, the screen goes black and the receiver starts switching inputs (clicking noises) and after a while I get the "No input" message from my display.

If I set my desktop refreshrate to 23Hz the video will play perfectly at 24Hz. I'm guessing there's a negotiation issue between my hardware and the receiver, but I don't know how to fix it.

(when using DSPlayer)
2: I first couldn't get a file to play through DSPlayer. I would keep getting the error that the " file couldn't be rendered" and the XBMC log shows an error that the filter couldn't be loaded. I finally managed to fix this by loading a movie from a network share mapped to drive letter (MSmile instead of directly over samba (SMB://user@pwConfusedhare). I don't know why this is an issue, DVDPlayer works perfectly like this.

However, after fixing this issue, I cannot play the file through DSPlayer. The audio starts playing, but the screen is stuck at the XBMC interface and the "loading" animation is stuck as well.

I tried many options in the ffdshow config windows, switching them on and off, but to no avail. Because I wanted to test if I could get DTS-HD/TrueHD to play through my hardware I installed Total Media Theater 3 first and then MPC-HC. They played back my media perfectly, but no HD Audio.

Then I switched back to my XBMC trials and was quite surprised that when starting a .M2TS file, all the pretty lights on the receiver indicating TrueHD/DTS-HD(MA) showed and I actually got HD audio through my speakers!!! Still no video though, still stuck at the XBMC interface.

Anyone got a clue why this is happening? The log shows no errors, but XBMC becomes unresponsive (although audio will keep playing).

Edit: here's the log after playing the same file, first with DVDPlayer, then with DSPlayer.
Edit2: here's the log when playing Dolby TrueHD


Please enable debug in xbmc and repost your log. If the GUI freeze, or if you see a black screen without any respons of xbmc, it's usually a sign of a crash Smile


DSPlayer VSync - hsinchu308 - 2010-06-06

Hi,

With the latest version of DSPlayer, and some tweaking, I am finally able to achieve smooth playback with no tearing. I thought I would share my experience in case you are having the same problems.

As reported before, I was experiencing stuttering that I did not encounter with MPC-HC, even though I was using the same settings for vsync and subtitles, etc. The problem turned out to be conflict between dsplayer vsync and XBMC vsync (veritical blank sync in System Settings). After some experimenting, I found that the best solution is to turn off all vsync in dsplayer, and set vertical blank sync to "always on". Then I'd get pretty smooth playback for 24 fps movies, with no tearing.

However, I would still get dropped frames in 60 fps NTSC interlaced videos: I would get only 50-55 fps, according to the OSD and dsplayer statistics. Switching from fake full screen to true full screen improved things a bit, and I was able to get 60 fps most of the time, with frame rate dropping periodically to 55 fps. However, after I switched to true full screen, the cpu usage gets very high - 50% during idle, 45%-70% during playback, WITH DXVA ON! When the cpu usage gets above 55%, that's when I start getting lower fps and dropped frames. The solution: put the following statement in Advancedsettings.xml: <sleepbeforeflip>0.85</sleepbeforeflip>. According to a post in another XBMC topic, the problem is that the display driver "busy waits" on vsync, causing high cpu usage (which in turn cause dropped frames when the frame rate is high, I think), and the above statement tells the program/driver to sleep for 85% of the duration between vsyncs, if I understand correctly. In any case, after I put the above statement in Advancedsettings.xml, my cpu usage during idle dropped from 50% to 12%, and from 55% to 10%-15% during playback, and I get consistent 60 fps for interlaced NTSC videos, with no tearing. This is for Windows XP SP3 w/ Nvidia 8400GS.

For 32bit Windows 7 however, things are different. (This machine is a Acer Revo 3610 w/ Nvidia ION.) It turns out that putting in the sleepbeforeflip statement was not necessary, and in fact actually hurt performance (maybe because of the display driver model difference between XP and Win7 - don't know). I tried turning off the vsync in both dsplayer and XBMC GUI, and let Aero take care of the vsync (I was worried about vsync conflict between Aero and XBMC). This worked fine in fake full screen, and I got smooth playback w/ no tearing for 24 fps movies. But again, I was only getting about 45 fps in 60 fps videos. However, when I turned on true full screen, Aero no longer controls the vsync and I get tearing, so the final solution is again true full screen with blank vertical sync = always on in XBMC System Settings. With this config, I get no stuttering, no tearing, and consistent 60 fps in NTSC interlaced videos.

I hope my experience is of help to some other dsplayer users. Big Grin

PS. Forgot to mention, I lowered my subtitle texture resolution from 1024x768 to 640x480 before compiling. At 1024x768 I do get some stuttering during subtitle buffering (but not when the subtitle is actually displayed on screen, which is about 8 seconds later), especially for Chinese subtitles. Also, just for fun, I tried to make the subtitle semi-transparent by setting subtitle alpha to 125, and it works, just like MPC-HC!


- blinkseb - 2010-06-06

hsinchu308 Wrote:Hi,

With the latest version of DSPlayer, and some tweaking, I am finally able to achieve smooth playback with no tearing. I thought I would share my experience in case you are having the same problems.

As reported before, I was experiencing stuttering that I did not encounter with MPC-HC, even though I was using the same settings for vsync and subtitles, etc. The problem turned out to be conflict between dsplayer vsync and XBMC vsync (veritical blank sync in System Settings). After some experimenting, I found that the best solution is to turn off all vsync in dsplayer, and set vertical blank sync to "always on". Then I'd get pretty smooth playback for 24 fps movies, with no tearing.

However, I would still get dropped frames in 60 fps NTSC interlaced videos: I would get only 50-55 fps, according to the OSD and dsplayer statistics. Switching from fake full screen to true full screen improved things a bit, and I was able to get 60 fps most of the time, with frame rate dropping periodically to 55 fps. However, after I switched to true full screen, the cpu usage gets very high - 50% during idle, 45%-70% during playback, WITH DXVA ON! When the cpu usage gets above 55%, that's when I start getting lower fps and dropped frames. The solution: put the following statement in Advancedsettings.xml: <sleepbeforeflip>0.85</sleepbeforeflip>. According to a post in another XBMC topic, the problem is that the display driver "busy waits" on vsync, causing high cpu usage (which in turn cause dropped frames when the frame rate is high, I think), and the above statement tells the program/driver to sleep for 85% of the duration between vsyncs, if I understand correctly. In any case, after I put the above statement in Advancedsettings.xml, my cpu usage during idle dropped from 50% to 12%, and from 55% to 10%-15% during playback, and I get consistent 60 fps for interlaced NTSC videos, with no tearing. This is for Windows XP SP3 w/ Nvidia 8400GS.

For 32bit Windows 7 however, things are different. (This machine is a Acer Revo 3610 w/ Nvidia ION.) It turns out that putting in the sleepbeforeflip statement was not necessary, and in fact actually hurt performance (maybe because of the display driver model difference between XP and Win7 - don't know). I tried turning off the vsync in both dsplayer and XBMC GUI, and let Aero take care of the vsync (I was worried about vsync conflict between Aero and XBMC). This worked fine in fake full screen, and I got smooth playback w/ no tearing for 24 fps movies. But again, I was only getting about 45 fps in 60 fps videos. However, when I turned on true full screen, Aero no longer controls the vsync and I get tearing, so the final solution is again true full screen with blank vertical sync = always on in XBMC System Settings. With this config, I get no stuttering, no tearing, and consistent 60 fps in NTSC interlaced videos.

I hope my experience is of help to some other dsplayer users. Big Grin

PS. Forgot to mention, I lowered my subtitle texture resolution from 1024x768 to 640x480 before compiling. At 1024x768 I do get some stuttering during subtitle buffering (but not when the subtitle is actually displayed on screen, which is about 8 seconds later), especially for Chinese subtitles. Just for fun, I tried to make the subtitle semi-transparent by setting subtitle alpha to 125, and it works, just like MPC-HC!

That is an amazing feedback! Like you may have noticed, there will be no more conflicts between the two vsync method since my last commit. If dsplayer vsync is enabled, xbmc one is automatically disabled.

If you have some time, can you add your analysis on the wiki? It will be really helpful for everybody Nod

Anyway, it seems like things begin to work pretty well Big Grin


- dlmh - 2010-06-06

blinkseb Wrote:Please enable debug in xbmc and repost your log. If the GUI freeze, or if you see a black screen without any respons of xbmc, it's usually a sign of a crash Smile

Here's the debugging log after playing a video with TrueHD with DSPlayer and one with DTS-HD(MA).

I actually got a movie with TrueHD playing through DSPlayer, but I had to change this:

- mpcvideodec instead of ffvideodec for ts/m2ts/mpeg
- Audio settings in Windows to 24-bit / 192 kHz

So now only video's in a .m2ts container with Dolby TrueHD will play and actually play perfectly, even bitstream the HD audio!
But: nothing else! No .mkv containers, no .m2ts with DTS-HD(MA) or anything else.

I don't really need DXVA2 anyway, video's playback perfectly without it. But I really, really, really want the HD Audio to play.

Secondly, I noticed that when the interface freezes, all audio will play when it's Dolby Digital, DTS, Dolby TrueHD, but NOT DTS-HD(MA). The latter will show in the display of my receiver, but all I get is jitter/static.


- blinkseb - 2010-06-06

dlmh Wrote:Here's the debugging log after playing a video with TrueHD with DSPlayer and one with DTS-HD(MA).

I actually got a movie with TrueHD playing through DSPlayer, but I had to change this:

- mpcvideodec instead of ffvideodec for ts/m2ts/mpeg
- Audio settings in Windows to 24-bit / 192 kHz

So now only video's in a .m2ts container with Dolby TrueHD will play and actually play perfectly, even bitstream the HD audio!
But: nothing else! No .mkv containers, no .m2ts with DTS-HD(MA) or anything else.

I don't really need DXVA2 anyway, video's playback perfectly without it. But I really, really, really want the HD Audio to play.

Secondly, I noticed that when the interface freezes, all audio will play when it's Dolby Digital, DTS, Dolby TrueHD, but NOT DTS-HD(MA). The latter will show in the display of my receiver, but all I get is jitter/static.

Are you sure the log file is complete? It's missing a lot of things, and there is only one file playing. Moreover, can you disable the webserver while running the test please? The debug log will be easier to read.

Thanks!


- dlmh - 2010-06-06

blinkseb Wrote:Are you sure the log file is complete? It's missing a lot of things, and there is only one file playing. Moreover, can you disable the webserver while running the test please? The debug log will be easier to read.

Thanks!

I've updated my post and split the logs into two. I only included the last half or so of the log, I guess pastebin does not accept so much text. Smile


- blinkseb - 2010-06-06

dlmh Wrote:I've updated my post and split the logs into two. I only included the last half or so of the log, I guess pastebin does not accept so much text. Smile

I'm afraid I can't do nothing with these logs. All are missing the end, and that's here I can see if there's a crash or if it's only a codec issue. Try http://pastebin.com/


- dlmh - 2010-06-06

blinkseb Wrote:I'm afraid I can't do nothing with these logs. All are missing the end, and that's here I can see if there's a crash or if it's only a codec issue. Try http://pastebin.com/

Let's try again.

The DTS-HD(MA) file now actually started playing but the audio was all garbled/jittery/static. The second time I started playing, the interface froze again.

Thanks for the support, by the way! Smile


- blinkseb - 2010-06-06

dlmh Wrote:Let's try again.

The DTS-HD(MA) file now actually started playing but the audio was all garbled/jittery/static. The second time I started playing, the interface froze again.

Thanks for the support, by the way! Smile

Oh okay so your log file end really with "23:07:07 T:2640 M:1045979136 DEBUG: CEVRAllocatorPresenter::GetMixerThread Render manager configured (FPS: 23.976044)" and XBMC freeze?

That's interesting! I've never seen this issue before. Can you send me a sample of your file? (I need all the audio / subtitle streams). It would be very helpful! Smile


- dlmh - 2010-06-07

blinkseb Wrote:Oh okay so your log file end really with "23:07:07 T:2640 M:1045979136 DEBUG: CEVRAllocatorPresenter::GetMixerThread Render manager configured (FPS: 23.976044)" and XBMC freeze?

That's interesting! I've never seen this issue before. Can you send me a sample of your file? (I need all the audio / subtitle streams). It would be very helpful! Smile

Yep, when the interface freezes, I have to CTRL-ALT-DELETE and force quit the XBMC process. That's the last entry in the log.

I'll try and make a sample of the video, is 5 seconds enough? Both videos are BluRay originals of Bad Boys (DTS-HD) and Aeon Flux (TrueHD) of which I just kept the main feature.

BTW: I tried some other videos with a TrueHD track: all play perfectly with bitstreaming. I also noticed that DVDPlayer outputs the TrueHD track as multichannel, does this mean it decodes the track and sends it as LPCM? It sounds like it also normalizes the volume, it's less loud (-12 dB).


Stacked files - WhiningKhan - 2010-06-07

I took dsplayer-branch built from 30824 into 'production' use. Awesome work! No judder problems on HD3200, after disabling the vsync for dsplayer. In XBMC settings (and ATI CCC), vsync is always on, and Vista Aero is disabled while XBMC is running - there is no tearing either in dsplayer or in dvdplayer. My VDR recordings look sooo much better with dsplayer, when HW vector adaptive deinterlacing is in use - can't stand looking at the dvdplayer's blended deinterlace anymore.

I've found so far only one issue affecting normal use: It does not seem to handle stacked files right. When I watch a multi-part stacked file and press stop while still in first part, the playback is not stopped - instead, dsplayer jumps to start of second part and continues playback from that. Is this a known issue?


- hsinchu308 - 2010-06-07

blinkseb Wrote:That is an amazing feedback! Like you may have noticed, there will be no more conflicts between the two vsync method since my last commit. If dsplayer vsync is enabled, xbmc one is automatically disabled.

If you have some time, can you add your analysis on the wiki? It will be really helpful for everybody Nod

Anyway, it seems like things begin to work pretty well Big Grin

Hi Seb,

You are too fast for me...the post is only a few hours old and some of the vsync info is already out of date..LOL Laugh

Regarding the wiki, sure, just give me some time. Right now I need to troubleshoot why XBMC reboots my computer while watching an avi file. Could be a trunk issue (although I was using dsplayer at that time). But until I figure out the cause, my XBMC running/testing will have to be done very cautiously (closing all problems before starting, etc.) I will try to post a debug file later.

Yes, things are definitely moving along. Yesterday was the first time that I felt confidently enough to load dsplayer onto my main HTPC (the Revo 3610) connected to my living room TV, replacing MPC-HC as the default player inside XBMC. Nod

PS. Would you considering releasing another build soon? Maybe after you add the ability to change subtitle texture size and # of subpics to buffer, etc, in an xml file, like the you did for renderersettings.xml? In my opinion, with all of the recent changes you and tiben have done (especially w/ regards to vsync, which was one of the major problems people had), a dsplayer user could get a pretty well-rounded XBMC system, especially if he/she tweak the xml files.

EDIT: oops, forgot to say I was running r30840 when the avi file played with garbled sound, after few minutes, and then rebooted my PC.


- blinkseb - 2010-06-07

dlmh Wrote:Yep, when the interface freezes, I have to CTRL-ALT-DELETE and force quit the XBMC process. That's the last entry in the log.

I'll try and make a sample of the video, is 5 seconds enough? Both videos are BluRay originals of Bad Boys (DTS-HD) and Aeon Flux (TrueHD) of which I just kept the main feature.

BTW: I tried some other videos with a TrueHD track: all play perfectly with bitstreaming. I also noticed that DVDPlayer outputs the TrueHD track as multichannel, does this mean it decodes the track and sends it as LPCM? It sounds like it also normalizes the volume, it's less loud (-12 dB).

5 seconds is really fine. I just need to find why it's crashing Smile So even 2s would be fine!

For DVDPlayer, I really don't know how it works Laugh I'm still new to XBMC and I havn't look closely to dvdplayer code. But it may normalize the volume, why note. But I guess that's something related to the audio decoder rather than dsplayer?

WhiningKhan Wrote:I've found so far only one issue affecting normal use: It does not seem to handle stacked files right. When I watch a multi-part stacked file and press stop while still in first part, the playback is not stopped - instead, dsplayer jumps to start of second part and continues playback from that. Is this a known issue?

That was not a known issue (not it is Smile)! I've got some stacked movie, but never try one! I guess it's time to do it! Thanks, I add it on my todo list!

hsinchu308 Wrote:Hi Seb,

You are too fast for me...the post is only a few hours old and some of the vsync info is already out of date..LOL

Regarding the wiki, sure, just give me some time. Right now I need to troubleshoot why XBMC reboots my computer while watching an avi file. Could be a trunk issue (although I was using dsplayer at that time). But until I figure out the cause, my XBMC running/testing will have to be done very cautiously (closing all problems before starting, etc.) I will try to post a debug file later.

Yes, things are definitely moving along. Yesterday was the first time that I felt confidently enough to load dsplayer onto my main HTPC (the Revo 3610) connected to my living room TV, replacing MPC-HC as the default player inside XBMC.

PS. Would you considering releasing another build soon? Maybe after you add the ability to change subtitle texture size and # of subpics to buffer, etc, in an xml file, like the you did for renderersettings.xml? In my opinion, with all of the recent changes you and tiben have done (especially w/ regards to vsync, which was one of the major problems people had), a dsplayer user could get a pretty well-rounded XBMC system, especially if he/she tweak the xml files.

No problem, take all the time you need, don't worry Smile

For a new build, I wanted to finish shaders support first, before released a new one. However, it should not be so long, max. a week! And you've got a great idea (like always :p) : I'll add ability to change subtitles options in the renderersettings.xml. That will do the trick right now Smile


- dondre - 2010-06-07

dondre Wrote:What are the advantages in video playback using the DSPlayer version with say MPC-HD/CoreAVC in combination with the best filters you may find VS say the regular DVDPlayer/DXVA2 solution in the latest SVN builds?

I have a perfect playback using the regular DVDPlayer/DXVA2 under W7 with a CPU usage as low as 4% in average for e.g. a H264 video with 30Mbps (bluray 1:1 remux) but I can't help it but wondering if there are;

- Any advantage of using an external player with CUDA over the built-in DVDPlayer with DXVA/VDPAU?
- Any possible improvement in picture quality?
- Any possibility to lower even the CPU usage?

Thanks for your knowledge sharing!

Hi, little up (quoting myself), would anybody be kind enough to enlighten me on those 3 questions please?

Thanks!


- steelman1991 - 2010-06-07

dondre Wrote:Hi, little up (quoting myself), would anybody be kind enough to enlighten me on those 3 questions please?

Thanks!

Unlikely to get a definitive answer to the video quality issue - very much in the eye of the beholder (personally I see very little difference) but the only way you are gong to find out is to try for yourself.

How much lower do you want to go? Huh - I would suggest that the figures you are seeing are unlilkely to be bettered at this time. In fact I have noticed that overheads in dsplayer config is slightly higher than 'native' implementation.