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 - Warner306 - 2016-05-17

(2016-04-15, 11:59)fritsch Wrote:
(2016-04-14, 19:35)Warner306 Wrote:
(2016-04-14, 18:02)ashlar Wrote: That's for DVDPlayer, not DSPlayer.

That's correct. And that changes the speed of the video to match the audio clock. ReClock, by comparison, syncs the audio to the video using the audio clock as the control.

I'm assuming changing the audio would be less noticeable than the video.

Nope. Sync Playback to Display uses the videoclock and adjusts audio to it by resampling on the fly. One cannot sync to a display when using "Audio Clock as base" ... Syncing to display makes only sense when not passthroughing audio of course. The old settings drop / dupe have gone as they causes major issues, especially the "dupe" one ... which confused AVRs.

This is what a Team Kodi member had to say about this issue.


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

(2016-05-17, 15:47)huhn Wrote: when using reclock. why are you wasting your time changing the video clock?

Indeed. When using reclock, just set madVR to use plain 24p for any content (24 or 23.976).
Reclock will adjust audio speed, you won't see the difference.
And you will have perfect fluid and synced video.

Not my personal choice though, I like to see on the AVR display what codec is used ^^


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

(2016-05-17, 14:28)hannes69 Wrote: There are two clocks running independently - the video clock and the audio clock. Reference clock is the audio clock. If both clocks are in sync (could be by accident but is normally not the case), perfect refresh rate would be a multiple of the frame rate. So for non-europe movies (24 / 1.001) * n Hz e.g (24 / 1.001) * 2 Hz = 47.95204795 Hz. For the real situation of non-sync clocks things change.
I take my computer as example. Madvr shows the clock deviation between the audio clock and the video clock (this is not changeable!). The value stabilizes after a 15 minutes playback of a movie (it takes some time due to the measurement method). In my case I have a clock deviation of -0.0026%, that´s -26ppm (parts per million) meaning the video clock is running 0.0026 % too slow in regards to the audio = reference clock. That means: In order to not have dropped or repated frames I have NOT to use the refresh rate of 47.95204795 Hz from above but a refresh rate of (1 - 0.0026%) * 47.95204795 Hz = 47.9508012Hz.
The factor is for all different framerates the same, so for e.g 29,97fps: 29,97 * (1 - 0.0026 %) * 2 = 59.93844156 Hz.
With CRU utility one can define custom resolutions to get VERY close to these calculated refresh rates.
In my case I have refresh rates for 23.976 / 24.000 / 25.000 / 29.970 fps movies exactly enough to have no single frame drop or repeat within 3 hours.
OMG! Thank you! One frame drop every 3.83 hours without Reclock after a couple of hours spent aiming for my 0.00246% clock deviation.

Why the heck isn't this info plastered all over the internet?


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

(2016-05-18, 18:19)ashlar Wrote:
(2016-05-17, 14:28)hannes69 Wrote: There are two clocks running independently - the video clock and the audio clock. Reference clock is the audio clock. If both clocks are in sync (could be by accident but is normally not the case), perfect refresh rate would be a multiple of the frame rate. So for non-europe movies (24 / 1.001) * n Hz e.g (24 / 1.001) * 2 Hz = 47.95204795 Hz. For the real situation of non-sync clocks things change.
I take my computer as example. Madvr shows the clock deviation between the audio clock and the video clock (this is not changeable!). The value stabilizes after a 15 minutes playback of a movie (it takes some time due to the measurement method). In my case I have a clock deviation of -0.0026%, that´s -26ppm (parts per million) meaning the video clock is running 0.0026 % too slow in regards to the audio = reference clock. That means: In order to not have dropped or repated frames I have NOT to use the refresh rate of 47.95204795 Hz from above but a refresh rate of (1 - 0.0026%) * 47.95204795 Hz = 47.9508012Hz.
The factor is for all different framerates the same, so for e.g 29,97fps: 29,97 * (1 - 0.0026 %) * 2 = 59.93844156 Hz.
With CRU utility one can define custom resolutions to get VERY close to these calculated refresh rates.
In my case I have refresh rates for 23.976 / 24.000 / 25.000 / 29.970 fps movies exactly enough to have no single frame drop or repeat within 3 hours.
OMG! Thank you! One frame drop every 3.83 hours without Reclock after a couple of hours spent aiming for my 0.00246% clock deviation.

