Log in

View Full Version : Media Player Classic Home Cinema (MPC-HC) - DXVA!


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

madshi
6th January 2009, 17:39
I have investigated this now and in ATI drivers > 8.10 the video controls works ONLY when rendering with DXVA.
The video controls may not work without DXVA, but still BTB and WTW are missing. Even with driver version 8.12. That is if you output YCbCr. If you output RGB, always PC levels are used. There's no way to make the graphics card use video levels. Which is fine for computer monitors, but not so good for TVs. The Haali Renderer can output RGB in both PC levels and video levels. When outputting video levels, BTB and WTW information is still there with the Haali Renderer. No way to do this with VMR or EVR (with ATI), regardless of whether DXVA is used, even with 8.12.

leeperry
6th January 2009, 17:52
Yes exactly, I guess that the best bet here is creating a new audio render with WASAPI exclusive mode in Vista, if this doesn't work I would simply change the output mode configured in Windows.
James(the new Reclock coder) is seeing what can be done about WASAPI support in Reclock.....but KS already bypasses KMixer so we do have bit-perfect audio available in XP/Vista atm.
Even in "Original speed" mode when rendering spdif data it will drop and add audio frames and slightly change the speed of the audio. If it didn't it would be perfect, unfortunately it's not open source so I can't go in and fix the issues or add WASAPI exclusive mode. It also fails to reliably detect my refresh rate. The only feature that I need from it is it's ability to fix the broken ATI DTS passthrough clock and possibly 25->24 fps movie conversion. Reclock seems to cause many other issues so it might be good to have a new audio render that only does the least amount of damage to the sound.
well, you need to be *spot-on* 47.952 if you don't wanna have any dropped/duped audio frames....it works, and there's explanations at the end of the Reclock readme.
I can play a 2H movie and get 0 dropped/0 duped S/PDIF frames :)
Reclock works perfectly fine as it is, just like HR....I really don't see what you guys wanna fix about them :confused:

I've had both nvidia/ATi cards, and Reclock has always been working flawlessly(detecting 48.000/50.000/59.940Hz)....anyhow movies are shot in 24fps, I wanna watch them at the right speed(not 23.976 or 25) and in their native gamut(SMPTE-C or EBU).
* Found the Reclock deadlock and implemented a workaround.
oh cool! :thanks:
You're drooling over how good video is then. That's fine. But your audio is being resampled all the time. Maybe you're not bothered by that, but I am.

Now that you mention it, I'd *love* to have an audio renderer which works like any other audio renderer, but uses kernel streaming. Something like ReClock, but without all the audio manipulation stuff...
well Reclock does support KS, and anyhow I've got some MME drivers for my M-Audio card that bypass KMixer :o
and if your soundcard has E-WDM drivers(AudioTrak/ESI), you can even internally rewire DS/MME to ASIO :

http://img181.imageshack.us/img181/5332/directwirepk5.jpg

anyway, there isn't a thousand solutions :
-live with 23.976@60Hz judder w/o Reclock, and possible A/V desync and randomly dropped frames(maybe less sync probs with HDMI audio indeed)
-run in 47.952Hz(spot-on!) and enable S/PDIF pass-through mode
-enable internal resampling so the audio follows the graphic card drift.....it kills a bit of SQ but as we say in france "you can't quite make an omelet w/o breaking eggs" :D

you complain about Reclock resampling in bit-perfect mode(KS/ASIO).....yet you apparently watch your movies in DS(where the audio is constantly resampled by the windows Kernel in a pretty ugly way :o )

leeperry
6th January 2009, 18:01
The Haali Renderer bypasses all this ATI driver sh*t by pretending to not display video but by displaying games (I think). So ATI isn't tempted to do violence to the "video" data, anymore. The nice thing about the Haali Renderer is that is bypasses all these ugly video manipulations (face color "improvements", non-defeatable noise "reduction" and detail "enhancement", color "correction", etc etc etc) which otherwise are hard or even impossible to turn off. That isn't limited to ATI, NVidia and Intel also have similar problems, but not as bad as ATI, I think.
fully agreed, HR never drops frames and doesn't let the graphic card drivers/m$ screw up with the PQ. I really can't stand how EVR/VMR9 add ugly sharpening/EE to the picture.
LSF does a far better job than these cheapo algorithms :devil:

tetsuo55
6th January 2009, 18:01
The video controls may not work without DXVA, but still BTB and WTW are missing. Even with driver version 8.12. That is if you output YCbCr. If you output RGB, always PC levels are used. There's no way to make the graphics card use video levels. Which is fine for computer monitors, but not so good for TVs. The Haali Renderer can output RGB in both PC levels and video levels. When outputting video levels, BTB and WTW information is still there with the Haali Renderer. No way to do this with VMR or EVR (with ATI), regardless of whether DXVA is used, even with 8.12.

This is the levels problem

Video = 16-235
Desktop = 0-255

Every colorspace except for RGB will result in the videocard assuming the image is 16-235
The results vary between OS, Renderer, Videocard and driver version.

