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

NikosD
23rd March 2017, 23:57
Did you try with a hybrid HEVC decoder like Haswell's ?

I didn't have such problems with LAV 0.69.08 nightly.

nevcairiel
24th March 2017, 00:01
There are no changes to HEVC decoding between 8 and 14, only a fix for H264 (which has zero impact on HEVC), two audio related changes, and a bit of minor cleanup without an actual impact.

NikosD
24th March 2017, 00:05
There were a few changes to HW acceleration because you fixed that HEVC clip that couldn't seek using DXVA and then I saw a few others in recent commits.

nevcairiel
24th March 2017, 00:14
There were a few changes to HW acceleration because you fixed that HEVC clip that couldn't seek using DXVA and then I saw a few others in recent commits.

There was no seek fix, only the fix for some stuttering files (wrong timestamps in some hevc mp4 files), which already was in 8, and the other more recent changes only affect H264 (and possibly MPEG2).
I do know what I changed, afterall.

NikosD
24th March 2017, 08:24
OK, you will be right here. :o
There was no seek fix, only the fix for some stuttering files (wrong timestamps in some hevc mp4 files), which already was in 8, and the other more recent changes only affect H264 (and possibly MPEG2).
I do know what I changed, afterall.

It seems that I was wrong.

I tried my 2nd system with Win 10 x64 system (same version/updates) with a RX 470 and works fine.

So, I went back to my Haswell system and tried:

MPC-HC 1.7.11.13 + LAV 0.69.14
MPC-HC 1.7.11 Stable + LAV built-in
MPC-HC 1.7.10 Stable + LAV built-in
MPC-HC 1.7.9 Stable + LAV built-in
MPC-HC 1.7.8 Stable + LAV built-in
MPC-HC 1.7.7 Stable + LAV built-in (oldest MPC-HC app with LAV HEVC HW decode support)

They all crashed with my Core i3 4170!

Something is broken in my system.
I can't think of anything else.

Sorry for the false alarm.

Octo-puss
24th March 2017, 09:39
Is there anything I can do with LAV settings so that .mkv files play in Windows Media Player?

sneaker_ger
24th March 2017, 11:00
Did you run the LAV installer with MKV activated during setup? What version of Windows/Media Player?

In newer Windows versions you may need to deactivate Media Foundation or set preferred filter or something. I'm not 100% sure what's best. https://www.codecguide.com/windows7_preferred_filter_tweaker.htm
But it might have side effects so I'd recommend using e.g. MPC-HC instead.

LigH
24th March 2017, 14:45
@ NikosD:

Well, I am even surprised how much a (presumed) pure software decoder is involved in hardware accelerated decoding. ;)

NikosD
24th March 2017, 15:35
Which is pure SW decoder?

LAV video is the first HW decoder of the open source community that the other developers follow (copy)

LigH
24th March 2017, 15:58
That may be my mistake. I only imagined LAV Filters as a DirectShow interface to libavfilter and libavcodec. I did not think of an additional interface to hardware decoding APIs; but this is obviously more relevant than ever.

tahaa7
25th March 2017, 21:38
I recently bought a new laptop, which has a iGPU (Intel HD 630) and also a dedicated NVIDIA GTX 1050. However, I cannot get LAV Video Decoder to use the NVIDIA for hardware accelerated decoding using DXVA, either native or copy-back. Both of these options trigger only the iGPU, and I cannot manually select the NVIDIA chip. The only way I can get to use the NVIDIA is by selecting CUVID, but shouldn't it supposed to work with DXVA as well? What am I missing?

P.S.: My operating system is Windows 10 x64.