Why the heck isn't this info plastered all over the internet?

Isn't that math wrong? If your refresh rate is too slow: 47.95204795, wouldn't the rate need to be larger not smaller (1 - 0.0026%) * 47.95204795 Hz = 47.9508012Hz. The video clock is now 0.0026% slower than the original.

So you are saying users should use the video refresh rate in madVR and multiply this by the clock deviation to determine the frequency for custom resolutions. I was always aiming for 23.976.


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

How would I correct these instructions:

Custom Resolutions

If you insist on bitstreaming, audio/video clock synchronization issues can be dealt with using a custom resolution. This method is unlikely to completely eliminate the problem like ReClock but can greatly improve the accuracy of the stock video clock.

Most GPUs struggle to lock-on to the 23.976 Hz refresh rate common to film and television. As a result, this is the refresh rate to focus on.

Open the custom resolution utility in the GPU control panel.

Image

Under Refresh rate, enter 23 Hz. Now we want to manually tweak the timing values to change the VSync slightly. A pixel or two is all that is needed – any value too high or too low will result in a blank screen.

Enter a detailed refresh rate of 23.976 Hz.

Next, I want to increase the display VSync interval slightly by removing two pixels from the Total pixels field under Vertical timings (1125 -> 1123). This will raise the frequency of the video clock.

Test and save the new custom resolution.

Image

The result of changing the vertical timing:
  • Before: 23.97152 Hz (1 frame drop every 3.90 minutes)
  • After: 23.97530 Hz (1 frame drop every 29.72 minutes)
Although the dropped frames counter in madVR is only an estimate, these values would imply 20 fewer frames will be dropped over the course of an hour and a half movie. That is a considerable improvement.


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

Hi Warner... I was baffled but I basically followed the instructions blindly... Having a +0.00246% clock deviation I aimed for 23.97661 refresh.

(24/1.001) * 1.0000246 = 23.976613786213786213786213786214

I managed, after several trials and errors to be very close to it and the result is, without Reclock, one frame repeat every 3.83 hours.


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

(2016-05-18, 19:45)ashlar Wrote: Hi Warner... I was baffled but I basically followed the instructions blindly... Having a +0.00246% clock deviation I aimed for 23.97661 refresh.

(24/1.001) * 1.0000246 = 23.976613786213786213786213786214

I managed, after several trials and errors to be very close to it and the result is, without Reclock, one frame repeat every 3.83 hours.

Ok, what parameters did you change in the custom resolution utility? And why are you altering the ideal refresh rate rather than the reported display refresh rate? Doesn't the clock deviation define how far you are from the reported display clock not the ideal clock rate?

In either case, I think my instructions are incorrect in some way.


RE: Kodi DSPlayer – DirectShow Player for Windows - huhn - 2016-05-18

the clock deviation is the difference between the video clock and the reference clock. which is usually the audio clock.

you are trying to get the clock deviation as close to zero as possible that all the "magic".
you are doing this with try and error.
if the video clock is to slow you are making it faster if it is to fast you make it slower.

and never forget using a custom resolution is kind of the same as overclocking you are running hardware outside of it's specs.
nothing should go wrong with small changes but this doesn't mean this is bulletproof. bigger changes can make huge problems!
people shouldn't be encouraged to blindly do this!

not sure if someone told you guys this before but you can speed up the clock deviation calculation speed by changing the audio volume rapidly. easily done using the mouse reel in mpc-hc.

and yet again aiming blindly at 24000/1001 (23.976) is a waste of time.


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

Quote:OMG! Thank you! One frame drop every 3.83 hours without Reclock after a couple of hours spent aiming for my 0.00246% clock deviation.

Why the heck isn't this info plastered all over the internet?

