Log in

View Full Version : LAV Filters - DirectShow Media Splitter and Decoders


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

madshi
20th August 2017, 20:44
I'm not sure if that's my problem or LAV's problem? Could be that my D3D11 pixel shader is somehow not compatible with DX9 GPUs. Or could be that the D3D11 device created by LAV needs to be created with different flags? I don't know. nevcairiel, what do you think?

nevcairiel
20th August 2017, 20:45
No idea without any hardware at hand. I can go dig in my GPU bin to see if i still have something that old but yet still with decoding support.
Check with EVR if copy-back works, as one intermediate step? That'll tell you if decoding works.

The best, er.., worst, I can do is apparently a GTX 260-216, which is a DX10 GPU. Will test that tomorrow.

Great Dragon
20th August 2017, 22:09
Hello,

Is it OK that using NVIDIA CUVID decoder makes GPU to run on maximum performance (clock speed)?
While using regular DXVA renderer a GPU performs in regular Desktop Mode. I'm using GTX 1070.

Do I have some control over CUVID Renderer settings?
And what's the difference between CUVID and DXVA ?

strumf666
20th August 2017, 22:43
D3D11 native on intel HD2500 (I5 3470) works for me if that helps. Win 10 pro & Potplayer 64bit; intel drivers 10.18.10.4425
On a very quick test for H264, cpu utilization is a few % lower than on dxva2 copyback, but render times are much higher.

aufkrawall
20th August 2017, 23:30
Is it OK that using NVIDIA CUVID decoder makes GPU to run on maximum performance (clock speed)?

That's normal for all CUDA apps, CUVID unfortunately isn't an exception.
DXVA2/D3D11VA on the other hand will give you lower GPU clocks than even CPU decoding with madVR because the driver apparently chooses lower clock speeds when hardware decoding is going on than without.

I don't really see any reason to use CUVID anymore. imho both CUVID and QuickSync probably could even get removed out of LAV Filters in favor of the new D3D11VA decoding.
It's probably not too harsh when you say that CUVID and the used QuickSync decoder are end of life or even already dead.

aufkrawall
21st August 2017, 02:10
With new build, I can confirm that selecting IGP for decoding works with D3D11VA, great. :)
Buuut: Would it be possible to make copyback selectable like for DXVA2? Or do that automatically when a device is selected which is not the primary graphics adapter?
Kinda odd that it currently only works with renderers which refuse direct D3D11VA connection.

AngelGraves13
21st August 2017, 02:22
VC-1 playback doesn't work for me with DX11 LAV Video (0.70.2-45 nightly) and madvr 0.92.1b. Can someone else confirm this on their end? My GPU is a 1080 Ti. DXVA2 N and CB work fine. Also, software works fine too, as well as CUDA.

nevcairiel
21st August 2017, 08:55
Would it be possible to make copyback selectable like for DXVA2? Or do that automatically when a device is selected which is not the primary graphics adapter?

I didn't want a seperate entry in the decoder box because that doesn't allow seamless fallback between Native and Copy-Back.

However I have changed it now to only use Native when you select "Automatic" and updated the instruction hint to that effect. It probably makes the most sense to always obey user settings, and for testing purposes its probably a good thing as well.

VC-1 playback doesn't work for me with DX11 LAV Video (0.70.2-45 nightly) and madvr 0.92.1b. Can someone else confirm this on their end? My GPU is a 1080 Ti. DXVA2 N and CB work fine. Also, software works fine too, as well as CUDA.

VC-1 works just fine here. Make sure you don't use way too many buffers (ie. input queue size in madVR), it can sometimes cause decoding failures.

I should probably put an artificial limit in place for VC-1, it seems to be more affected by this then the others, but I would generally not recommend to use extremely large decoder queues in madVR either way.

