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)



- alexrose1uk - 2010-12-28

Porogna Wrote:Hey all,

Have just started using this branch and have noticed a small bug when using the Official XBMC Remote for Android with DSPlayer. When playing any type of video and you try to skip through it using the seek bar in the, Now Playing, window it goes back to the start of the video. This does not happen when using DVDPlayer.
*snip*

Would be great if I could get it resolved as DVDPlayer doesn't playback quite a few of my videos properly whereas DSPlayer does and was forced to use MPC-HC as an external player before switching to this.

I also use the HTC Desire as a remote, and am switching to DSplayer because of issues with the default DVDPlayer, so I feel your pain.
Now I dont know whether this will work, but even on DVDPlayer, I used to find that just using the skip keys in the remote view worked better (left, right, up and down) than using the now playing view; to the point I really only ever use the remote in remote view mode these days.

Its not a solution as such, but jumping around files using these, even if a little less fine in search terms, might at least be a reasonable compromise. Better than going back to the beginning each time Smile
(Presuming this works anyway!)


- rickardkk - 2010-12-28

therealjoeblow Wrote:No. as I reported *dozens* of times over the past 4 or 5 months, playback is *perfect* (and I mean 100% absolutely prefect, smooth) with MPC-HC, the old MPC, ZoomPlayer, XBMC's DVDPlayer. There is no judder or tearing whatsoever with these.

And also, it was just as smooth and perfect with DSPlayer up to r28016; after that Tiben and Seb totally rewrote the renderer and it's been f*cked ever since, with small improvements and regressions here and there, but never totally fixed. All I ever hear is "well, it works fine on my system", but as I understand it none of the dev's have WinXP installed anymore and are working in Win7 now, so sure they're never going to see the problem themselves, which leaves very little hope that it will actually get fixed.

Can you guys PLEASE put the renderer code from r28016 back in DSPayerHuh PLEASEHuh

Cheers
The REAL Joe

Well, on other systems r28016 is not as smooth and stable as latest build. So I don't think it's a good idea to go back for the renderer code from r28016.
Better to try to solve this (even if it may be hard if they abandoned Windows XP).

I've tested all codecs/slitter combinations possible.
This solved all my issues on current system (ATI 5770 on Windows 7 32bit):

XBMC settings:
Use a fullscreen window rather than true fullscreen (System/Video output)
Disabled

Vertical blank sync (System/Video output)
Always enabled

Adjust display refresh rate to match video (Video/Playback)
Enabled

Audio renderer (Video/DSPlayer)


rendersettings.xml

<renderersettings>
<sharedsettings>
<AlterativeVSync>true</AlterativeVSync>
<FlushGPUWait>true</FlushGPUWait>
<FlushGPUAfterPresent>true</FlushGPUAfterPresent>
</sharedsettings>
<evrsettings>
<OutputRange>1</OutputRange>
</evrsettings>
</renderersettings>

mediasconfig.xml
<rule filetypes="mkv">
<source filter="mkvsource" />
<splitter filter="mkvsource" />
<video filter="ffdvideodec" />
<audio filter="madflac" />
<extra>
<extra filter="mpcvideodec" />
<extra filter="ffdaudiodec" />
</extra>
</rule>

MPC Video Decoder for H264, WVC-1 (through ffdshow NV12) for VC-1 and libmpeg (through ffdshow NV12) for MPEG-2.

For some reason I see a huge diffrence in "smoothness" while testing diffrent codecs. Disabling ReClock and enabling the render stats shows that some codecs (like ArcSoft) are "drifting" much faster than others.

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