Glad I could help you Smile The info is in the internet, but splitted on several sources...

Quote:Isn't that math wrong? If your refresh rate is too slow: 47.95204795, wouldn't the rate need to be larger not smaller (1 - 0.0026%) * 47.95204795 Hz = 47.9508012Hz. The video clock is now 0.0026% slower than the original

There is some misunderstanding regarding the clocks, I explained that already but I try again Wink
In a computer different clocks are running. E.g. the audio clock and the video clock. They are running independently (if there would be ONE common clock, we wouldn´t have the described problem because there wouldn´t be a deviation then). You CAN´T change the speed of these clocks, they are simply running. They tick. Audio is being played back as multiples of the audio clock tick. Video is played back as multiples of the video clock tick. Once again: If the tick of the two clocks would be at the SAME rate (or whole number mutiples) then there would be no problem (why are there two clocks and not one clock you may ask: simple: the audio clock sits physically on the soundcard/integrated sound, the video clock sits on the videocard/integrated video, they are simpel quartzes)
Reference clock is the audio clock. So audio is always running fine. Now there is usually a mismatch between the video and the audio clock. Video is normally not speeded up or down on the fly, so what happens: Depending on the sign of the deviation frames are dropped or repeaten. We don´t like that.Wink
So e.g. madvr can do some kind of video-onthefly-speedup/down called Smoothmotion (I don´t explain the mechanism here). If you don´t use madvr or don´t want to use Smoothmotion there is the possibility of custom resolutions.
Coming back to the quote: No. it is not the video clock that is now 0.0026% slower. The audio clock and the video clock are still running at their same former speed. By a custom resolution you change the multiple of the video clock (that´s not perfectly correct in this way but easier to understand). So for the given example: The duration of one frame with no clock mismatch would be 1 / refresh rate = 1 / 47.95204795 Hz = 20.8542 ms (rounded). Now let´s assume on clock tick durates 1ns (nanosecond). So we would have 20.8542ms / 1ns ticks = 20854167 ticks. But we have in our example a -0.0026% mismatch so we would like (1 / 47.9508012Hz) / 1ns = 20854709 ticks. Keep in mind: the negative sign of the given mismatch says: the frequency of the video clock is slower than the frequency of the audio clock. So for the refresh period it is reverse: we need longer refresh period. And that´s now in the numbers: 20854709-20854167 = 542. That´s now the difference: We need 542 multiples more of the video clock tick time to get perfect playback without drops or repeats.


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

Warner, tomorrow I'll try to edit your text (here) with the corrections needed.

What I can safely say is that I'm now witnessing MPC-HC x86 with LAV Audio and Sanear bitstreaming. And madVR is reporting one frame drop every 4.55 hours.

I've been staring at my plasma in disbelief for ten minutes...


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

Hannes69, here is my result.

ELEVEN years I've been HTPCing and I understand this now...

Image

Clock deviation has now gone to 0.00242% (positive).

If I multiply 23.9760239 for 1.0000242 I get 23.976604196. My refresh is 23.97656, close enough to get these results (1 frame drop every 4.41 hours).

Is the reasoning correct? So frame drops for positive clock deviation, frame repeat for negative clock deviation?


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

Quote:So you are saying users should use the video refresh rate in madVR and multiply this by the clock deviation to determine the frequency for custom resolutions. I was always aiming for 23.976.
Posted by ashlar - Today 19:19
Not your video refresh rate - you take the right multiple of the video frame rate in your setup.

Typical example:

projector, refresh rates of 40 Hz - 70 Hz can be played back. So the multiple is 2.

23.976fps movies: 47.952 Hz
24.000fps movies: 48.000 Hz
25.000fps movies: 50.000 Hz
29.970fps movies: 59,940 Hz

Now you want the given refresh rate multiplied with your clock deviation: E.g. 59.940 Hz * (1 + xxx %) (xxx = deviation, can be positive or negative)

Quote:Most GPUs struggle to lock-on to the 23.976 Hz refresh rate common to film and television. As a result, this is the refresh rate to focus on.