aufkrawall
21st August 2017, 13:58
I think with native hardware decoding, it's safe to stick to a queue which is as short as possible on the GPU side (aka 4 frames with madVR).
With a short GPU/presentation queue, there are sometimes presentation glitches reported after the playback started, but I haven't yet seen any at a later time. + it also reduces input lag when e.g. changing volume via mouse wheel.
However, setting CPU queue (isn't it actually a D3D11VA queue in our case?) to only 4 frames as well gives me some weird intensive stuttering which is not detected by madVR's stats. It already seems to be gone with 5 frames, but for safety I set it to 8.

Only 12 more hours till next nightly build. :o

nevcairiel
21st August 2017, 14:08
4 is probably too short, especially because it also limits the GPU queues then, I would go with 8 or 16 at most personally.

I've been thinking about more strictly limiting the maximum number of surfaces in all cases to something reasonable like 32 (which is used for VC-1 now). There is a hard limit of 127 (ie. 7-bit), which is required for DXVA to function at all, but using that many buffers really has no advantages in native mode.

AngelGraves13
21st August 2017, 19:38
VC-1 works just fine here. Make sure you don't use way too many buffers (ie. input queue size in madVR), it can sometimes cause decoding failures.

I should probably put an artificial limit in place for VC-1, it seems to be more affected by this then the others, but I would generally not recommend to use extremely large decoder queues in madVR either way.

I have them both maxed in madvr. 24 for GPU and 128 for CPU. It looks better for smooth motion, but a limit should be put in place if it's a problem in DX11. Why does it work fine in every other mode with large queues except DX11? Is it a bug? Software, CUVID, DXVA2 Native and Copy-Back all work fine with 128 queue.

I also get random freezes if I pause and attempt to play a video with DX11, especially if I skip to a certain timecode and then pause. The player MPCH-HC locks up under DX11, but DXVA2 Native and Copy-Back have no issues.

nevcairiel
21st August 2017, 20:44
The CPU queue doesn't affect anything with smooth motion. Don't buy into snake oil explanations. :p
Such a huge CPU queue has zero benefit, just eats up your memory and makes seeking/startup slower.

el Filou
21st August 2017, 20:52
I watch a lot of DVB, and sometimes there are errors in the feed due to bad reception and I find that when this happens, having a bigger decoding queue smoothes things out a bit (i.e. the hiccup due to lost packets is less brutal), but nothing quite as big as 128 (I use 24).

aufkrawall
22nd August 2017, 03:06
It works like a charm now, nev. Very cool tech, thanks for making it possible!
I thought my Skylake IGP wouldn't be able to decode HEVC 10 bit, but apparently it is (with high GPU usage, so likely hybrid).

Goeggel
22nd August 2017, 08:20
No hardware acceleration with 4K videos

I have been looking around the web for possible solutions and have fiddled with the settings, but haven't had any luck so far. When playing 1080p videos, I get hardware acceleration and LAV shows my GTX 980 as active hardware device.

However when playing 4K videos (for example Exodus or Life of Pi HDR demos), no active hardware device is shown. Is this a known issue?

Windows 7 64bit
Nvidia GTX 980 384.94
LAV 0.70.2 / DXVA Copy-Back
madVR 0.92.1
Zoom Player 13.5 Max

LigH
22nd August 2017, 08:36
Not every graphic chipset supports hardware accelerated decoding for every video format (AVC/HEVC, Profile@Level + several specific encoding complexity attributes) in every resolution. There are limits.

nevcairiel
22nd August 2017, 08:45
The 980 doesn't have full HEVC decoding, and no HEVC 10-bit at all, which would be required for those HDR demos. Like LigH said, older hardware doesn't support all newer formats.

huhn
22nd August 2017, 12:52
is d3d11 headless mode also planned for the next release?

so i take the nightly 0.70.2.49 as a yes.
fantastic feature very useful!

aufkrawall
22nd August 2017, 18:42
One more observation regarding queue length + madVR:
DXVA deinterlacing really doesn't like a small GPU queue. When I set it to 4 and presentation queue is 4 frames as well, I'm getting framedrops. Setting GPU queue to 8 seems to be enough to avoid drops with DXVA interlacing.

nevcairiel
22nd August 2017, 19:04
Yeah 4 might be too short, but 8 is fine, or even 16 if you must, with an absolute maximum of 32. Anything above that seems wasted.

aufkrawall
22nd August 2017, 20:42
I noticed two issues with the current nightly:
-YADIF doesn't work for VC-1 interlaced (without software deinterlacing, LAV reports interlaced content properly to renderer).
-When changing the YADIF setting when LAV config is opened via MPC HC filter list, it makes the player invisibly hang in background after closing.

VictorLS
22nd August 2017, 21:51
For people who still like WinXP - last working version of subj is LAVFilters-0.70.2-16 and it's a pity (as all non-modified LAV Video Decoders) it can't hardware decode H265 10bit via CUVID on nVIDIA's GM206-based videocards - it seems nevcairiel too hard understand how it was made working (but it's just few strings of code).
Next installer LAVFilters-0.70.2-29.exe says "This program does not support the version of Windows your computer is running."
Best regards.