The image will either be:
-16-235 resulting in white and black crush
-Converted to 0-255 resulting in an accurate blacks/whites
-Converted badly to 0-255 resulting in wrong blacks/whites

In Some cases there are multiple lossy conversions

There are 3 usage scenarios:
1. PC monitor is used, this expect all images to be 0-255
2. A full range TV is used which also expects 0-255
3. A Limited range TV is used which expects 16-235

In case 1 and 2 all video must be converted to 0-255

Case 3 is more difficult, currently there are several approaches but no matter wicht one you choose either desktop or video is degraded.

In treat my system as a scenario 1, and in the end tell the videocard to convert 0-255 to 16-235, this results in video being converted at least twice


---------

The solution is to expand all content to 0-255, regardless of renderer/colorspace in a consistant manner accros all videocards/drivers
For non-postprocessing/hardware decoding/Hardware deinterlacing scenarios outputting in RGB32 can solve this problem

leeperry
6th January 2009, 18:06
@Beliyaal: I wonder if MPC HC's HR presenter could be made even more right on time ? maybe by relying on the PMTimer ? the less jitter the better :o

Reclock enforces highly accurate timings(especially with HPET on Vista), but it would appear that either the splitters or the presenters create quite a lot of jitter(that HR has to compensate with its frame cache in the graphic card's RAM)

rack04
6th January 2009, 18:06
How do you detect dropped/duped audio frames?

Beliyaal
6th January 2009, 18:09
The video controls may not work without DXVA, but still BTB and WTW are missing. Even with driver version 8.12. That is if you output YCbCr. If you output RGB, always PC levels are used. There's no way to make the graphics card use video levels. Which is fine for computer monitors, but not so good for TVs. The Haali Renderer can output RGB in both PC levels and video levels. When outputting video levels, BTB and WTW information is still there with the Haali Renderer. No way to do this with VMR or EVR (with ATI), regardless of whether DXVA is used, even with 8.12.

I think that the changes the ATI driver does is done BEFORE the samples arrive at the renderer, as when I set ffdshow to YUV output the controls work in EVR but not VMR9.

Isn't it a bit moot anyway? As you still loose the color resolution when converting to RGB32 in Haali or the EVR and VMR9 renderers? Windows 7 is supposedly going to support non RGB output modes. It might be possible to do this already with fullscreen Direct3D.

tetsuo55
6th January 2009, 18:12
I think that the changes the ATI driver does is done BEFORE the samples arrive at the renderer, as when I set ffdshow to YUV output the controls work in EVR but not VMR9.

Isn't it a bit moot anyway? As you still loose the color resolution when converting to RGB32 in Haali or the EVR and VMR9 renderers? Windows 7 is supposedly going to support non RGB output modes. It might be possible to do this already with fullscreen Direct3D.

Colorspace conversion can be lossless if we can control the conversion instead of the videocard driver

(SD/HD and PAL/NTSC all have different RGB primaries, i doubt the drivers account for them all)

leeperry
6th January 2009, 18:13
How do you detect dropped/duped audio frames?
Reclock's control panel tells you so :)
only if you're right on 47.952Hz you can play 23.976fps S/PDIF w/o any duped/dropped frames.

ByeByeBluRay
6th January 2009, 18:22
VS2008 does not support the inline assembly that libavcodec contains. You need to build it with MinGW GCC to get decent decoding performance. You can find an easy to use installer for MinGW in the first post of the large ffdshow topic.


Thanks - I'll give that a go. :D

BBBR

madshi
6th January 2009, 18:25
Reclock works perfectly fine as it is, just like HR....I really don't see what you guys wanna fix about them :confused:
With decoded audio data (i.e. when not using bitstream) even if you match audio/video clocks *perfectly*, ReClock still resamples the audio all the time. I consider that BAD. It might be a lot less bad than what the XP kernel mixer does, but it's still bad.

anyway, there isn't a thousand solutions :
-live with 23.976@60Hz judder w/o Reclock, and possible A/V desync and randomly dropped frames(maybe less sync probs with HDMI audio indeed)
-run in 47.952Hz(spot-on!) and enable S/PDIF pass-through mode
-enable internal resampling so the audio follows the graphic card drift.....it kills a bit of SQ but as we say in france "you can't quite make an omelet w/o breaking eggs" :D
You make it sound as if without ReClock you're forced to run at 60Hz. That's just plain wrong. My graphics card runs at exactly 24.000/1.001Hz and I have fluid Blu-Ray playback without using ReClock and without audio getting out of sync. Maybe I get 1-2 dropped/repeated video frames per movie, or maybe not. If so, I don't ever notice them. I think my audio/video clocks are matched up pretty well. The only reason why I would ever use ReClock is to get KS. But even if I wanted to, ReClock doesn't work for me. At least last time I tried it didn't work, because I have to use MPC's Fullscreen mode to avoid tearing and ReClock doesn't (or didn't) work correctly in that mode.