This gives me a complete smooth playback at 23,976Hz, 24Hz, 50Hz and 59.94Hz (I've been staring at slow horizontal pans for hours while testing).

Also the audio sync is consistent between all frame rates/refresh rates (always had to compensate with about 225 ms for 23.976/24 fps played at 23.976/24Hz before).

Also grayscale ramps are looking fine.

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

There are one problem though (developers listen up)

Seeking by small skip and chapter skip:

There will be dropouts and jerks when seeking.
Sometimes it takes half a second to recover after a skip, sometimes 5-10 seconds. This one is present in most players I think, and it's due to a combination of VSync, buffers, iframe, splitter and codec.. It's more of a problem at a low refresh rates (59.94fps at 59.94Hz better than 23.976fps at 23.976Hz).

It's VERY easy to solve though as I found out.
Pause, seek, wait, play.

As I can't do patches for XBMC I did a quick dirty fix for this.

I've automated my small skips and chapter skips using EventGhost and it's flawless. A button on the remote triggers a macro that pauses XBMC, skips, wait (this wait will solve buffer and VSync issues and during the wait it listens after more keypresses on the remote), resumes.

This is done very quick, and will not appear as an pause for the user.

I've watched Blu-rays and HD DVD's for a couple of hours now without a single jerky movement. Also watched the render stats with and without this macro engaged. Without you can see the green line wondering all over the place for a short while (try a high bitrate blu-ray over your Gb LAN with 96kHz 8 channel audio played at 23.976Hz, it may never catch it).

Of course this must be implemented in DSPlayer, as this causes alot of other annoyances like pause OSD screens and the eventserver should not broadcast this as an actually pause (as it will screw up automation based on XBMC events).


- tiben20 - 2010-12-28

tiben20 Wrote:I almost got working the insertion of this wrapper into xbmc http://oss.netfarm.it/dsnative/ I'm getting the output data of the codec i'm testing this with (ffdshow) But i'm having trouble with rendering the data with the renderer. If someone have any knowledge about that just pm me ill send the source code. Would be really nice because i'm blocked right now
nvm did it
Image


- therealjoeblow - 2010-12-28

tiben20 Wrote:nvm did it
Image

Great news Tiben! Hopefully this will lead to a simpler alternative to use ffdshow as a decoder than what DSPlayer's turned into.

Cheers
The REAL Joe


- therealjoeblow - 2010-12-28

Obi Have Wrote:Same as you, but with SP3. Running 1920x1080/24. I had random resizing of the GUI elements during movie playback until I went to windowed.

Sorry, that was a typo - I'm running SP3


- blinkseb - 2010-12-28

therealjoeblow Wrote:Great news Tiben! Hopefully this will lead to a simpler alternative to use ffdshow as a decoder than what DSPlayer's turned into.

Cheers
The REAL Joe

Maybe but that's really not the same thing. I suggest creating a new thread in the development forum because that's really different from dsplayer.


- oldpainless - 2010-12-28

tiben20 Wrote:nvm did it
Image

Thats interesting....are u going to release a cut of this for testing/feedback?

K


- alexrose1uk - 2010-12-28

Right, worked out my subtitle query myself.
It seems its exactly the same issue where the MPC subtitle renderer defaults to 800x600 display, rather than the display resolution. When I fiddled before, I think I probably put the settings in place for DVDPlayer, not DSPlayer hence why it hadn't worked, and fiddling with the GUIsettings was a complete red herring hehe

In case anyone else wandering into the thread is wondering about the same issue, or has noticed it but not fixed it (bearing in mind I have a 1080p display), I had to create a renderersettings.xml file in my dsplayer profile config with the following:
XBMCProfileFolder\Userdata\DSPlayer\Renderersettings.xm Wrote:<renderersettings>
<subtitlessettings>
<TextureSize>
<width>1920</width>
<height>1080</height>
</TextureSize>
<DisableAnimations>false</DisableAnimations>
</subtitlessettings>
</renderersettings>

Reading through the XBMC wiki again I feel a bit of a muppet for missing this, but essentially that'll give you the same subtitles as DVDPlayer does by default [DSPlayer also disables animated subs by default].

Tiben/Blinkseb- is there anyway you could get DSPlayer to set this automatically, based upon output resolution?
Now I know which file to create and what to do to it, I'm sorted, but it seems rather silly to need to set it up manually, when most users would surely want it setup as such by default Smile


Also fiddling around with the audio rendering, this might take a little longer as it seems the nice easy WASAPI is indeed not useable with DSPlayer so I'll have to work out how to get FFDshow to do the same process...probably easy but I don't usually do it Smile



Edit: Got audio sorted now, well mostly lol, FFDShow audio doesn't seem quite as redundant as XBMC's audio engine oddly enough!
Encountered a bug where it seems AC3 passthrough doesn't always kick in correctly, sometimes it's fine, othertimes it doesnt work...bit of a pain, however setting to PCM, and applying volume filter at 200% to nullify the difference in volume between the AC3-passthrough/PCM has sorted that out, at least until the passthrough issues are resolved.

Thanks for your hardwork on the player Tiben, Seb, have tried several videos that behave badly (4) with XBMC DVDPlayer, 3 of them worked perfectly, during the same section of video, with DSplayer, the remaining one I may just have to go 'oh well, ****** encode', but either way thats a big improvement Smile
Pretty sure with Bicubic filtering, it actually looks a bit better than plain DXVA upscaling from DVDPlayer too, although that might just be me!


Edit2: Well, as I mentioned above sometimes the DD passthrough works fine, other times it completely fails and dies a death.
I created a logfile during one of the times it died a death, and noticed the below, which I think is probably quite heavily related to the issue!
Anyone have any suggestions?

Quote:17:15:34 T:2108 M:1494142976 DEBUG: CFGFilterFile::Create Successfully loaded external filter (clsid:{0F40E1E5-4F79-4988-B1A9-CC98794E6B55} path:C:\Program Files (x86)\ffdshow\ffdshow.ax)
17:15:34 T:2108 M:1494142976 NOTICE: CFGLoader::InsertFilter Successfully added "ffdshow audio decoder" to the graph
17:15:34 T:2108 M:1494142976 INFO: CFGLoader::LoadFilterRules Loading audio filter. Elapsed time: 41.79ms
17:15:34 T:2108 M:1494142976 INFO: CFGLoader::LoadFilterRules Loading shaders. Elapsed time: 0.07ms
17:15:34 T:2108 M:1494142976 DEBUG: CFGLoader::LoadFilterRules All filters added to the graph
17:15:34 T:2108 M:1494142976 DEBUG: CFGManager::RenderFileXbmc Successfully loaded filters rules
17:15:34 T:2108 M:1494142976 INFO: CFGManager::RenderFileXbmc Loading filters rules. Elapsed time: 553.65ms
17:15:34 T:2108 M:1494159360 DEBUG: CFGManager::ConnectDirect: Failed connecting MKV Source.Japanese (Video 1).Type: pin to ffdshow audio decoder.In
17:15:34 T:2108 M:1493798912 DEBUG: CFGManager::ConnectDirect: Succeeded connecting MKV Source.Japanese (Video 1).Type:Video pin pin to MPC Video Decoder.Video
17:15:34 T:2108 M:1493823488 DEBUG: CFGManager::ConnectDirect: Failed connecting MPC Video Decoder.Output.Type: pin to ffdshow audio decoder.In
17:15:34 T:2108 M:1492832256 DEBUG: CFGManager::ConnectDirect: Succeeded connecting MPC Video Decoder.Output.Type:Video pin pin to Xbmc EVR.EVR Input0
17:15:34 T:2108 M:1492918272 DEBUG: CFGManager::ConnectDirect: Succeeded connecting MKV Source.Japanese (Audio 1).Type:Audio pin pin to ffdshow audio decoder.In
17:15:34 T:2108 M:1492381696 DEBUG: CFGManager::ConnectDirect: Succeeded connecting ffdshow audio decoder.Out.Type:Audio pin pin to Default DirectSound Device.Audio Input pin (rendered)

I can't see it being hardware as WASAPI in XBMC's standard audio engine performed flawlessly and the issue dissapears if I disable passthrough. I can live with PCM, but it'd be nice to bitstream as I've got an expensive amp which handles the audio well.



Any suggestions on this appreciated, I've tried a few different builds of FFDShow and obviously reset it's settings a few times. Originally I wondered if it was tied to the fact I use XBMC as a shell, but it's done it with explorer loaded too, and XBMC as a shell disabled, so it's not that!


- tocinillo - 2010-12-28

Ok, the detecting optical drive bug only appears with ALL skins EXCEPT Confluence...

Seems easy to fix it, any ideas?

Regards


- liquidskin76 - 2010-12-28

tocinillo Wrote:Ok, the detecting optical drive bug only appears with ALL skins EXCEPT Confluence...

Seems easy to fix it, any ideas?

Regards

Can you describe exactly whats happens? Is it that the option to play disc is not appearing when a disc is put in the drive? Or that the option to play disc is appearing ok however DSPlayer won't play it? I won't be able to test until later.

I'm skinning so really interested as to why it's ok in Confluence however not other skins.

Thanks Wink


- liquidskin76 - 2010-12-28

Regarding sub resolution, will that improve image based subs, like idx/sub?

Cheers


- tocinillo - 2010-12-28

With Confluence I can play DVDs automatically and I can play from "Play DVD". With any other skin two option doesn't work (can not find the disk).

Not only that I do not play DVDs that I do not detect the optical drive.

I think this is related to that Confluence is the default skin for XBMC...

Regards.


- alexrose1uk - 2010-12-29

liquidskin76 Wrote:Regarding sub resolution, will that improve image based subs, like idx/sub?

Cheers

Not a clue unfortunately, can't hurt to try though, and if nothing else it sorts out normal subs.
By comparison standard subs look positively blocky and overtly large on a higher resolution display at the standard default settings, correcting this not only improves the appearance of the subs but also means you can fit more words on one line making them that little bit quicker to read and interpret (and taking up less of the picture).


If anyone has any ideas on my digital passthrough issue it'd be appreciated.
The debug snippet [I can post an entire log if it helps] confirms theres some sort of issue, but I have no idea whether the issue lies with FFDshow (I've tried a few different builds with no change), or the current build of DSPlayer (I'm currently using the 35694 build posted just a page or two back).
PCM output works fine 100% of the time for everything, but bitstream fails perhaps 50% of the time (and usually tends to end up crashing the DSPlayer component of XBMC so I have to restart), or thats what it feels like, the debug log tells me its not 'connecting' properly but doesnt really tell me *why*, especially as it DOES work some of the time.
Unfortunately the older builds of DSPlayer are no use to me (or I'd revert for testing) as the previous official build has subtitle issues.
It's never easy is it?Eek

Don't even get me started on VFR video encodes that go from 24fps to 30fps the next, making them almost impossible to run entirely smoothly! lol Oo


- liquidskin76 - 2010-12-29

@seb/tiben,

I can confirm some funky behaviour with disc (tested with DVD) detection/playing on rev 35694.

If i have XBMC open and pop in a DVD, then select the option to play disc from a skins home menu (Confluence included), nothing happens.

If i head on in to Videos, and try to play D:\, i get an error saying 'remote share path not found or invalid'.

Weird thing is if i come out of full window and check the optical drive in Windows Explorer, it doesn't display the disc name or let me browse the contents. If i exit XBMC, after a few seconds the disc name appears and i can browse it ok.

Here's the debug log... http://pastebin.com/ZyCaHb3c

So, if i then open XBMC with the disc already in the drive, i can then see the disc name in XBMC, however trying to play the disc from the home screen option does nothing and playing via videos causes XBMC to hang, with the disc trying to read all the time.

Here's the debug log... http://pastebin.com/isnyuYqN

MPC-HC, etc works fine so optical drive ok.

Thanks


- liquidskin76 - 2010-12-29

Hi tiben/seb,

Are you guys able to update the first post with info like roadmap/timescales, outstanding bugs, up and coming or possible features, progress of internal filters, etc?

I don't know about other users however it's easy for me to lose sight of where dsplayer is going or how it's progressing. It would be great to be able to see how close you are to integration with trunk (and a possible release with Eden), and what needs to be done to get there. Hopefully you are closing in!

It all helps us to keep the faith!

I understand how hard it is for you two keep this project going, especially with lives to live as well! Shame that to date no other dev's have joined the project to help out. Keep up the great work. You're both doing a wonderful job Wink

Cheers