aufkrawall
22nd August 2017, 21:55
Btw: What's the reason for the brief corruption after seeking in HEVC 10 bit video? It happens with both software and hardware decoding, but not in the Windows 10 video app.

sneaker_ger
22nd August 2017, 21:57
Container (TS?)? Sample?

The FFmpeg TS demuxer does not offer such functionality (it doesn't know what kind of frames are in the stream, since thats codec dependent information and mpeg-ts itself does not carry such flags), and I do not currently plan to work on this myself.
I could maybe hide the frames (like h264 does) if that makes you feel better? :) It would still start decoding a "proper" image at the same spot as it does now though.

MPEG-TS is generally not a format you should expect "perfect" seeking on, because the format itself has basically no seeking support. Even finding the appropriate timecode in the file is already a slow process, and with broadcast streams can even be really annoying (ie. with wrap-around).

nevcairiel
22nd August 2017, 22:10
-YADIF doesn't work for VC-1 interlaced (without software deinterlacing, LAV reports interlaced content properly to renderer).


That should be fixed.


-When changing the YADIF setting when LAV config is opened via MPC HC filter list, it makes the player invisibly hang in background after closing.

I can't reproduce that. All settings changes are really quite equal, change the value, save it. It doesn't do anything special for those settings.

aufkrawall
22nd August 2017, 22:37
Container (TS?)? Sample?
You nailed it, both tested files have TS container. Thanks.


I can't reproduce that. All settings changes are really quite equal, change the value, save it. It doesn't do anything special for those settings.
I can always provoke it by turning YADIF off in a paused video and then close MPC HC.

nevcairiel
22nd August 2017, 23:05
Seems like an odd way to do things, but I've found a work-around for the issue.

mitchmalibu
24th August 2017, 22:04
Hey, great work on LAV filters. I did have a quick question though.