No. The GPU struggles to lock-on perfectly to ALL possible refresh rates. E.g. with normal resolutions you don´t get perfect 59.940 Hz but 59.930 - 59.950 Hz. The problem is there with all refresh rates. And how I formerly explained: You even don´t want these perfect values because of the clock deviation.

Quote:Under Refresh rate, enter 23 Hz. Now we want to manually tweak the timing values to change the VSync slightly. A pixel or two is all that is needed – any value too high or too low will result in a blank screen.

Enter a detailed refresh rate of 23.976 Hz.

What you enter depends on your hardware. Most of the hardware can´t handle low refresh rates like 23.976 Hz (the *1 multiplier of the framerate). There are TVs which can handle frequencies in the 120Hz region (so a *4 of the framerate), projectors usually need the *2 multiplier, many TFT monitors can ONLY display 59.94Hz with a given "normal" resolution and don´t accept custom resolutions!
That´s a kind of lottery with your hardware: it can probably accept custom resolutions or not, you have to try. You have to try out which setting your hardware accepts. Maybe you can alter horizontal front porch, maybe vertical back porch, maybe by +/- 1 maybe by +/- 10 ...

Quote:And why are you altering the ideal refresh rate rather than the reported display refresh rate? Doesn't the clock deviation define how far you are from the reported display clock not the ideal clock rate?
I hope I answered the question in my last post Wink

Quote:you are trying to get the clock deviation as close to zero as possible that all the "magic"
Once again: NO. You CANNOT change the clock deviation. It may be zero by accident in one case, but normally it differs. Try it out: Make a custom resolution so your refresh rate changes. The number for the clock deviation in madvr is still the same...Big Grin

Quote:and never forget using a custom resolution is kind of the same as overclocking you are running hardware outside of it's specs.
nothing should go wrong with small changes but this doesn't mean this is bulletproof. bigger changes can make huge problems!
people shouldn't be encouraged to blindly do this!

Your statement implies that you could damage your hardware or a custom resolution is something dangerous. Simply NO. You can get distorted image / colors or the image freezes or your screen goes black, but it´s not dangerous and nothing is damaged. If you create a custom resolution that your device can´t display and made it default by accident, simply do a safe boot and revert the custom resolution.
The comparison with overclocking is bad. We don´t try to get 600Hz refresh rate out of a 60Hz device Cool


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

Hannes69, I edited my previous message. Tell me please if my reasoning is correct, as I'd like to try to help Warner in putting this in the right terms in his guide.

Warner you cannot act on the quartz themselves. This basically "cheats" your video card into providing the correct result by asking for a refresh rate that compensates for the two clocks difference.

BTW I just discovered that for 50Hz my GTX660 is outputting 50.00123 by default which pretty much compensates the clock deviation to perfection (no frame-drops/repeats expected).

But I seem to be unable to create a custom 59.940 resolution through the control panel (whereas I had no problem creating the 23.976 one). Nvidia *still* seems unable to implement this portion correctly after so many years.


RE: Kodi DSPlayer – DirectShow Player for Windows - huhn - 2016-05-18

(2016-05-18, 21:48)hannes69 Wrote: Your statement implies that you could damage your hardware or a custom resolution is something dangerous. Simply NO. You can get distorted image / colors or the image freezes or your screen goes black, but it´s not dangerous and nothing is damaged. If you create a custom resolution that your device can´t display and made it default by accident, simply do a safe boot and revert the custom resolution.
The comparison with overclocking is bad. We don´t try to get 600Hz refresh rate out of a 60Hz device Cool

so the damage warning is just for the lolz?


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

Quote:I've been staring at my plasma in disbelief for ten minutes...
Wonders can happen Big Grin

Quote:ELEVEN years I've been HTPCing and I understand this now...
It is not too difficult to understand when you think about the whole chain from beginning to end. In my opinion it is often described only half the way or too scientifically in the internet. Practically it is some piece of logic.
Better after eleven years than never Cool

Quote:Clock deviation has now gone to 0.00242% (positive).

