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)



- hsinchu308 - 2010-05-29

zilexa Wrote:WinXP doesn't have EVR so that is normal Smile XP has VMR9, Vista/Win7 have EVR.
Each have their own DXVA specs, VMR9 has 1.0 spec and EVR has 2.0 spec.

Do you test using the MPC Video decoder? On WinXP 32bit? Does any video (like mpeg4 or h264 or mpeg2/dvd) play correctly?

I read on the net that you can make EVR work on WinXP, with evr.dll and MS .NET 3.5. But trying it kills my system.

I am using WinXP 32bit, and the MPCVideoDec from prevous build (the size is 2.66MB, vs. the 3.12MB in the current version) and videos play correctly. With the latest 3.12MB MPCVideoDec, I get either a black screen, or a frozen screen on startup, and have to seek around to make the movies play.


- hsinchu308 - 2010-05-29

rickardkk Wrote:Great. I will test it on EVR as soon as I get it to compile. Are blinkseb aware of this patch?

I think he is on vacation today. Anyway he is the one that told me which files to look at when I asked him about this problem. Wink


- blinkseb - 2010-05-29

rickardkk Wrote:Night and day when using 23.976Hz refresh rate. Just as smooth as MPC-HC when vsync is disabled in the dsrenderersettings. Actually playback is near perfect now!!

Four problems encountered though:

1. Sometimes (can't reproduce at will) when starting playback the frame rate is at 4.0 fps (right after the refresh rate change). And it stays there until you do a small skip forward. After that it starts playback at the correct frame rate. Don't think this is of any help, but here is the debug log: http://pastebin.com/9tJSR3Pp
Have only been able to reproduce this when the "match refreshrate/framerate" option is enabled.

2. Skipping (backwards/forwards) does crash XBMC quite often.
Log: http://pastebin.com/qPMBhTV5
Dump: http://www.earselect.se/test/skipping.dmp

3. 50fps/25fps mks can't be played it seems. Tested alot of them and I always get the same message in the log:
http://pastebin.com/RCusccFr

4. Videos with non square pixels are not displayed with the correct AR. DVDPlayer displays them with correct AR (in Normal "zoom" mode)

Windows 7 32-bit
XBMC 30642
(Fullscreen windows rather than true...." option enabled

Thanks for the feedback!

So, quickly. Skipping, fast forward etc... are known to be broken. I just need more time to solve it and there're lots of things that need to be corrected! But it will.

3. It seems like haali don't like your files! Does the same file play in mpc with the same codec configuration? (or in graphstudio?)

hsinchu308 Wrote:#4 has been observed and reported by a few people, including myself.

Anyway, I spent some time and finally found a fix. Tested it on camcorder videos that are in 720x480 resolution (AR 3:2). Before the fix they are always displayed in AR 3:2, in "Normal" zoom mode, though they should be either 4:3 or 16:9 AR, and after the fix they are displayed correctly, just like in dvdplayer. Also tested other files that have non-square pixels in other video resolutions beside 720x480, and they also displayed correctly, like in dvdplayer.

So far I've only test on VMR9 and not EVR, using r30642, because my windows XP crashes with BSOD when I use EVR.

The fix: Change line 660 in VMR9AllocatorPresentor.cpp
from:
g_renderManager.Configure(m_NativeVideoSize.cx, m_NativeVideoSize.cy, m_NativeVideoSize.cx, m_NativeVideoSize.cy, m_fps,
CONF_FLAGS_FULLSCREEN);
to:
g_renderManager.Configure(m_NativeVideoSize.cx, m_NativeVideoSize.cy, m_AspectRatio.cx, m_AspectRatio.cy, m_fps,
CONF_FLAGS_FULLSCREEN);

Do the same thing for line 1672 in EVRAllocatorPresenter.cpp (NOT tested yet).

That is a GREAT news! Thanks a lot! I'll test that tonight or tomorrow, and commit the change? No reason it works for VMR and not for EVR! Thanks again!

Next time, can you please post a patch file on pastebin instead of code ? Thanks Smile

rickardkk Wrote:Great. I will test it on EVR as soon as I get it to compile. Are blinkseb aware of this patch?

Don't worry, I'm always here, and I read everything, even if sometimes I don't answer! Wink


- rickardkk - 2010-05-30

Thanks for answering!

3. They do play perfect in mpc with the same codec.



One thing I can't figure out right now is to use the EVR CP vsync and accurate vsync. Works in MPC-HC. But in XBMC DSPlayer (Both enabled by default (RendererSettings.h)) I get terrible stuttering. It's like if another vsync correction routine is interfering.

But even without, it plays alot smoother than the dvdplayer.


- hsinchu308 - 2010-05-30

blinkseb Wrote:Thanks for the feedback!

So, quickly. Skipping, fast forward etc... are known to be broken. I just need more time to solve it and there're lots of things that need to be corrected! But it will.

3. It seems like haali don't like your files! Does the same file play in mpc with the same codec configuration? (or in graphstudio?)



That is a GREAT news! Thanks a lot! I'll test that tonight or tomorrow, and commit the change? No reason it works for VMR and not for EVR! Thanks again!

Next time, can you please post a patch file on pastebin instead of code ? Thanks Smile


Don't worry, I'm always here, and I read everything, even if sometimes I don't answer! Wink


Hi,

I can create a patch file w/ TortoiseSVN, but I've added a lot of debug statements to the files, so it maybe seem a bit confusing to locate the changes. I am hoping that by posting codes that only take a line or two, they can be quickly implemented by other testers and then comment on whether or not they work. But for changes that are more than two lines, a patch file is the way to go.

In any case, I got a chance to test the display aspect ratio fix on a Windows 7 32bit machine using EVR, and they work fine.

FYI: on the Win7 machine, I turned off all vsync inside dsplayer (Vsync, Accurate Vsync, Alternative Vsync), using dsrenderersettings.xml, and used true full screen mode, and did NOT get any tearing. I did have the Aero desktop enabled though, as I said before.

The mpcvideodec.ax is still a bit problematic on the Win7 machine though. About 20% percent of the time the video freezes at the first frame (unlike my Windows XP machine, which is 100% of the time). Also, on the Win7 machine, with EVR, subtitle switching using the "L" key often freezes the video, though skipping forward fixes the freeze about 50% of the time (this does not happen at all on my XP machine, weird Rolleyes).


- Obi Have - 2010-05-31

In the newest build I'm suddenly having issues with the XBMC GUI. if I go to appearance and switch the skin it fixes it and I can switch it back it sticks, but later it will be corrupted again. It has worked fine until this build. Any ideas?

OK I figured out what causes it. It seems to be the display and/or receiver being turned off.

Ideas on how to stop it from happening?


- sentinel41 - 2010-05-31

hsinchu308 Wrote:Hi,

I can create a patch file w/ TortoiseSVN, but I've added a lot of debug statements to the files, so it maybe seem a bit confusing to locate the changes. I am hoping that by posting codes that only take a line or two, they can be quickly implemented by other testers and then comment on whether or not they work. But for changes that are more than two lines, a patch file is the way to go.

In any case, I got a chance to test the display aspect ratio fix on a Windows 7 32bit machine using EVR, and they work fine.

FYI: on the Win7 machine, I turned off all vsync inside dsplayer (Vsync, Accurate Vsync, Alternative Vsync), using dsrenderersettings.xml, and used true full screen mode, and did NOT get any tearing. I did have the Aero desktop enabled though, as I said before.

The mpcvideodec.ax is still a bit problematic on the Win7 machine though. About 20% percent of the time the video freezes at the first frame (unlike my Windows XP machine, which is 100% of the time). Also, on the Win7 machine, with EVR, subtitle switching using the "L" key often freezes the video, though skipping forward fixes the freeze about 50% of the time (this does not happen at all on my XP machine, weird Rolleyes).
Where do you place the dsrenderersettings.xml?


- hsinchu308 - 2010-05-31

sentinel41 Wrote:Where do you place the dsrenderersettings.xml?

In your special://masterprofile/ directory listed in your xbmc.log. For example, ...\Application Data\XBMC\userdata for Windows XP.


- tiben20 - 2010-05-31

hsinchu308 Wrote:Hi,

I can create a patch file w/ TortoiseSVN, but I've added a lot of debug statements to the files, so it maybe seem a bit confusing to locate the changes. I am hoping that by posting codes that only take a line or two, they can be quickly implemented by other testers and then comment on whether or not they work. But for changes that are more than two lines, a patch file is the way to go.

In any case, I got a chance to test the display aspect ratio fix on a Windows 7 32bit machine using EVR, and they work fine.

FYI: on the Win7 machine, I turned off all vsync inside dsplayer (Vsync, Accurate Vsync, Alternative Vsync), using dsrenderersettings.xml, and used true full screen mode, and did NOT get any tearing. I did have the Aero desktop enabled though, as I said before.

The mpcvideodec.ax is still a bit problematic on the Win7 machine though. About 20% percent of the time the video freezes at the first frame (unlike my Windows XP machine, which is 100% of the time). Also, on the Win7 machine, with EVR, subtitle switching using the "L" key often freezes the video, though skipping forward fixes the freeze about 50% of the time (this does not happen at all on my XP machine, weird Rolleyes).
Interesting, you should see the patch i have done a while ago i totally converted the mpc video decoder into xbmc but the only thing that is keeping me from posting it is the dxva not working due to the way mpc-hc is using a static link to ffmpeg. With the patch i didnt get those freeze of skip forward Tongue


- hsinchu308 - 2010-05-31

tiben20 Wrote:Interesting, you should see the patch i have done a while ago i totally converted the mpc video decoder into xbmc but the only thing that is keeping me from posting it is the dxva not working due to the way mpc-hc is using a static link to ffmpeg. With the patch i didnt get those freeze of skip forward Tongue

If by converting into xbmc you mean mpc video decoder becoming an internal decoder, like in dvdplayer or mpc-hc, which have built-in decoders, then yes, that would be interesting to see Nod

I downloaded the latest mpc video decoder and used it with dsplayer in Windows XP without freezing as well. So I guess the problem is not with dsplayer, but that particular version of MPCVideoDec.ax Rolleyes


- zilexa - 2010-05-31

If you are really planning to build-in the MPC decoder, will that be the newer version that also has DXVA for MPEG-2? Since march or april the svn versions have this feature, DXVA for VC-1, H.264 and MPEG-2.


- >>X<< - 2010-05-31

tiben20 Wrote:Interesting, you should see the patch i have done a while ago i totally converted the mpc video decoder into xbmc but the only thing that is keeping me from posting it is the dxva not working due to the way mpc-hc is using a static link to ffmpeg. With the patch i didnt get those freeze of skip forward Tongue

That might sound good to some but I hope we don't lose DSPlayer as it is now with the ability to use any audio/video codec you like Smile


- tiben20 - 2010-05-31

zilexa Wrote:If you are really planning to build-in the MPC decoder, will that be the newer version that also has DXVA for MPEG-2? Since march or april the svn versions have this feature, DXVA for VC-1, H.264 and MPEG-2.
They way xbmc is using ffmpeg adding the function for dxva is quite a challenge to just get it to compile. So i don't really know how much time it would take to get this to work. I spoke with tetsuo the project manager of mpc-hc and someone on their team is working on getting dxva1 integrated into ffmpeg as a hw context. This is actually what i would need to fix the decoder. I hope this guy will succeed.

>>X<<' Wrote:That might sound good to some but I hope we don't lose DSPlayer as it is now with the ability to use any audio/video codec you like Smile
The only reason why im coding this is to have everything built-in. Elupus told me at start that i cant include mpc-hc filters in the installation directly. So if i want the dsplayer to be able to handle as much type of video files as dvdplayer i have to code a video decoder an audio decoder and a demultiplexer. Right now the video and demuxer are really advanced and the audio decoder is not started yet.


- &gt;&gt;X&lt;&lt; - 2010-05-31

tiben20 Wrote:The only reason why im coding this is to have everything built-in. Elupus told me at start that i cant include mpc-hc filters in the installation directly. So if i want the dsplayer to be able to handle as much type of video files as dvdplayer i have to code a video decoder an audio decoder and a demultiplexer. Right now the video and demuxer are really advanced and the audio decoder is not started yet.

Sorry if I'm being thick so you are saying we would lose the ability to use other audio video codecs/filters like ffdshow, coreavc etc ?


- liquidskin76 - 2010-05-31

tiben20 Wrote:The only reason why im coding this is to have everything built-in. Elupus told me at start that i cant include mpc-hc filters in the installation directly. So if i want the dsplayer to be able to handle as much type of video files as dvdplayer i have to code a video decoder an audio decoder and a demultiplexer. Right now the video and demuxer are really advanced and the audio decoder is not started yet.

>>X<<' Wrote:Sorry if I'm being thick so you are saying we would lose the ability to use other audio video codecs/filters like ffdshow, coreavc etc ?

Hey tiben,

I'm guessing the ability to use directshow codecs won't change, just that the integrated codecs will allow a ready to go solution, without having to configure anything? If you know your stuff you can then configure and use other codecs?

Regarding the built in audio decoder, i'll donate £1,000,000,000 to you if include HD audio bitstreaming (TrueHD and DTS-HD)!!!! Nod Wink (albain over at 'Doom9/ffdshow hd audio' thread is the man to speak to!!).

Cheers mate