you complain about Reclock resampling in bit-perfect mode(KS/ASIO).....yet you apparently watch your movies in DS(where the audio is constantly resampled by the windows Kernel in a pretty ugly way :o )
I'm not claiming to have the ultimate playback solution right now. I'm not happy at all with not having KS/ASIO. But what we're talking about here is the ultimate solution we are planning for. And that ultimate solution does not include resampling for me. What is missing for my luck is a standalone KS audio renderer and a Haali Renderer with Fullscreen mode. Oh, and those improvements Beliyaal is planning to do... :)

Kurtnoise
6th January 2009, 18:26
@Beliyaal : any chance to share your patches ?

Beliyaal
6th January 2009, 18:32
Reclock's control panel tells you so :)
only if you're right on 47.952Hz you can play 23.976fps S/PDIF w/o any duped/dropped frames.

That may be. I pretty confident I have the refresh good enough. With the new sync visualisation the sync is a staight line without Reclock. With it it drifts and SPDIF frames are dropped/added. The only explanation is that Reclock does something wrong. What is needed in Reclock is that it doesn't do ANYTHING to the audio when you tell it to not do anything to it.

Edit: When I select KS streaming I don't get any audio output at all. I use HDMI audio from Radeon HD 4870. Is this supposed do work in Vista?

leeperry
6th January 2009, 18:36
@Beliyaal : one thing that lacks big time in MPC as well is the damn FS gui :(
if you could put like ANYTHING else than these ugly win95 buttons/seek position icon...this would be heaven! I'm even willing to provide them :D

If you use AC3/DTS bitstream over SPDIF and have no dropped/repeated audio frames then ReClock has exactly NULL use for you. You'd get exactly the same thing without ReClock, if your audio/video clocks are matched that well. The kernel mixer doesn't affect bitstream audio!
well I don't use S/PDIF, I mostly ran it to see if I could achieve 0 duped/dropped frames....meaning I was "spot-on" 48.000Hz(I tried with a 24fps native movie)
I know some ppl will disagree with you on that, only Reclock can force windows to keep the A/V sync w/o dropping/duping video/audio frames.

With decoded audio data (i.e. when not using bitstream) even if you match audio/video clocks *perfectly*, ReClock still resamples the audio all the time. I consider that BAD. It might be a lot less bad than what the XP kernel mixer does, but it's still bad.
well it sounds good to me :D
if you really can't stand the idea of having your audio resampled, get a RME soundcard and manually change the masterclock...it works perfectly!

You make it sound as if without ReClock you're forced to run at 60Hz. That's just plain wrong. My graphics card runs at exactly 24.000/1.001Hz and I have fluid Blu-Ray playback without using ReClock and without audio getting out of sync. Maybe I get 1-2 dropped/repeated video frames per movie, or maybe not. If so, I don't ever notice them. I think my audio/video clocks are matched up pretty well. The only reason why I would ever use ReClock is to get KS. But even if I wanted to, ReClock doesn't work for me. At least last time I tried it didn't work, because I have to use MPC's Fullscreen mode to avoid tearing and ReClock doesn't (or didn't) work correctly in that mode.
Reclock works perfectly fine with the D3D exclusive mode of MPC....just set it to DDR instead of D3D, but I already asked James to set it as default a while ago anyway ;)
video dropped frames ruin my experience, I can't stand them...everyone's got his own priorities :)

What is missing for my luck is a standalone KS audio renderer and a Haali Renderer with Fullscreen mode. Oh, and those improvements Beliyaal is planning to do... :)
HR in FS mode, what would be the point ? as you know HR is a D3D renderer already, just it doesn't work in exclusive mode where all menus become m00t :o

madshi
6th January 2009, 18:36
The solution is to expand all content to 0-255, regardless of renderer/colorspace in a consistant manner accros all videocards/drivers
I don't consider that a "solution". IMHO it's just a bad workaround. Spreading the content to PC levels and then converting it back to video levels for output can introduce artifacts (banding). Furthermore BTB and WTW are clipped that way. Both of which is bad.

I think that the changes the ATI driver does is done BEFORE the samples arrive at the renderer
How would that even be possible? The ATI driver isn't involved if a non-DXVA decoder decodes video in software mode and then passes the result to the next DirectShow filter in the chain. As far as I can see, the only places where the ATI driver even has a chance to participate is when DXVA is used, or when the renderer finally sends the data to the graphics driver...

Isn't it a bit moot anyway? As you still loose the color resolution when converting to RGB32 in Haali or the EVR and VMR9 renderers?
What do you mean? I want to have all of ATI's (and NVidia's and ...) driver based video manipulation routines disabled in my playback chain. I want to have BTB and WTW kept intact and no harm done to my precious video data. And this is simply not possible with ATI 8.12 when using VMR7/9 or EVR.

Edit: Or maybe I'm wrong? Maybe not using DXVA and sending RGB32 to the renderer results in BTB and WTW not being clipped? Not sure myself right now...

Beliyaal
6th January 2009, 18:39
Colorspace conversion can be lossless if we can control the conversion instead of the videocard driver

(SD/HD and PAL/NTSC all have different RGB primaries, i doubt the drivers account for them all)

It can't possibly be lossless. Converting from YUV to RGB24 will require the RGB32 values to be rounded. You might be able to preserve the colors not representtable in RGB24 by using 16-235 space however, you still get banding.