sneaker_ger
25th March 2017, 21:45
You can only use the GPU which is set to run your player which is usually the iGPU. You can change that (http://nvidia.custhelp.com/app/answers/detail/a_id/2615/~/how-do-i-customize-optimus-profiles-and-settings) (hope this guide is still valid). But: why do you want to do this? Using the Intel decoder saves battery, doesn't it? Intel Kaby Lake is a powerful decoder.

tahaa7
26th March 2017, 00:05
You can only use the GPU which is set to run your player which is usually the iGPU. You can change that (http://nvidia.custhelp.com/app/answers/detail/a_id/2615/~/how-do-i-customize-optimus-profiles-and-settings) (hope this guide is still valid). But: why do you want to do this? Using the Intel decoder saves battery, doesn't it? Intel Kaby Lake is a powerful decoder.

Well, I read in a NVIDIA whitepaper on Optimus (http://www.nvidia.com/object/LO_optimus_whitepapers.html) that DXVA calls automatically trigger the dedicated NVIDIA GPU. However, with LAV Video's (or MPC's) DXVA calls, that seems not to be the case for some reason (I checked using NVIDIA's notification area tool).

Also, I know about the options that the guide you linked to describes, but you can't do that with MPC-HC unfortunately, since it is greyed out in the NVIDIA Control Panel to "Integrated graphics" (as the preferred graphics chip):

http://i.imgur.com/WcFANqK.png

Also, right-clicking MPC's exe and selecting "Run with -> high perfromance NVIDIA graphics" does not change anything.

sneaker_ger
26th March 2017, 00:11
I vaguely remember renaming mpc-hc.exe to e.g. mpc-hc2.exe solves this. But again: why when Intel does decoding just fine?

P.J
26th March 2017, 06:56
Well, I read in a NVIDIA whitepaper on Optimus (http://www.nvidia.com/object/LO_optimus_whitepapers.html) that DXVA calls automatically trigger the dedicated NVIDIA GPU. However, with LAV Video's (or MPC's) DXVA calls, that seems not to be the case for some reason (I checked using NVIDIA's notification area tool).

Also, I know about the options that the guide you linked to describes, but you can't do that with MPC-HC unfortunately, since it is greyed out in the NVIDIA Control Panel to "Integrated graphics" (as the preferred graphics chip):

http://i.imgur.com/WcFANqK.png

Also, right-clicking MPC's exe and selecting "Run with -> high perfromance NVIDIA graphics" does not change anything.

Wonder if it works one day!

nevcairiel
26th March 2017, 10:11
They specifically tie (known) video players to the intel GPU for power efficiency. Rename the executable and that limit goes away. In any case, not a LAV problem. It can only get access to the hardware that the OS/Drivers expose.

tahaa7
26th March 2017, 12:33
OK, so it seems their statement about DXVA calls automatically triggering the NVIDIA GPU is not entirely accurate.

clsid
26th March 2017, 16:04
You can change which GPU is used by MPC-HC with NvidiaProfileInspector (https://ci.appveyor.com/project/Orbmu2k/nvidiaprofileinspector/build/artifacts).

P.J
26th March 2017, 20:01
You can change which GPU is used by MPC-HC with NvidiaProfileInspector (https://ci.appveyor.com/project/Orbmu2k/nvidiaprofileinspector/build/artifacts).

How? :confused:

CruNcher
26th March 2017, 20:32
http://i1.sendpic.org/t/dq/dqPslg4L1txOxsxX1o0p1GczNsC.jpg (http://sendpic.org/view/1/i/h3h8FOKfR86eOBW4n0K6a5kwGmb.png)

Maybe it still routes around it though it stopped some time ago for the transcoding itself (was discussed here) i think might work for the Decode as well maybe also gonna occasionally go through driver regressions you never know ;)

Worth a try, though ehh dont come to the idea using this for benchmarking though this is overhead as these cheap systems are directly connected to the Intel IGPU and have no option to go physical around it you need to copy the framebuffer ;)

Before Nvidia implemented it right into the driver you had to use LucidLogix Virtu for this, which was awesome coding work that goes really deep into NT 6 :)

https://youtu.be/SHSs0HRsWzU?t=334

Thus Nvidia and Lucid came to a point of heavy arguing and Nvidia cut them off

http://stks.freshpatents.com/Lucidlogix-Technologies-Ltd-nm1.php

Lucid Engineers where practically on the forefront of what wee see comeback as DX12 and Vulkan MultiGPU ;)

API Intercept no Sli Bridge ;)

https://youtu.be/37_mRvzUOOU?t=7

khanmein
27th March 2017, 05:41
@nevcairiel for NV's laptop users have 5 choices like e.g. Adaptive, High Performance, Nvidia Driver controlled, Prefer Consistent Performance, and Optimal power.

which one should u recommend? currently, i chosen the prefer consistent performance on my bro lappy GT640M.

chros
27th March 2017, 10:08
I vaguely remember renaming mpc-hc.exe to e.g. mpc-hc2.exe solves this.
But again: why when Intel does decoding just fine?
MadVR? :)

@nevcairiel for NV's laptop users have 5 choices like e.g. Adaptive, High Performance, Nvidia Driver controlled, Prefer Consistent Performance, and Optimal power.

which one should u recommend? currently, i chosen the prefer consistent performance on my bro lappy GT640M.
Leave it on default: adaptive. Result of this setting depends also on driver version. (You can see my specs in my signature.)
You can see its effect on the monitor of nvidiainspector.

Blight
27th March 2017, 10:50
Hi nev,
A user has submitted a ".dsf" audio file.
The LAV Source filter and decoder seem to connect just fine, but it fails to connect to the audio renderer with "VFW_E_UNSUPPORTED_AUDIO (0x8004025C)" unless the audio renderer is using WSASPI output (on the user's system, I haven't tested it) or connecting the LAV Audio decoder to ffdshow audio processor first.

