Kodi Community Forum
Kodi DSPlayer – DirectShow Player for Windows - 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: Kodi DSPlayer – DirectShow Player for Windows (/showthread.php?tid=223175)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524


RE: Kodi DSPlayer – DirectShow Player for Windows - hannes69 - 2016-05-23

Quote:Bingo! Thanks for mentioning that, turns out it was indeed Reclock messing with the numbers. The real deviation seems to be in the -0.00085 range so now I've just got a little math to do.
Yeah, I remembered there were some problems with Reclock. I formerly used that tool, but now with perfect refresh rates there´s no nedd for that.

Quote:I'm not sure if having PAL speed down is that necessary.
It depends if you are that sensitive to an audio pitch variation of three quarters of a half tone...Wink

Quote:I tried to tidy it up a little, adding information so as to make it a "one stop" read for people interested.
Great post! Many thanks for your effort, I know it´s taking quite some time to find good wordings and get together all the necessary information for a how-to.

Quote:A big thank you to hannes69 for all the knowledge he shared freely here.
Blush
Glad I could help. I think it is an important topic. Judder free playback is the base of high quality home cinema I think. When watching a movie for me personally it´s the most annoying problem that´s possible. Maybe there are small artefacts, maybe are colors a little off, that are things you can live with (within certain limits), but if there are video (or digital audio) drops the enjoyment factor of a movie goes down quite fast I think.