leeperry
6th January 2009, 18:39
That may be. I pretty confident I have the refresh good enough. With the new sync visualisation the sync is a staight line without Reclock. With it it drifts and SPDIF frames are dropped/added. The only explanation is that Reclock does something wrong. What is needed in Reclock is that it doesn't do ANYTHING to the audio when you tell it to not do anything to it.

Edit: When I select KS streaming I don't get any audio output at all. I use HDMI audio from Radeon HD 4870. Is this supposed do work in Vista?
well it's all about what the detected refresh rate is in Reclock....you need to use pstrip to finetune it to perfection.
you can't expect Reclock to keep the audio untouched and keep perfect A/V sync if your refresh rate is not *spot on* :o
some sound cards drivers don't support KS, I got KS working in Vista with my M-Audio soundcard.

BTW, as I said above do you think you could make HR's presenter in MPC more right on time ? like relying on the PMtimer so it doesn't create any unwanted jitter ? :)

madshi
6th January 2009, 18:45
I know some ppl will disagree with you on that, only Reclock can force windows to keep the A/V sync w/o dropping/duping video/audio frames.
Wrong. If audio/video clocks are perfectly matched, Windows keeps A/V sync just fine without any dropped/repeated audio or video frames.

if you really can't stand the idea of having your audio resampled, get a RME soundcard and manually change the masterclock...it works perfectly!
Well, does the RME soundcard have a HDMI output? Otherwise I would have DAC going on in the soundcard and ADC going on in the audio processor/receiver. I don't want that, either.

Reclock works perfectly fine with the D3D exclusive mode of MPC....just set it to DDR instead of D3D
Had tried that, but the framerate is not detected correctly that way on my PC.

video dropped frames ruin my experience, I can't stand them...everyone's got his own priorities :)
I'm not sure if I have any. Maybe I don't. Or maybe I just don't notice.

HR in FS mode, what would be the point ? as you know HR is a D3D renderer already, just it doesn't work in exclusive mode where all menus become m00t :o
The point is that I'm having tearing with all good renderers (even when using ReClock), if I don't use the fullscreen mode. This is probably caused by me using the secondary graphics card output port for HTPC purposes. I've been told that this is an usual setup. Probably the tearing (and also ReClock not being able to read the framerate correctly in DDR mode) is caused by me using the 2ndary port.

tetsuo55
6th January 2009, 18:46
I guess we do need to find a better solution for the levels and colorspace conversion problems

Probably best if we continue that part of the conversation in this thread:
http://forum.doom9.org/showthread.php?t=143689

We need to find a way of near-lossess colorspace and levels conversion.

From ANY to (a very limited range of targets)

Beliyaal
6th January 2009, 18:50
well it's all about what the detected refresh rate is in Reclock....you need to use pstrip to finetune it to perfection.
you can't expect Reclock to keep the audio untouched and keep perfect A/V sync if your refresh rate is not *spot on* :o
some sound cards drivers don't support KS, I got KS working in Vista with my M-Audio soundcard.

Trust me, it is perfect (I use PStrip). An external sound card isn't really an option for me since I use my receiver for audio output, and going with analog pre-in I loose the room equalization and lots of other things like 5.1> 7.1 expansion.

BTW, as I said above do you think you could make HR's presenter in MPC more right on time ? like relying on the PMtimer so it doesn't create any unwanted jitter ? :)

As far as I know I can't do anything about HR render as it's not IN mpc. It's an external filter that is included with the Haali splitter installer. And timer precision isn't even an issue. You don't drive a video renderer off an external clock, you drive it from the audio clock, which is what I have changed the EVR renderer to do. As long as it's a couple of times more accurate than the Refresh rate it doesn't matter.

The jitter in the new renderer is about non existant when you have synced refresh rate (a couple of micro seconds).

leeperry
6th January 2009, 18:59
Trust me, it is perfect (I use PStrip). An external sound card isn't really an option for me since I use my receiver for audio output, and going with analog pre-in I loose the room equalization and lots of other things like 5.1> 7.1 expansion.
oh I very much trust you :D
well if you wanna use the room eq then you can't bypass the new Vista KMixer I think....anyhow it works in 32float on Vista, it's not nearly as bad as the XP KMixer that resamples everything in 16integer :eek:
if you got 47.952 detected in Reclock, you should be able to achieve S/PDIF pass-through....but then there won't be any room eq I think.
As far as I know I can't do anything about HR render as it's not IN mpc. It's an external filter that is included with the Haali splitter installer. And timer precision isn't even an issue. You don't drive a video renderer off an external clock, you drive it from the audio clock, which is what I have changed the EVR renderer to do. As long as it's a couple of times more accurate than the Refresh rate it doesn't matter.

The jitter in the new renderer is about non existant when you have synced refresh rate (a couple of micro seconds).
what "new renderer" are you referring to exactly ? custom EVR ?

well HR is one thing, still media players need to run their own presenter to go from the splitter to the video renderer I think ?
like for instance HR in ZP6 is terrible, their presenter is completely unusable due to terrible jitter :eek:

and do you think you could let us choose the FS transport bar color/buttons/seek position icon ? these things are so ugly :(

leeperry
6th January 2009, 19:05
Wrong. If audio/video clocks are perfectly matched, Windows keeps A/V sync just fine without any dropped/repeated audio or video frames.
maybe in HDMI indeed, but anyway I only trust Reclock for my own movies.
yet I know ppl like BitMonster & jong use Reclock in S/PDIF mode, and I believe they did their homework before deciding to do so.

Well, does the RME soundcard have a HDMI output? Otherwise I would have DAC going on in the soundcard and ADC going on in the audio processor/receiver. I don't want that, either.
RME soundcards are higly professional equipment...they mostly provide you with balanced HQ analog outputs, and let you change the masterclock on the fly.

Had tried that, but the framerate is not detected correctly that way on my PC.
I'm sure the Reclock community might help you troubleshooting that.
I've had both nvidia/ATi cards, and Reclock has always worked flawlesslly...feel free to PM me if you want, we should be able to work it out ;)

The point is that I'm having tearing with all good renderers (even when using ReClock), if I don't use the fullscreen mode. This is probably caused by me using the secondary graphics card output port for HTPC purposes. I've been told that this is an usual setup. Probably the tearing (and also ReClock not being able to read the framerate correctly in DDR mode) is caused by me using the 2ndary port.
well Reclock doesn't stop tearing...it's mostly a speed problem related to the motherboard it would appear....or sometimes dual display as you say.
I personally use the primary output to my CRT and secondary to my projector, and I switch back & forth between the two...I never use both at the same time and everything works as it should :)

Casimir666
6th January 2009, 19:14
I think that the changes the ATI driver does is done BEFORE the samples arrive at the renderer, as when I set ffdshow to YUV output the controls work in EVR but not VMR9.

I'm not sure of this. When video came out from the video decoder from a software decoder, there is no ATI video processing.
Let do this test : set contrast to 0 in ATI - CCC, and open a video with subtitle with EVR. There is no video (black), but subtitle are visibles.
So in my opinion, all ATI processing is done by EVR (or VMR), but before sample arrived to "custom presenter (or renderless code).
Surface given have all processing (YUV->RGB convertion, edge enhancement, ...). If I'm right this could explain why D3DPRESENTFLAG_VIDEO have no effect in MPC (because it's done too late).

leeperry
6th January 2009, 19:16
in my opinion, all ATI processing is done by EVR (or VMR), but before sample arrived to "custom presenter (or renderless code).
Surface given have all processing (YUV->RGB convertion, edge enhancement, ...). If I'm right this could explain why D3DPRESENTFLAG_VIDEO have no effect in MPC (because it's done too late).
I'm quite sure that the ugly EE made by EVR(or maybe the ATi drivers) is processed *after* the RGB32 mixer....as it doesn't show on screenshots :o

Casimir666
6th January 2009, 19:44
There is a lot of post about A/V sync today. Let me expose my point of view about this.

For me, the root of the problem is that the video card clock is different from the audio card clock (it's physical, 2 separate electronic circuits). Since perfection didn't exist in electronics, those two clocks shift a little each second. So to keep audio and video synchronised, there is two basic solutions :
- drop some audio samples, but human didn't like this (create high frequency glitch)
- drop some video samples, or if you are a little wise play one sample a little more early or a little too late. This cause jitter, but it is better than audio glitch

When Microsoft conceive DirectShow, they decide to give priority to audio. Audio renderer have the reference clock, and video should do his best effort to keep sync. The author or reclock was irritated by this video jitter, and have the idea to invert priority : let the video renderer play his frame at the video board clock, and resample the sound to keep sync. That's why he written an audio renderer.

But, maybe there is another solution. Video clock can be modify quite easily i think, that's what Power Strip do (with very small steps). I'm pretty sure it's possible to change the video clock rate very slightly (let's says +/-0.5 Hz), without having any noticeable jitter effect. And this is easier to do that resample sound (with possible quality loss).

Casimir666
6th January 2009, 19:53
I'm quite sure that the ugly EE made by EVR(or maybe the ATi drivers) is processed *after* the RGB32 mixer....as it doesn't show on screenshots :o
This is not incompatible with my words.

Beliyaal
6th January 2009, 20:08
But, maybe there is another solution. Video clock can be modify quite easily i think, that's what Power Strip do (with very small steps). I'm pretty sure it's possible to change the video clock rate very slightly (let's says +/-0.5 Hz), without having any noticeable jitter effect. And this is easier to do that resample sound (with possible quality loss).
I Agree. As I said earlier I plan to add support for controlling refresh rate in powerstrip through mpc-hc. You can't however just use any frequency as tv:s/monitors only support certain frequences. So you would have to specify which you want the renderer to choose from. Also you have to be much more accurate than 0.5 Hz. The 0.033 difference between 24 and 23.976 is much to much. This causes a stutter every 30 seconds.

leeperry
6th January 2009, 20:24
This is not incompatible with my words.
I didn't say it was ;)