Here is the user submitted sample file:
https://www.dropbox.com/s/at8nk6so3nxc4b9/David%20Elias%20-%20The%20Window%20-%20Vision%20of%20Her%20%28DSD64%29%20%5B2.0_192kHz%5D.dsf?dl=0

Any feedback would be appreciated.

Octo-puss
27th March 2017, 10:59
Did you run the LAV installer with MKV activated during setup?

I don't even understand what are you talking about. There is no mkv option during installation.

sneaker_ger
27th March 2017, 11:01
I don't even understand what are you talking about. There is no mkv option during installation.
mkv = Matroska
https://abload.de/img/lav_setup_mkv_option_5pqbo.png

Octo-puss
27th March 2017, 13:47
Ah ok. In that case that is installed.
OS=Windows 7 x64.

nevcairiel
27th March 2017, 15:07
Hi nev,
A user has submitted a ".dsf" audio file.
The LAV Source filter and decoder seem to connect just fine, but it fails to connect to the audio renderer with "VFW_E_UNSUPPORTED_AUDIO (0x8004025C)" unless the audio renderer is using WSASPI output (on the user's system, I haven't tested it) or connecting the LAV Audio decoder to ffdshow audio processor first.

Here is the user submitted sample file:
https://www.dropbox.com/s/at8nk6so3nxc4b9/David%20Elias%20-%20The%20Window%20-%20Vision%20of%20Her%20%28DSD64%29%20%5B2.0_192kHz%5D.dsf?dl=0

Any feedback would be appreciated.


dsf audio files (containing DSD audio) have extremely high sample rates after being decoded to PCM, many audio devices do not support this. So unless you have an audio mixer somewhere that can resample this down to something the audio device supports, thats just going to fail.

clsid
27th March 2017, 15:59
You can change which GPU is used by MPC-HC with NvidiaProfileInspector (https://ci.appveyor.com/project/Orbmu2k/nvidiaprofileinspector/build/artifacts).1) Select the "Media Player Classic" profile on top left.
2) Set "Power Management Mode" to Adapative
3) Set "Enable application for Optimus" to 0 for Intel or 1 for Nvidia or 0x10 for the global default.
4) Press Apply changes button on top right.

tahaa7
27th March 2017, 17:47
OK, I've discovered another solution: simply deleting the MPC-HC profile using ProfileInspector. That way, if you just run MPC-HC, it'll detect the integrated GPU (or whichever is set as the global default), but if you right-click it and select "Run with graphics processor -> High performance NVIDIA processor", it'll specifically detect the NVIDIA.

Thunderbolt8
27th March 2017, 18:32
3) Set "Enable application for Optimus" to 0 for Intel or 1 for Nvidia or 0x10 for the global default.
4) Press Apply changes button on top right.
I have the problem that this setting never gets saved for me and that I have to set it to "1" again every time after restarting windows. I only had this once with one version of graphics drivers and the profile inspector that it would be saved automatically. with any other combination I am back to re-setting this every time I start the PC.

the only thing which helped was renaming the MPC-HC64.exe file

Blight
28th March 2017, 13:38
nev:
I tried enabling LAV mixer and it didn't have an effect (I guess it only mixes channels).
Is it possible to add a setting to cap (downsample) the sample rates higher than a certain user specified value?

clsid
28th March 2017, 14:01
I have the problem that this setting never gets saved for me and that I have to set it to "1" again every time after restarting windows. I only had this once with one version of graphics drivers and the profile inspector that it would be saved automatically. with any other combination I am back to re-setting this every time I start the PC.

the only thing which helped was renaming the MPC-HC64.exe fileI did some searching and the following works for a lot of people with similar problems:
Delete this folder: %programdata%\NVIDIA Corporation\Drs
(this is where the profiles are stored)

Uninstall Geforce Experience, or at least disable its services.

Edit: fixed location

Thunderbolt8
28th March 2017, 19:58
I did some searching and the following works for a lot of people with similar problems:
Delete this folder: %appdata%\NVIDIA Corporation\Drs
(this is where the profiles are stored)

Uninstall Geforce Experience, or at least disable its services.there is no "Drs" folder in my username\appdata\local\nvidia corporation folder

(I deleted the mpc-hc profile yesterday though in profileinspector)

LigH
28th March 2017, 20:08
%APPDATA% (C:\Users\user\AppData\Roaming) is not %LOCALAPPDATA (C:\Users\user\AppData\Local).

Thunderbolt8
28th March 2017, 20:48
appdata\local is the only directory containing a folder "nvidia corporation" for me

clsid
28th March 2017, 23:11
It's in %programdata% (C:\ProgramData)

Blight
30th March 2017, 13:34
nev:
An interesting issue, trying to use LAV source to load this MP3 stream and it fails (right after specifying the URL):
http://downloads.royalsociety.org/events/2017/03/gene-therapy/gene-therapy.mp3