Quote:you can switch to DTD Calculator to have it calculate the refresh rate with more precision
This is a nice tool, but it is not necessary for the process. A simple pocket calculator (which has at least enough decimal places Big Grin) or the windows built in calculator is sufficient.
Why is that? Because there is one simple formula (and it´s already in the naming "pixel frequency" = the frequency of the pixels (and here the frequency of ALL pixels, the seen AND the unseen ones)

pixel frequency = total number of pixels * refresh rate = total horizontal pixels * total vertical pixels * refresh rate.

Example: Standard 1080p60 (1920 active horizontal pixels, 1080 active vertical pixels = 1080 lines, 60 Hz refresh rate): With standard timings there are 2200 total horizontal pixels, 1125 total vertical pixels and we have a pixel clock of 148.5 Mhz (Mhz = 1000000Hz). So: 148500000 / (2200 * 1125) = 60.00000000Hz.
Other example from my computer, the 23.976fps preset (I need *2 for my setup): Pixel clock 64.01Mhz, horizontal total 1648, vertical total 810:
64.01Mhz / (1648 * 810) = 47.95187582Hz. You can check that with DTD, it will show you the same Wink
(CRU from top to bottom horizontal: 1280 / 168 / 32 / 168 / 368 / 1648 ... vertical 720 / 42 / 6 / 42 / 90 / 810)

So to dig a little deeper into the materia:
The pixel clock IS the vieo clock. So by dividing the pixel clock with the horizontal and the vertical pixels we GET our refresh rate, it´s simple as that. If we could define a pixel clock with many decimal places, we could easily achieve a refresh rate with many decimal places accuracy. But unfortunately there is an operating system and/or graphics driver restriction so we only have 2 decimal places for the pixel clock. That´s not sufficient, I´ll show you that in the followeing example:
I have a preset with 64.01Mhz pixel clock as mentioned above. That leads to a referesh rate of 47.95188 Hz. Let´s assume that this would be a little bit too high. So we try to lower the pixel clock to 64.00Mhz. We get 47.94438Hz refresh rate. It´s obvious we now got miles away of the "right region".
And so the story goes on. It is the same story like we had with clock deviation and refresh rate, the two of them had to MATCH.
Now the total horizontal / vertical pixels and the pixel clock have to match.
You think we have won the game now? Let´s see what happens Big Grin

I take the example from my computer above and how I got there.
Madvr gives me -0.00236% clock deviation. So my ideal refresh rate would be 2 * (24/1.001) * ( 1 - 0.00236/100) = 47.95091628Hz.
So I take the pixel clock calculator and enter 1280 x720 @ 47.95092 Hz (5 decimal places are accurate enough and madvr shows not more decimal places for the measured refresh rate). At "Maximum decimal places (0-6)" we use 2 because that´s the number we need with CRU utility.
Now you get several results that you can use with CRU utility, you get a combination of pixel clock, horizontal total and vertical total. In my case 13 results with refresh rates between 47.95091 and 47.95093 Hz, accurate enough. Now comes trial and error with CRU. Some presets may be used, others not (there are upper and lower limits for the pixel clock, limits for horizontal and vertical totals and so on).
Now one preset works, no black screen, no distorted colors. You think you have won the fight right now. Not now.
I take one preset in CRU and of course I test it with madvr. I wanted and asked for 47.95092 Hz. What did I get ? 47.95193 Hz.Wrong math? Bad luck? No. I tried other presets, always the same. I got too low results. How much too low? Circa 0.0020% in every case. That´s not by accident. Remember? There was the thing with the clock deviation between audio and video clock. Because of the clocks not being acccurate. The video clock isn´t accurate (video clock = pixel clock). So what can we do? In my case the refresh rates were 0.0020% too low. That means my pixel clock is 0.0020% too low. So let´s compensate that. I aim for an ideal refresh rate that is 0.0020 % higher than the ideal calculated one. So:
aimed refresh rate = (1 + 0.0020 / 100) * 47.95091628Hz = 47.95188Hz.
Now the same like in the beginning. By entering this refresh rate in the pixel clock calculator you get the final presets.
I get my used preset of 64.01Mhz pixel clock, 1648 pixel total horizontal, 810 pixel total vertical. Entering this in CRU utility and testing with madvr I now get a measured refresh rate of 47.95091Hz. Look above, I wanted 47.95091628Hz, I got 47.95091Hz (5 decimal places shown in madvr).
NOW I have won the fightNod
At least for one custom resolution. But now lesser work has to be done because the factor you got here (in my case 0.0020%) is the same for all the other resolutions.
The factor we got here is the isolated part of the video side. The other factor was the combination of audio and video clock, the clock deviation.
With the pixel clock calculator you can work this way because there are EXACT numbers used for the pixel clock: When you read 64.01Mhz in the pixel clock calculator that´s not 64.01Mhz rounded, it is 64.010000000000 Mhz! But on the other side if you enter 64.01Mhz in CRU utility, that´s not 64.01000000000Mhz in my case, but it is 0.0020% less, so 64.0087198Mhz.

Quote:With all these instruments... let's say we could be flying a little less blindly.
When you take into account what I explained in this post above, you are flying straight to your goalCool

The only things that remain are:
- temperature dependant fluctuations
- depending on your display device it is very easy or a pain in the a.. to find working custom resolutions
- there isn´t (at least at the moment) an automated procedure for that. You have to manually fiddle around with CRU, madvr, pixel clock calculator and a pocket calculator
- you have to understand the instructions given hereBig Grin

Beside that you are awarded with judder-free video playback!

Maybe ashlar can still work a little bit on his how-to and bring light to the dark of trial&errorWink


RE: Kodi DSPlayer – DirectShow Player for Windows - hannes69 - 2016-05-23

Quote:If using reclock, there is no need to create a custom res in order to try and compensate A&V clocks deviation, because reclock is realtime synching the video to the audio, and therefore will procure a perfect A/V synchronisation.
Am I right?
Yes. Reclock is TOUCHING the audio so you have perfect sync and so no dropped or repeated frames.
If you have problems with Reclock, don´t like it or you don´t want to TOUCH the audio, you can do what is described here. With the method described here you don´t manipulate on video or audio, you are using a "trick" instead (that is a little bit complicated by it´s nature) which doesn´t influence the base materials video and audio but plays with timings.
To explain it short: The trick works with the fact, that during video presenting there are not only the pixels we actually see but there are in addition "black" pixels outside the shown range (after each line and after each whole frame). We can force to show more or less of these black pixels (which takes more or less time) to manipulate the refresh rate to compensate the video/audio mismatch (=clock deviation). If there wouldn´t exist these black pixels, the trick couldn´t be done.

As I mentioned earlier, the a/v sync problem exists on every computer and there are 3 possible solutions to work around that:
- reclock (manipulating audio)
- madvr smoothmotion (manipulating video)
- custom resolutions (the method described here using black pixels)

The 3 solutions each has it´s own advantages and disadvantages. It´s up to you to choose. The method described here is the "cleanest" but it is more complex to achieve than the other two...


RE: Kodi DSPlayer – DirectShow Player for Windows - djoole - 2016-05-23

Thanks for this useful info Smile


RE: Kodi DSPlayer – DirectShow Player for Windows - mrchisholm - 2016-05-23

i'm sorry for the noob question but i'm unable to playback blu-ray using dsplayer .. whenever i try i get the following error in the log

19:41:06 T:1164 ERROR: CFGLoader::LoadFilterRules Extension "mpls" not found. Please check mediasconfig.xml
19:41:06 T:1164 ERROR: CFGManager::RenderFileXbmc Failed to load filters rules
19:41:06 T:1164 NOTICE: thread end: CDSGraphThread::OnExit()
19:41:06 T:6228 ERROR: CDSPlayer:Tonguerocess - Failed creating DS Graph
19:41:06 T:5872 ERROR: Playlist Player: skipping unplayable item: 0, path [bluray://E%3a%5c/BDMV/PLAYLIST/00800.mpls]

what am i doing wrong Sad


RE: Kodi DSPlayer – DirectShow Player for Windows - Warner306 - 2016-05-23

(2016-05-23, 19:49)mrchisholm Wrote: i'm sorry for the noob question but i'm unable to playback blu-ray using dsplayer .. whenever i try i get the following error in the log

19:41:06 T:1164 ERROR: CFGLoader::LoadFilterRules Extension "mpls" not found. Please check mediasconfig.xml
19:41:06 T:1164 ERROR: CFGManager::RenderFileXbmc Failed to load filters rules
19:41:06 T:1164 NOTICE: thread end: CDSGraphThread::OnExit()
19:41:06 T:6228 ERROR: CDSPlayer:Tonguerocess - Failed creating DS Graph
19:41:06 T:5872 ERROR: Playlist Player: skipping unplayable item: 0, path [bluray://E%3a%5c/BDMV/PLAYLIST/00800.mpls]

what am i doing wrong Sad

Are you playing a disc? You need to break the encryption by running DVDFab Passkey or RedFox AnyDVD (HD) in the background. This will certainly work with MPC-HC. I haven't tested DSPlayer. But this is known to work with DVDPlayer and Kodi.


RE: Kodi DSPlayer – DirectShow Player for Windows - ashlar - 2016-05-24

Anybody using Nvidia with custom resolutions through HDMI could please check whether they're losing support for HD audio formats when using custom resolutions? Even ones created normally through Nvidia Control Panel.

You can check under Control Panel/Sound/Properties/Supported Formats.

As soon as I switch to a custom resolution, I lose Dolby True HD, DTD HD-MA and 192 Khz across all formats.
And losing 192KHz means not even being able to select LAV for decoding.


RE: Kodi DSPlayer – DirectShow Player for Windows - mrchisholm - 2016-05-24

(2016-05-23, 23:48)Warner306 Wrote:
(2016-05-23, 19:49)mrchisholm Wrote: i'm sorry for the noob question but i'm unable to playback blu-ray using dsplayer .. whenever i try i get the following error in the log

19:41:06 T:1164 ERROR: CFGLoader::LoadFilterRules Extension "mpls" not found. Please check mediasconfig.xml
19:41:06 T:1164 ERROR: CFGManager::RenderFileXbmc Failed to load filters rules
19:41:06 T:1164 NOTICE: thread end: CDSGraphThread::OnExit()
19:41:06 T:6228 ERROR: CDSPlayer:Tonguerocess - Failed creating DS Graph
19:41:06 T:5872 ERROR: Playlist Player: skipping unplayable item: 0, path [bluray://E%3a%5c/BDMV/PLAYLIST/00800.mpls]

what am i doing wrong Sad

Are you playing a disc? You need to break the encryption by running DVDFab Passkey or RedFox AnyDVD (HD) in the background. This will certainly work with MPC-HC. I haven't tested DSPlayer. But this is known to work with DVDPlayer and Kodi.

yes it's a disc but mounted with virtual clonedrive and already stripped of encryption with anydvd. i figured with the options avalible for blu-ray in the dsplayer menu playback would be possible, i haven't tried dvdplayer or external player yet.


RE: Kodi DSPlayer – DirectShow Player for Windows - vicmanpergar - 2016-05-24

isn't a clock deviation of 0.00001% too small?

I just wanted to try and swtiched off my reclock to see the data madvr was getting. Clock deviation was varying between 0.00003 to 0.00009 till at something like 20 mins in the movie, it got stuck at 0.00001% (going to 0.00002% from time to time).
Other data was:
Display 23.99999Hz
Composition rate:24.000Hz
Movie 23.976 fps
1 frame repeated every 41.76 secs


RE: Kodi DSPlayer – DirectShow Player for Windows - ashlar - 2016-05-24

(2016-05-24, 02:28)ashlar Wrote: Anybody using Nvidia with custom resolutions through HDMI could please check whether they're losing support for HD audio formats when using custom resolutions? Even ones created normally through Nvidia Control Panel.

You can check under Control Panel/Sound/Properties/Supported Formats.

As soon as I switch to a custom resolution, I lose Dolby True HD, DTD HD-MA and 192 Khz across all formats.
And losing 192KHz means not even being able to select LAV for decoding.
An update to this. It has to do with front porch values. I'll update later with more complete info.


RE: Kodi DSPlayer – DirectShow Player for Windows - ashlar - 2016-05-24

(2016-05-24, 12:14)vicmanpergar Wrote: isn't a clock deviation of 0.00001% too small?

I just wanted to try and swtiched off my reclock to see the data madvr was getting. Clock deviation was varying between 0.00003 to 0.00009 till at something like 20 mins in the movie, it got stuck at 0.00001% (going to 0.00002% from time to time).
Other data was:
Display 23.99999Hz
Composition rate:24.000Hz
Movie 23.976 fps
1 frame repeated every 41.76 secs
Were you playing without sound? You need to have an active audio renderer going, otherwise that's what I usually get.


RE: Kodi DSPlayer – DirectShow Player for Windows - vicmanpergar - 2016-05-24

(2016-05-24, 15:56)ashlar Wrote:
(2016-05-24, 12:14)vicmanpergar Wrote: isn't a clock deviation of 0.00001% too small?

I just wanted to try and swtiched off my reclock to see the data madvr was getting. Clock deviation was varying between 0.00003 to 0.00009 till at something like 20 mins in the movie, it got stuck at 0.00001% (going to 0.00002% from time to time).
Other data was:
Display 23.99999Hz
Composition rate:24.000Hz
Movie 23.976 fps
1 frame repeated every 41.76 secs
Were you playing without sound? You need to have an active audio renderer going, otherwise that's what I usually get.

No no, it was with sound.
I uninstalled GeForce Experience, and repeated the test, and this time it gave me -0.00003% , still low i guess


RE: Kodi DSPlayer – DirectShow Player for Windows - ashlar - 2016-05-24

(2016-05-24, 16:04)vicmanpergar Wrote: No no, it was with sound.
I uninstalled GeForce Experience, and repeated the test, and this time it gave me -0.00003% , still low i guess
Are you using Reclock as audio renderer with bistream formats accepted? Because I am seeing pretty much the same thing. Reclock messes up with madVR clock deviation calculations. Try using the internal renderer of MPC-HC in recent builds (it's Sanear, basically), it allows for WASAPI bitstreaming and you could use that to calculate the clock deviation. Once you know the value and set up the refresh rates correctly, you can use Reclock with bitstreaming, as (at least this is how I understand it) Reclock does not mess up with the actual sound/video reproduction, it just stops madVR from calculating correctly (but the calculation is just that, a calculation, the clock deviation is there whether madVR is displaying/calculating it or not).


RE: Kodi DSPlayer – DirectShow Player for Windows - vicmanpergar - 2016-05-24

I do have Reclock, but selected System Default instead in DSPlayer
I don't think Reclock is opening if it is not selected...or do u think it is?
Besides... when I use Reclock as the audio renderer, there're no drops or repeated frames. Yesterday it said 1 dropped frame every 18 hours or similar
I tried to install Sanear yesterday, but it's just a zip file, and didn't find a how-to.


RE: Kodi DSPlayer – DirectShow Player for Windows - hannes69 - 2016-05-24

Quote:An update to this. It has to do with front porch values.
Yeah, I think they are doing dirty tricks with audio within video like we are doing here with black pixels... So one trick influences the other oneCool

Quote:isn't a clock deviation of 0.00001% too small?

I just wanted to try and swtiched off my reclock to see the data madvr was getting. Clock deviation was varying between 0.00003 to 0.00009 till at something like 20 mins in the movie, it got stuck at 0.00001% (going to 0.00002% from time to time).
Other data was:
Display 23.99999Hz
Composition rate:24.000Hz
Movie 23.976 fps
1 frame repeated every 41.76 secs
The clock deviation can´t be too small or too big or anything like that, it is a simple matter of fact, it is as it as and we have to cope with it.
As I mentioned earlier, you can have lucky numbers by chance.
By taking the formula in this previous post we can check the plausibility of your given numbers.
I see no problem, your given numbers look plausible. With the given movie framerate the clock deviation and the display refresh rate you even get exactly the given time of 1 frame repeat every 41.76sec as given when using the formula in the given previous post.
Of course there could be something strange in your setup (plausible numbers aren´t ALWAYS indicating that everything is normal, it´s only some kind of indication).
Maybe Reclock is still running, or are you running smoothmotion in madvr?
Beside that you would have a perfect refresh rate for 24.000fps movies (which are sadly rare in your case).

Quote:Besides... when I use Reclock as the audio renderer, there're no drops or repeated frames. Yesterday it said 1 dropped frame every 18 hours or similar
That is expected when running Reclock, no drops or repeats.


RE: Kodi DSPlayer – DirectShow Player for Windows - vicmanpergar - 2016-05-25

No, I'm not running smoothmotion in madvr....
I'll try to do better tests tomorrow. I'm thinking, there's some setting in ReClock which indicates if running or not with certains apps, and might be that the source of the problem (if any).
Thanks both of u.