I have observed that the deviation is temperature dependant (no joke!). But no wonder, it´s all electronics and so physics and so often temperature dependant. The value of the deviation in madvr stabilizes very fast in time (I´d say within 5 minutes). Now compare the value of the deviation with a cold fresh boot computer versus a several hours warm run computer (with graphic card used by e.g. watching a movie). You will detect a deviation of the value of the deviation Big Grin So take a mean value to be absolutely accurate (or take one custom resolution for summer and one for winter time Big Grin)

Quote:If I multiply 23.9760239 for 1.0000242 I get 23.976604196. My refresh is 23.97656, close enough to get these results (1 frame drop every 4.41 hours).

Is the reasoning correct? So frame drops for positive click deviation, frame repeat for negative clock deviation?
Your measured refresh rate is 23.97656Hz. Your ideal refresh rate is 23.97660Hz (within the number of decimates in madvr). So your measured rate is lower than the desired ideal rate. So in reverse your refresh period = 1 / measured refresh rate is too high = too long. These very little too long frames accumulate over time and in your case after 4.41 hours exactly one frame accumulates which now has to be dropped.
Short: measured refresh rate < (movie framerate * (1 + clock deviation)) -> frames drop
measured refresh rate > (movie framerate * (1 + clock deviation)) -> frames repeat

Quote:Warner you cannot act on the quartz themselves. This basically "cheats" your video card into providing the correct result by asking for a refresh rate that compensates for the two clocks difference.
Nice statement, this shows that you have understood the topic WinkWink

Quote:BTW I just discovered that for 50Hz my GTX660 is outputting 50.00123 by default which pretty much compensates the clock deviation to perfection (no frame-drops/repeats expected).
Sometimes one has pure luckBig Grin No work for this refresh rate...

Quote:But I seem to be unable to create a custom 59.940 resolution through the control panel (whereas I had no problem creating the 23.976 one). Nvidia *still* seems unable to implement this portion correctly after so many years

Depending on your output device you can of course try n * 29.97Hz with n >= 1 Laugh
Or you can use CRU utility which does the same and you don´t need to use the graphics vendor stuff.

One more hint:
You can use THIS PixelClockCalculator (highly recommended) to calculate exact values. If you are working with too many decimal places (e.g. 6) and get no results, try to lower it to 5 or 4. the "Parameters" depend on your device, for a first try leave them as they are.
Then, maybe you may detect, that the calculated refresh rate of this tool and when using it the shown value in madvr differ. This is due to the fact, that AMD in my case has problems to implement this thing right. I don´t know how accurate the results are with nvidia and intel. With my AMD card I get constant offsets of the calculated numbers, so I´m simply adding this offset at calculation time of the tool. You have to find out by yourself if you have such an offset.
If you spend some time on this and have some luck with your output device which should "eat" (how we in Germany say Laugh) all custom refresh rates, you will get "1 frame drops/repeat every year" in madvr Tongue (actually it shows ... days).
Good luck!

Bytheway ashlar, what´s your output device that works with the *1 multiple, it´s rare that a device works with refresh rates < 30Hz... Is it a projector?

Quote:so the damage warning is just for the lolz?
There are people who like to be on the SAFEST side. "DO NOT DRY YOUR CAT OR DOG IN THE MICROWAVE OVEN"
I am an electric engineer and know some of the electronics stuff. So: Your output device can do some crazy optical things or freeze/hang, but after repowering (power off - power on) everything is fine again.
Bytheway overclocking of computer components by itself doesn´t do the harm (I speak of processor, GPU, memory). If you clock too high it errors. Nothing more. The danger comes from too high voltage or too much heat. If you simple rise the clock you very soon come to a point where you have instability. So people rise voltage so rises the heat so the components are grilled. The overCLOCKING part is totally secure (if temperature is within allowed limits).
And thats the same logic with our custom resolutions. No voltage, no heat. And in this case even no OVERclocking, but some kind of exacter clocking for our wishes.
A damage warning in this context exists for the people who expect such a warning placed Wink