No issue downloading and then playing the same file, any ideas?

I verified it fails in GraphStudio as well.

LigH
30th March 2017, 13:53
Maybe the leading ID3 tag with XMP metadata confuses a streaming client to estimate the bitrate?

videoh
30th March 2017, 14:00
I tried to run MPC-HC 1.7.11 (using internal LAV splitter) on Win10 to open an Avisynth script delivering YV12. It failed to render the script. When I downgraded to MPC-HC 1.7.10 everything worked. I would like to know if this is a possible LAV splitter bug and if so, if there is a work-around. Thank you.

LigH
30th March 2017, 14:25
I guess LAV Splitter may prefer to analyze input files (only by binary file content, without considering VfW hooks) to discover their container format, and may not recognize AviSynth scripts as media containers. If this depends on the MPC-HC version, it seems there is a handling exception for this case missing.

videoh
30th March 2017, 14:46
Thank you for your reply. I should have mentioned that if I add ConvertToRGB24() at the end of the script then MPC-HC 1.7.11 opens it fine. So it seems that it is not an issue of Avisynth support but rather it is specifically limited to YV12 support.

clsid
30th March 2017, 15:14
Other solutions:
- install external LAV Filters
- fix your i420 codec:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32
vidc.i420 = iyuv_32.dll
(certain Webcam software fuck up this registry value and don't restore it during uninstall)

LigH
30th March 2017, 15:30
Still funny that it works with MPC-HC 1.7.10, so there must be a difference in handling raw YUV formats?!

videoh
30th March 2017, 15:40
Other solutions:
- install external LAV Filters Still fails.

- fix your i420 codec:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32
vidc.i420 = iyuv_32.dll It's already correct.

Maybe Nev can shed some light.

max79
3rd April 2017, 16:33
If using "LAV Splitter Source" stream playback reload from start after returning from pause state. Steps to reproduce:
1. Add "LAV Source" to GraphStudio, use "http://podcast.dimitrysmirnov.ru/blog/wp-content/uploads/2017/02/propoved-82258/propoved-82258_i.mp4" as the URL.
2. Add "LAV Video Decoder", "LAV Audio Decoder", "EVR" and "Default DirectSound Renderer"
3. Connect filters.
4. Press play and let the video continue for 30seconds.
5. Pause the video.
6. Wait 1-2 minutes (network timeout on connection?)
7. Press play.
8. Content plays for 20-50 seconds (remaining buffer?) and then stops automatically before the video ends.

Any feedback would be appreciated.

max79
3rd April 2017, 16:36
AC3_5.1 selected by default rather than DTSHDMA_5.1. This value didn't work for .MKV files:
[HKEY_CURRENT_USER\Software\LAV\Splitter]
"PreferHighQualityAudio"=dword:00000001

Any feedback would be appreciated.

max79
3rd April 2017, 16:53
On my NVidia video card[Asus-GTX1060_6Gbyte] LAVVideoDecoder can play "AVC High@L4" without green image distortion only in "DVXA2 (native)" mode. Why "NVIDIA CUVID" mode didn't work well(and "DXVA2 (copy-back)" too) on all possible for downloading drivers for Windows_10_64bit from official NVidia site?

Any feedback would be appreciated.

sneaker_ger
3rd April 2017, 18:02
AC3_5.1 selected by default rather than DTSHDMA_5.1. This value didn't work for .MKV files:
[HKEY_CURRENT_USER\Software\LAV\Splitter]
"PreferHighQualityAudio"=dword:00000001

Any feedback would be appreciated.
Is the AC3 track marked default or forced? Different languages? Is your player overriding LAV choice?

max79
3rd April 2017, 18:49
Is the AC3 track marked default or forced? Different languages? Is your player overriding LAV choice?

I don't understand what do you mean "forced"? My settings:
[HKEY_CURRENT_USER\Software\LAV\Splitter]
"substreams"=dword:00000000
"prefAudioLangs"="rus,eng"

If the answer on one of the your two remaining questions was- "Yes", then the same problem would be and with other types of containers. But i have problem ONLY with MKV!

Info from "Media Info" about .MKV-file with two RUS-audio tracks:
Audio Menu ID: 1(have AC3 format)
Audio Menu ID: 2(have DTS HD MA format)

max79
4th April 2017, 12:07
Problem with "LAV Splitter Source" & "LAV Splitter". This DASH(AVC)-video stop automatically after try to starts:
https://www.dropbox.com/s/5ydixpwtg9rnl4z/%D0%9A%D0%B0%D0%BB%D0%B5%D1%82%D0%B8%D0%BD%20%D0%90%D0%BD%D0%B4%D1%80%D0%B5%D0%B9.mp4?dl=0

Any feedback would be appreciated.