Using a youtube clip downloader (https://yd.3dyd.com/), I downloaded a 60fps 4K clip on youtube (https://www.youtube.com/watch?v=ArPP6_QXqyQ) and watched it with the latest LAV + madvr available using D3D11 hardware decoding. It worked perfectly, lav video reporting that the active decoder is D3D11 native and madvr OSD showing the DXVA11 flag. I also tried to download another 60fps 4K clip, but with HDR (https://www.youtube.com/watch?v=GTGm7mye-_4). The file isn't hardware decoded, LAV video showing that avcodec is active. Both files are straight from youtube so encoded with VP9.

Is this an expected behaviour ?

Thanks !

sneaker_ger
24th August 2017, 22:08
For HDR Youtube provides VP9 10 bit - for SDR only 8 bit. 1070 cannot decode VP9 10 bit. So if you downloaded the VP9 10 bit stream that should be the reason.

LigH
24th August 2017, 22:11
Not every graphic chipset supports hardware accelerated decoding for every video format (AVC/HEVC, Profile@Level + several specific encoding complexity attributes) in every resolution. There are limits.

Sorry for shameless self-quote :p – and yes, VPx is another issue, in relation to MPEG specified formats.

mitchmalibu
24th August 2017, 22:14
For HDR Youtube provides VP9 10 bit - for SDR only 8 bit. 1070 cannot decode VP9 10 bit. So if you downloaded the VP9 10 bit stream that should be the reason.

OK thanks, I knew there was a bitdepth difference, but couldn't find the exact decoding capabilities of the 1070.

mitchmalibu
26th August 2017, 14:21
Quick question: updating from nightly 45 to 49 and later, I loose DXVA11 native decoding, the active decoder now being D3D11 cb direct instead of D3D11 native. Is this normal ?

mrcorbo
26th August 2017, 14:30
Quick question: updating from nightly 45 to 49 and later, I loose DXVA11 native decoding, the active decoder now being D3D11 cb direct instead of D3D11 native. Is this normal ?

Did you select the active decoder instead of leaving it on automatic?

mitchmalibu
26th August 2017, 15:15
I did leave it on automatic. A settings reset solved it. Thanks

Jasch
27th August 2017, 16:15
Hi, a small info/bugreport.
with new Dxva11 +madvr deinterlacing is not working at all, dxva2native +copyback works fine.
Win10 Rx460 latest Madvr and Lav nightly

sneaker_ger
27th August 2017, 16:20
madshi hasn't implemented deinterlacing for D3D11 DXVA yet.

https://forum.doom9.org/showpost.php?p=1815291&postcount=44714

Sunspark
27th August 2017, 17:52
In build 0.70.2.66-git I have made the observation that in video filters if you select DXVA2 (native), it will display the expected NV12, 8 bit, 4:2:0 (DXVA2).

However, if you then change it to None, it continues to display NV12, 8 bit, 4:2:0 (DXVA2) even though software decoding should be in use at this point.

If you change it to DXVA2 (copy-back), it will display NV12, 8 bit, 4:2:0.

Then changing it to None, it displays NV12, 8 bit, 4:2:0.

Repeating the process where you go back to DXVA2 (native) and then None, None once again holds on to (DXVA2).

nevcairiel
27th August 2017, 17:55
It doesn't change without re-starting playback.

Sunspark
27th August 2017, 18:38
You are right. It is not enough to just stop playback, you have to quit out of the player entirely and restart it.

sneaker_ger
27th August 2017, 18:44
In MPC-HC there is a hotkey to restart. ( ctrl + e ?)

XMonarchY
30th August 2017, 02:37
What is the advantage of D3D11 DXVA? Faster rendering for rigs that support it? Does it improve image quality?

SamuriHL
30th August 2017, 02:48
There shouldn't be a quality difference in any of the decoding types. It's likely the benefit is resource utilization.

huhn
30th August 2017, 03:25
DXVA native with nvidia cards can result in quality loss if it is used with madVR for example. D3D11 doesn't have this problem.

on top of it D3D11 supports headless mode which is very useful for PCs that have a iGPU with very good codec support and a dGPU with not that good codec support.

SamuriHL
30th August 2017, 03:30
Well that's good to know about headless. I see I've been away from these things too long. LOL. D3D11 support seems very good to me in my latest tests with my new 1060. I had no issues with 3D playback which is awesome.

yukinok25
30th August 2017, 10:13
Well that's good to know about headless. I see I've been away from these things too long. LOL. D3D11 support seems very good to me in my latest tests with my new 1060. I had no issues with 3D playback which is awesome.

I am sorry if its a stupid question, but I can't understand how can I enable the D3D11 support in LAV Filter, I have only DXVA2 (copy-back) and all the others except D3D11?

What I am doing wrong?

FDisk80
30th August 2017, 10:16
I am sorry if its a stupid question, but I can't understand how can I enable the D3D11 support in LAV Filter, I have only DXVA2 (copy-back) and all the others except D3D11?

What I am doing wrong?

You install the latest Nightly.

yukinok25
30th August 2017, 10:21
You install the latest Nightly.I thought I did! Which is the latest versions, just to make sure?

Thanks for the help by the way.

FDisk80
30th August 2017, 10:23
I thought I did! Which is the latest versions, just to make sure?

Thanks for the help by the way.

https://files.1f0.de/lavf/nightly/LAVFilters-0.70.2-66.exe

yukinok25
30th August 2017, 10:23
https://files.1f0.de/lavf/nightly/LAVFilters-0.70.2-66.exeThanks!!

fakel
30th August 2017, 12:07
D3D11 DXVA it is a miracle, just do not understand how deinterlacing algorithm qualitatively?