@Beliyaal: so do you think MPC's HR presenter could be more right on time ? maybe basing its timings on PMtimer ? or is it what you called the "new renderer" ?

and changing the seek position icon would be awesome too, we're not in 1995 anymore...but you're the bo$$ :D

anyhow, a friend of mine is having the seeking deadlock with Reclock+HR all the bloody time...he's dying to try your new build!

:thanks:

I Agree. As I said earlier I plan to add support for controlling refresh rate in powerstrip through mpc-hc. You can't however just use any frequency as tv:s/monitors only support certain frequences. So you would have to specify which you want the renderer to choose from. Also you have to be much more accurate than 0.5 Hz. The 0.033 difference between 24 and 23.976 is much to much. This causes a stutter every 30 seconds.
what Casimir doesn't say is that one of his best friends IRL is ogo, the original author of Reclock....so these 2 guys might very well have some dirty tricks up their sleeve :devil:

bira
6th January 2009, 20:38
Hello everyone, I finally taken the time to setup MPC-HC for development so I can fix a couple of issues that have been irritating me for a long time.


Great !!

You could look at the problem mentioned some time ago.

"I am having the same flashing problem with my PCI-e ATI 3650 card. Running XP and Catalyst 8.10 and MPC build 906

Picture flashes back a bit, sometimes macroblocks appear, sometimes pictures flashes back and forth and get stuck in a loop."

madshi
6th January 2009, 20:48
Hey guys,

I have to correct myself. I claimed earlier that it's not possible to get full BTB and WTW output with VMR/EVR with an ATI card. I was wrong. Feeding VMR/EVR with RGB32 does make BTB and WTW work. I'm sorry for the confusion.

tetsuo55
6th January 2009, 20:55
Great !!

You could look at the problem mentioned some time ago.

"I am having the same flashing problem with my PCI-e ATI 3650 card. Running XP and Catalyst 8.10 and MPC build 906

Picture flashes back a bit, sometimes macroblocks appear, sometimes pictures flashes back and forth and get stuck in a loop."

I'm hoping his fixes will adres these problems

Amour
6th January 2009, 20:57
ICL Build by DeathWolf for x86
Build number: 1.2.953.0
MPC Compiler: VS 2008
FFmpeg Compiler: VS 2008

mplayerc_rev953_[x32]_[dw_build_icl-msvc9_mixed].rar (http://saber.kawaii-shoujo.net/Various/mplayerc_rev953_%5Bx32%5D_%5Bdw_build_icl-msvc9_mixed%5D.rar)

Merkie
6th January 2009, 22:14
Simple question, how do I get MPC to start up automatically with a pan & scan preset? Everytime I restart MPC the pan & scan settings have been reset to their default state.

I ask this because my mother's TV doesn't accept 1360x768 as a resolution, it only accepts 1280x768. No biggie, I created a pan & scan preset which resizes the vertical height of the image by 111% (*1.1111111), but I've got to activate this preset everytime I startup MPC.

So, how do I let MPC always use my newly created pan & scan preset? I don't think my mother will be able to understand why and how she has to fix the image (no disrespect here, but you know how mothers are).

Leak
6th January 2009, 22:57
But, maybe there is another solution. Video clock can be modify quite easily i think, that's what Power Strip do (with very small steps). I'm pretty sure it's possible to change the video clock rate very slightly (let's says +/-0.5 Hz), without having any noticeable jitter effect. And this is easier to do that resample sound (with possible quality loss).
Are you sure that's going to work?

Even tiny refresh rate changes in PowerStrip cause just about any display device that I know to re-sync, which means that the screen goes blank for a few seconds - if it does that all the time (or even once) while playing video it's not really useful...

np: Tocotronic - Wie Wir Beide Nebeneinander Auf Dem Teppichboden Sitzen (Digital Ist Besser)

ADude
6th January 2009, 22:59
But, maybe there is another solution. Video clock can be modify quite easily i think, that's what Power Strip do (with very small steps). I'm pretty sure it's possible to change the video clock rate very slightly (let's says +/-0.5 Hz), without having any noticeable jitter effect. And this is easier to do that resample sound (with possible quality loss).

I have to say that that would be a feature that would benefit far more people than DXVA, since it would affect all video playback.

Casimir666
6th January 2009, 23:22
Questions
[INDENT]Why is m_rtTimePerFrame twice the time it should be? Have to divide by 2 on many places?

I think i have understand : to have the fps at the input of mixer, you should ask him the input type. The IMFMediaType given to CreateProposedOutputType is the mediatype after mixing :



CComPtr<IMFMediaType> pInputType;
m_pMixer->GetInputCurrentType(0, &pInputType);
pInputType->GetRepresentation (FORMAT_MFVideoFormat, (void**)&pAMMedia));
VideoFormat = (MFVIDEOFORMAT*)pAMMedia->pbFormat;

.../...

ADude
6th January 2009, 23:22
It probably does not work due to SPDIFER. Have you tried without it?

SPDIFER is just a subset of AC3FILTER, in other words, a simplified version that just outputs to SPDIF:

http://ac3filter.net/projects/spdifer

Vorbis loads a filter that converts to PCM and also AC3FILTER itself that takes the PCM and outputs it to the spdif.

SPDIFER is used literally hundreds of times by my HT-PC and MPC to playback videos with never one problem.

PS VLC includes internal selection of multiple audio streams, and can select either the Vorbis or the DTS stream in this file, but cannot pass the DTS intact to the spdif.

mark0077
6th January 2009, 23:30
Just a note to the developer. I have a DVD, Star Wars Ep.3 that has never given audio trouble before, but with the latest mpc-hc build, using the internal decoders, the movie itself gives horrible beeping and blipping sounds. It sounds like mario...

There is no problem using dts or no problem playing this movie with ffdshow audio so I think some recent changes has caused this.

Regards,

yesgrey
6th January 2009, 23:31
With decoded audio data (i.e. when not using bitstream) even if you match audio/video clocks *perfectly*, ReClock still resamples the audio all the time.
you can use reclock without any resampling. Just set media adaptation speed to "original speed" and check the " slave reference clock to audio" option. The resampler is completelly bypassed, you can see the "bit exact" words appear in reclock's dialog.
I'd *love* to have an audio renderer which works like any other audio renderer, but uses kernel streaming. Something like ReClock, but without all the audio manipulation stuff...
I would like that too. You see, using reclock like above gives me no resampling, but there is still a problem with it, the master clock is the video cards clock, and I want the audio renderer to be the master clock.
I can set the clock of my sound card (RME FF400) with 1Hz resolution, so, it's possible to correct the pitch in PAL movies without any resampling, is just setting the sound card clock to 46080Hz (the DAC is done at a lower sampling rate),and the video will play at 24fps, with perfect pitch audio and zero cpu load increase.
With the directshow audio renderer, this works, but I also get kmixer.
With reclock in KS setup like above, I bypass kmixer, but reclock keeps the video at the original frame rate (25fps), so, the audio loose sync.:(
I also have thougt about creating an audio renderer, but don't have yet enough knowledge to do it. I hope that beliyaal's weekend is "long" enough to create this audio renderer!...;)

To be honest, I have found the an audio renderer that works as I want...
My sound card has MME drivers that bypass kmixer, and I have discovered that MPlayer has an audio output mode using the MME drivers, so I can have all the above. But there is a down side... the video part is not developed like what we get currently with mpc-hc and ffdshow...:(

leeperry
6th January 2009, 23:41
With reclock in KS setup like above, I bypass kmixer, but reclock keeps the video at the original frame rate (25fps), so, the audio lose sync.:(
I also have thougt about creating an audio renderer, but don't have yet enough knowledge to do it. I hope that beliyaal's weekend is "long" enough to create this audio renderer!...;)
buddy I keep telling you that this other guy from HCFR's got it working perfectly fine in slave mode in MPC HC with your soundcard....I even showed you screenshots, whether you wanna PM him is another story :D

Seb.26 has been working on a media player(yMP) with its own custom A/V renderers, I can send you a beta version if you like. mostly it plays the movie at an exact multiple of the refresh rate(23.976 or 25@48Hz), then would resample the audio accordingly....it's smooth as silk :eek: but it's pretty buggy, Seb.26 told me that not everyone has Haali's knowledge(as D3D video playback is full of dirty little secrets :rolleyes: )

ogo has always been very clear that Reclock would require a video renderer of its own to be fully synced(not missing the VSYNC and stuff)...at this point getting the A/V streams synchronised on a HTPC sends back to the story of the 2 cars trying to drive at the exact same speed for 2H straight = JITTER :o

Beliyaal
6th January 2009, 23:50
I think i have understand : to have the fps at the input of mixer, you should ask him the input type. The IMFMediaType given to CreateProposedOutputType is the mediatype after mixing :



CComPtr<IMFMediaType> pInputType;
m_pMixer->GetInputCurrentType(0, &pInputType);
pInputType->GetRepresentation (FORMAT_MFVideoFormat, (void**)&pAMMedia));
VideoFormat = (MFVIDEOFORMAT*)pAMMedia->pbFormat;

.../...



I looked into it and it seems the interlaced flags are lost in the DShow to MF transition. I have solved it in the patch that I will send you ASAP.

Amour
6th January 2009, 23:57
Just a note to the developer. I have a DVD, Star Wars Ep.3 that has never given audio trouble before, but with the latest mpc-hc build, using the internal decoders, the movie itself gives horrible beeping and blipping sounds. It sounds like mario...
Help -> About
Which latest version are you talking about, please?

Casimir666
6th January 2009, 23:59
I looked into it and it seems the interlaced flags are lost in the DShow to MF transition. I have solved it in the patch that I will send you ASAP.

Well the interlaced flag is not necessary : fps it ok using mediatype on GetInputCurrentType.
But if you have another solution it's ok ;)

yesgrey
7th January 2009, 00:25
buddy I keep telling you that this other guy from HCFR's got it working perfectly fine in slave mode in MPC HC with your soundcard....I even showed you screenshots, whether you wanna PM him is another story :D

As I told you, I don't think he is, and the screenshots you showed me were not meaningfull, as I have also told you. Tell him to try with 25->24fps. 23.976->24 is too small a difference to see that it's not working. I have PM him on 26/12, still no answer...:(

I can send you a beta version if you like.
If he doesn't mind, send it to me, I'd like to try it, but since he is resampling... is it possible to disable the resampling?

flanger216
7th January 2009, 00:36
Edit: When I select KS streaming I don't get any audio output at all. I use HDMI audio from Radeon HD 4870. Is this supposed do work in Vista?

This used to trip me up as well. On my machine, I had to specifically set which "Device to Use With Kernel Streaming" under the audio settings in the main configuration page. Leaving it on '<Default Device>' doesn't work at all.

But yeah, if you could add an exclusive-mode renderer to MPC-HC, you'd be some sort of god for us audiophiles. Reclock is fine and all, but it'd be great to finally lay it to rest: constant resampling is an unideal workaround, and it gums up those of us who'd rather use 64-bit builds (Reclock, of course, remains x86 only).

Mark_A_W
7th January 2009, 02:57
The point is that I'm having tearing with all good renderers (even when using ReClock), if I don't use the fullscreen mode. This is probably caused by me using the secondary graphics card output port for HTPC purposes. I've been told that this is an usual setup. Probably the tearing (and also ReClock not being able to read the framerate correctly in DDR mode) is caused by me using the 2ndary port.

Madshi, I can run MPC HC in Fullscreen mode (EVR custom) on my secondary monitor with Reclock working fine. I watched Hellboy in this configuration the other night - to see if Fullscreen mode is smoother than Haali in MPC HC or Zoom Player.

Reclock is set to D3D from memory...it's set to whatever doesn't give the error in fullscreen mode :)

I have an Ati HD2600XT, and I run ffdshow or Coreavc video decoders in RGB32 mode.

I use ffdshow for most audio. But with flac I run Madflac (thanks) feeding ffdshow audio which upconverts to 32bit integer....which then allows Kernel Streaming in Reclock to work for 24 bit material (thanks Yesgrey).


So it can be done.

I'm not sure what hardware you have though...

Mark_A_W
7th January 2009, 03:14
Edit: When I select KS streaming I don't get any audio output at all. I use HDMI audio from Radeon HD 4870. Is this supposed do work in Vista?


If you are playing 24bit audio you may have to upconvert to 32bit integer using ffdshow....but I don't know about HDMI.

73ChargerFan
7th January 2009, 05:07
Ahhh, the sweet life. I just watched Wall-E blu-ray downstairs on my HP 56" DLP set, using MPC-HC. Check this out:

My only BD drive is on my upstairs computer (fish). I shared the drive across the network. I'm using XP MCE with AnyDVD-HD.

From fish, I browse the network to \\fish\bddrive\BDMV\STREAM and sort by file size. I create a shortcut of the largest file (22gb) into my movies directory and renamed the shortcut "Wall-E (insert blu-ray disk)". Then from downstairs, I go to \\fish\movies and double click on the Wall-E shortcut.
Tahh Dahh! THANK YOU THANK YOU THANK YOU.

This works only for movies which are in one file, and (for me) best with DTS-HD with bitstreams the core using spdifer to my receiver for decoding. I had been ripping all my bd movies (thank you madshi) but can now play almost all of them this way, and delete probably > 1TB of rips.

On another topic...

Oh, that htpc is an AMD 4600X2 with ATI 4850 display card and Windows XP MCE. I almost always have mpc-hc set to display using overlay, because every other output gives me tearing, even with std definition mpg2 & divx5 files. When I have a movie with forced subtitles (Kill Bill comes to mind) I change to VMR9 Direct3D Fullscreen. Afterwards, I have to switch back to overlay. Please don't remove support for it.

73ChargerFan
7th January 2009, 05:16
Beliyaal -

The built-in DTS renderer over spdif stutters and goes in and out for 1536k dts streams on regular audio and on motherboard audio. I don't know if this is the same issue you are experiencing with your hdmi audio. I and others have had this problem, so I use Spdifer (http://ac3filter.net/projects/spdifer) instead. You might try it on your system. My XP MCE machine has an ATI 4850, and the audio on it is realtek hda, the same as on the motherboard.

I think the issue is with mpc-hc, not the ati / realtek hda drivers.

Stuttering occurs with .ts .avi & .mkv files, using built-in and haali splitters, but only with 1536 dts streams. 700k dts & all ac3 streams are fine.

73ChargerFan
7th January 2009, 05:51
Wall-E, track 20002.m2ts remuxed to .TS with tsMuxer 1.8.8 (see mediainfo below).

Seeking hangs occasionally. Sometimes waiting will fix it, other times I have to randomly select another seek point.

MPC-HC 918, internal source filter & h264 DXVA, VMR9 renderless.

VMR7 renderless doesn't seem to have this problem.

Haali splitter hangs almost 50% of the time.

Is this a problem with the splitter then?

http://savedonthe.net/image/168/20002-mediainfo.jpg