Log in

View Full Version : madVR - high quality video renderer (GPU assisted)


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 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 [1243] 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329

Asmodian
18th October 2021, 02:30
I am still thinking there must be some API function that could automatically reset the bug on MPC-HC exit. Something that does the equivalent to dragging a window around, such as rendering a few frames of video at a higher rate?

Creating a workaround for a buggy Windows 7 DWM + specific driver is very unlikely at this point in the life cycle. :p

Trying different GPU drivers is what I would do, if I wanted to stay on 7.

DMU
18th October 2021, 09:31
A "trick" to help with the bandwidth situation is to disable 10/16-bit output formats in LAV Video Decoder settings. Then it will convert 10-bit stuff to 8-bit. That costs a little CPU usage, but reduces the required bandwidth by half.



And thus, 10-bit uses twice as much memory as 8-bit, because its really 16-bit with 6 empty bits.


Thanks for the easy-to-understand and complete explanation!
I have not yet been able to reduce the bandwidth by changing the Output Formats in the LAV. Am I missing something?

Pic. (https://drive.google.com/file/d/1gq0MsBQN83gwq2GbVUw_5KLkwy_UuyEN/view?usp=sharing)

huhn
18th October 2021, 10:42
it only cuts the load for upload in half which is not that much compared to other processing which is also done on the dram on an APU.

DMU
18th October 2021, 11:33
Then there is no point in this "trick". A much more efficient solution to reduce bandwidth is to "use 10bit chroma/image buffer instead of 16bit".

thighhighs
18th October 2021, 12:01
b) tick "restore original display mode ... when media player is closed"
What happens "when media player leaves fullscreen"? Same problem?

flossy_cake
18th October 2021, 12:38
What happens "when media player leaves fullscreen"? Same problem?

Yeah.

clsid
18th October 2021, 13:51
Then there is no point in this "trick". A much more efficient solution to reduce bandwidth is to "use 10bit chroma/image buffer instead of 16bit".No, it actually is a very useful general trick, and it has helped several people solve issues. In case of madVR of course additional tweaks can be used.

Your graphs might only be showing direct CPU=>DRAM transfers, and not CPU=>GPU(=>DRAM).

huhn
18th October 2021, 14:24
if this would be for ram bandwidth not bus "PCIe" bandwidth maybe.

this is to lower the load on the connection between GPU and CPU not the ram the ram is in a totally different league compared to the bus.

flossy_cake
18th October 2021, 14:25
Is the "1 repeat frame every x minutes" on Ctrl+J accurate?

I fine-tuned my refresh rate with CRU so that my display rate on Ctrl+J is 23.97605hz, but when playing a 23.976 video it's saying "1 repeat frame every 12 minutes" which seems way too often.

By my calculation it should be something like 1/(23.97605-23.976) = 1 repeat frame every 20,000 seconds (5.5 hours).

Also should I trust the reported display rate on Ctrl+J, because I noticed it has a discrepancy of about 0.003hz vs the rate reported in Radeon Settings. Doesn't sound like much but it would amount to a repeat frame every 5.5 minutes.

ashlar42
18th October 2021, 15:21
Is the "1 repeat frame every x minutes" on Ctrl+J accurate?

I fine-tuned my refresh rate with CRU so that my display rate on Ctrl+J is 23.97605hz, but when playing a 23.976 video it's saying "1 repeat frame every 12 minutes" which seems way too often.

By my calculation it should be something like 1/(23.97605-23.976) = 1 repeat frame every 20,000 seconds (5.5 hours).

Also should I trust the reported display rate on Ctrl+J, because I noticed it has a discrepancy of about 0.003hz vs the rate reported in Radeon Settings. Doesn't sound like much but it would amount to a repeat frame every 5.5 minutes.

Here I provided (thanks to madshi info) a general explanation of what you are experiencing. You must not aim for perfect 24/1.001, the target refresh rate depends on how much they audio clock is out of sync with video clock.

https://forum.doom9.org/showthread.php?t=173571

DMU
18th October 2021, 16:14
Your graphs might only be showing direct CPU=>DRAM transfers, and not CPU=>GPU(=>DRAM).

GPU-Z (https://drive.google.com/file/d/1cCSB_eYaAxkcAJK-qlRuzMyQbEAJkJRK/view?usp=sharing)

huhn
19th October 2021, 00:50
you have 16 lanes of PCIe 3.0 an intel iGPU from 2013 doesn't not even close to it.

while this test will show the bus speed it does not hammer it.

flossy_cake
19th October 2021, 04:41
Here I provided (thanks to madshi info) a general explanation of what you are experiencing. You must not aim for perfect 24/1.001, the target refresh rate depends on how much they audio clock is out of sync with video clock.

https://forum.doom9.org/showthread.php?t=173571

Thank you, and I can confirm it works as you describe.

It turns out my 23.976hz and 50.0hz modes are already well tuned from factory, with Ctrl+J reporting 1 repeat frame every 2-4 hours. So I didn't need to tweak those modes.

However my 59.94hz mode is reporting 1 dropped frame every 3 minutes with 59.94fps video, so I need to speed up the refresh rate a bit.

This is where I ran into trouble as it seems the AMD driver or monitor only allows me tuning +/-0.003hz, otherwise it just falls back to the default timing. So the most I could achieve was 59.943hz which reports 1 repeat frame every 1.5 hours. Not great, but tolerable.

Curiously, the value first starts out at 1 repeat every 10 minutes, then gradually starts climbing until after ~2 minutes of playback it starts reporting 1-2 hours. But then sometimes it goes back down again to around 30 minutes for no apparent reason. All the while the display rate remains consistent, so I'm guessing it's the audio or system clock that is fluctuating.

I'm sure I could improve this if the driver/monitor allowed more than +/-0.003hz tuning, however I think it may be limited to this narrow range as it's a HDMI mode (1080p YCbCr 4:4:4) and maybe HDMI has strict timing requirements?

DMU
19th October 2021, 17:51
you have 16 lanes of PCIe 3.0 an intel iGPU from 2013 doesn't not even close to it.

I doubt that in the case of the iGPU, the quality and number of PCIe lanes matters. The iGPU is connected to the CPU using Infinity Fabric (AMD) or the Ring Bus (Intel). In both cases, the bandwidth of such a connection will be much larger than that of an external PCIe. And the DRAM bandwidth will be the bottleneck.

ashlar42
19th October 2021, 23:32
This is where I ran into trouble as it seems the AMD driver or monitor only allows me tuning +/-0.003hz, otherwise it just falls back to the default timing. So the most I could achieve was 59.943hz which reports 1 repeat frame every 1.5 hours. Not great, but tolerable.
This is why in the guide I use CRU. To have more control on those things... although I've been an Nvidia user for a very long time, don't know how AMD works with it.

I am glad you found the guide at least somehow useful. I should rewrite it but I never find the time.

flossy_cake
20th October 2021, 02:14
This is why in the guide I use CRU. To have more control on those things... although I've been an Nvidia user for a very long time, don't know how AMD works with it.

I am using CRU. So if I go further than +/-0.003hz in CRU, the actual display rate -- as reported in Ctrl+J and Radeon Settings -- just falls back to the default 59.940hz timing.

I suspect it's because the HDMI 1080p mode I'm using isn't a "PC mode" but rather a "TV mode", and perhaps TV mode rates are more strictly standardised by HDMI spec.

I am limited to "TV mode" HDMI signal as otherwise my TV thinks it's a "PC mode" and disables a lot of picture controls and uses different processing which I don't like. edit: and I'm pretty sure the TV's 24hz mode wouldn't work either unless it's the specific TV mode HDMI 1080p24hz signal.

huhn
20th October 2021, 09:29
don't use the HZ to fine tune use the image "size".

flossy_cake
20th October 2021, 13:30
There appears to be a serious bug related to the "composition rate" used by MadVR, which can cause intense frame rate stuttering in many scenarios.

The issue appears that "composition rate" gets stuck at the rate used by the previously played file.

So the workaround I'm using which seems to be effective, is to set MadVR to D3D9, which then allows desktop compositor to be auto disabled.

So now when I double click a video file, MPC-HC opens it automatically in full screen, in MadVR exclusive mode, with desktop compositor disabled.

Then after exiting the video, MadVR reinstates desktop compositor, and compositor appears to be running at full frame rate, thus bypassing the compositor bug.

The relevant MadVR settings are in rendering > general settings:

- tick: enable automatic fullscreen exclusive mode
- tick: disable desktop composition
- untick: use Direct3D 11 for presentation

For convenience I'm also setting rendering > exclusive mode > untick delay switch to exclusive mode by 3 seconds.

In theory this configuration should be compatible with Kodi, but I haven't tested it yet.

ashlar42
20th October 2021, 22:07
I am using CRU. So if I go further than +/-0.003hz in CRU, the actual display rate -- as reported in Ctrl+J and Radeon Settings -- just falls back to the default 59.940hz timing.

I suspect it's because the HDMI 1080p mode I'm using isn't a "PC mode" but rather a "TV mode", and perhaps TV mode rates are more strictly standardised by HDMI spec.

I am limited to "TV mode" HDMI signal as otherwise my TV thinks it's a "PC mode" and disables a lot of picture controls and uses different processing which I don't like. edit: and I'm pretty sure the TV's 24hz mode wouldn't work either unless it's the specific TV mode HDMI 1080p24hz signal.
I've found this useful, can't promise the same for you, but have a look: https://www.extron.com/product/videotools.aspx

You can select both PC (VESA) timings and HDMI (SMTPE) timings. If you use the advanced tab, you have all the details and work it out from there.

zveroboy
22nd October 2021, 19:40
madVR can`t switch the display modes.
--------------------
madVR 141
Win 11 22000.258
NVIDIA ForceWare 496.13 DCH

================
There are no problems with switching modes on another configuration:
Win 10 19043.1200
NVIDIA ForceWare 472.12 Standart

Asmodian
23rd October 2021, 03:50
It works for me. :confused:

madVR v0.92.17
Win 11 22000.282
NVIDIA 496.13 DCH

zveroboy
23rd October 2021, 04:38
it`s strange...
maybe cos of .282 ?

Asmodian
23rd October 2021, 05:04
Check for updates? I did get an update yesterday.

zveroboy
23rd October 2021, 05:16
I will update next week (as I guess) and post result here.

Rippner
23rd October 2021, 14:56
madVR can`t switch the display modes.
--------------------
madVR 141
Win 11 22000.258
NVIDIA ForceWare 496.13 DCH

same problem! also, no hdr switch
madVR v0.92.17
Win 11 22000.282
NVIDIA 496.13 DCH

ashlar42
23rd October 2021, 14:56
Envy starting to get interesting feature absent from madVR. The 1D Lut thing is something I'd be happy to pay for madshi in order for it to be added to madVR, if you'll ever read this.

zveroboy
23rd October 2021, 20:12
same problem! also, no hdr switch
madVR v0.92.17
Win 11 22000.282
NVIDIA 496.13 DCH
is the StartAllBack installed?

zveroboy
23rd October 2021, 23:26
same problem!
I meant switching the refresh rates (23Hz, 24Hz, 50Hz, 59Hz, 60Hz).
We're talking about the same thing, I hope?

Asmodian
24th October 2021, 00:49
I meant refresh rates as well.

But HDR switching does work for me too, as long as I make the video fullscreen.

Rippner
24th October 2021, 00:58
is the StartAllBack installed?
nope
I meant switching the refresh rates (23Hz, 24Hz, 50Hz, 59Hz, 60Hz).
We're talking about the same thing, I hope?

yes refresh rate :D

zveroboy
24th October 2021, 01:46
Asmodian
Rippner

2-monitors config (extended display mode) ?

Rippner
24th October 2021, 03:00
Asmodian
Rippner

2-monitors config (extended display mode) ?
show only on 1
I use my aoc 24 for daily use and lg cx for movies

zveroboy
24th October 2021, 04:01
Rippner
Hmm...
It seems the issue at madVR side.

Asmodian
24th October 2021, 04:30
2-monitors config (extended display mode) ?

No, only one display (LG CX).

flossy_cake
24th October 2021, 07:17
I've found this useful, can't promise the same for you, but have a look: https://www.extron.com/product/videotools.aspx

You can select both PC (VESA) timings and HDMI (SMTPE) timings. If you use the advanced tab, you have all the details and work it out from there.

Thanks. According to that website it appears that:

SMPTE/CTA/DCI = "Automatic (HDTV)" in CRU = what I referred to as "TV mode"
VESA = "CVT standard" in CRU = what I referred to as "PC mode"

Unfortunately I cannot use PC mode timings otherwise my TV uses different, unsatisfactory video processing and locks out a lot of the picture controls, and no 24/50hz modes either.

So I am stuck with TV mode timings which appear limited to +/-0.003hz from the spec. I am not sure if this is my display's fault or the GPU driver not allowing it.

This is not a huge problem as the worst case scenario is Ctrl+J reporting a repeated frame every 2 hours, which means at most a dropped frame for a movie.

By the way, is it possible to map the Ctrl+J debug screen to a mouse button, such as middle click, or double click right mouse button? I'm just using a mouse only for HTPC operation in the lounge room, and I don't want the burden of a keyboard. MadVR's keyboard shortcuts section only seems to allow key combinations, whereas MPC-HC allows mouse clicks, but they can't be mapped to MadVRs Ctrl+J debug screen, only "OSD: display renderer statistics" which is a different, unrelated screen.
________________________________________________________

On a separate note, I'm having trouble understanding why HDR is so much more system intensive than SDR -- can anyone shed some light on this?

For example I have this Peru8k clip which is 4k60 in SDR. It plays flawlessly without any dropped frames on my i5-4570 + R9 380 system.

But 4k60 HDR clips are not playable -- my system struggles to render frames very slowly with constant pausing and breaks in audio. CPU is pegged at around 70% so doesn't seem to be a CPU issue -- maybe memory bandwidth issue? GPU is doing very little, some bursts of 50% usage every now and then, but mostly at 0% -- I presume this means it's not doing hardware decoding and everything is being done by CPU -- consistent with R9 380 being an old card that wouldn't be capable of HEVC decoding presumably. On my GTX 1070 system, GPU usage is pegged at 50% so I'm assuming that's the GPU's HEVC decoding taking a large portion of the load, and I get smooth playback.

Is 4k60 HDR really that much more system intensive than 4k60 SDR? I can't imagine it being that much more intensive, with maybe some higher bit depth render targets and an additional tonemap pass for the HDR to SDR conversion. Surely that can't be the difference between perfect playback and being totally unplayable? :scared:

Asmodian
24th October 2021, 07:25
Is 4k60 HDR really that much more system intensive than 4k60 SDR? I can't imagine it being that much more intensive, with maybe some higher bit depth render targets and an additional tonemap pass for the HDR to SDR conversion. Surely that can't be the difference between perfect playback and being totally unplayable? :scared:

Yes, that tone mapping can be VERY intensive. Adjust HDR tone mapping options to improve performance or turn off tone mapping to see how much impact it has.

flossy_cake
24th October 2021, 08:06
Yes, that tone mapping can be VERY intensive. Adjust HDR tone mapping options to improve performance or turn off tone mapping to see how much impact it has.

Thanks, I've tried just now turning off HDR tone mapping in MadVR ("passthrough hdr to display"). This results in the expected "washed out" image when presented as SDR at the display. I observe no effect on performance on my system (i5-4570 + R9 380).

I've dabbled a bit with 2D pixel shaders in ReShade, and this seems like it wouldn't be particularly GPU intensive. It should only be a few lines of shader code at most, and the GPU has lots of cores to do it all in parallel to every pixel. In ReShade I'm seeing around 1-3% increase in GPU load from applying various tonemap shaders. However some tonemap shaders are much more GPU expensive so I guess the devil is in the details.

My GPU usage during playback is a bit curious:

https://i3.lensdump.com/i/gdNTyC.png

Asmodian
24th October 2021, 09:58
That means you cannot decode the video fast enough. Is one HEVC and one AVC? You can probably use hardware decoding for the SDR one, but cannot for the HDR one. Look at CPU usage for both files.

flossy_cake
24th October 2021, 12:39
That means you cannot decode the video fast enough. Is one HEVC and one AVC? You can probably use hardware decoding for the SDR one, but cannot for the HDR one. Look at CPU usage for both files.

Peru 4k60 SDR clip
VP9, 24mbps, CPU 65%, GPU 0% but occasionally spiking to 100%

LG 4k60 HDR clip
HEVC, 60mbps, CPU 70%, GPU 0% but occasionally spiking to 50%

I guess it's to do with VP9 vs HEVC and the bit rate?

And I suppose the fluctuating GPU usage means it's NOT doing hardware decoding, since on my other PC which uses a GTX 1070 -- which supports HEVC & VP9 -- the GPU usage is pegged at a constant 50% during playback.

goldfield
24th October 2021, 14:26
Thanks. According to that website it appears that:

But 4k60 HDR clips are not playable -- my system struggles to render frames very slowly with constant pausing and breaks in audio. CPU is pegged at around 70% so doesn't seem to be a CPU issue -- maybe memory bandwidth issue? GPU is doing very little, some bursts of 50% usage every now and then, but mostly at 0% -- I presume this means it's not doing hardware decoding and everything is being done by CPU


I don't know that much about the technology.
But for a long time I also had the problem, up to 4K / 60Hz everything ran smoothly, but 4K / 60Hz even had severe problems.

After a hint in the German Hifi-Forum I switched from D3D11 (copyback) to D3D11 (native) in the LAV-Filters under "Hardware device to use", and that means that 4K / 60Hz works fine for me.

Maybe it will solve the problem for you too.

But it is well known that deinterlacing and black bar detection do not work with D3D11 (native).

huhn
24th October 2021, 14:34
you can disable hardware acceleration for none 4K sources or none HEVC/VP9/AV1 sources.

but he is talking about video decoder they don't really use the GPU and even if hardware decoding is used ot not the GPU load should still be anything but 0%.

flossy_cake
24th October 2021, 15:15
After a hint in the German Hifi-Forum I switched from D3D11 (copyback) to D3D11 (native) in the LAV-Filters under "Hardware device to use", and that means that 4K / 60Hz works fine for me.

Maybe it will solve the problem for you too.

4k60 does actually work perfect for me, but in SDR only. I am trying to figure out why HDR brings my video playback to a crawl.

I had already tried playing with that LAV video decoder setting you mentioned, to no effect. I believe it relates to the GPU hardware decoding, which may not be relevant since my AMD GPU doesn't appear to support it based on the GPU usage pattern during video playback.

Is there a status debug screen somewhere that tells us whether GPU hardware decoding is in effect?

edit: oh it's there in the LAV video decoder screen:

https://i1.lensdump.com/i/gdUviP.png


So I'm getting GPU decoding on my 1070 but not my R9 380.

I guess the CPU decoding of HEVC is very intensive and too much for an i5-4570. But VP9 is doable for some reason.

lvqcl
24th October 2021, 15:27
4k60 does actually work perfect for me, but in SDR only.

Does it mean that your system can play 4K60 HEVC videos? What about 4K60 HEVC 10-bit (SDR)?

You can test it with jellyfish test videos from https://jell.yfish.us/

Also you can download 4K60 VP9 HDR videos from Youtube. VP9 requires much less CPU to decode than HEVC.

flossy_cake
24th October 2021, 16:28
Does it mean that your system can play 4K60 HEVC videos? What about 4K60 HEVC 10-bit (SDR)?

You can test it with jellyfish test videos from https://jell.yfish.us/

Also you can download 4K60 VP9 HDR videos from Youtube. VP9 requires much less CPU to decode than HEVC.

So on my i5-4570 + R9 380 system, the jellyfish 4k30 8-bit h.264 video plays effortlessly with very low CPU and GPU usage. LAV reports GPU decoding active, which I expect from the R9 380.

The jellyfish 4k30 10-bit HEVC file grinds the system to a halt with 100% CPU usage and stuttering video. LAV reports no GPU decoding active, which is to be expected for the old R9 380.

Peru 4k60 8-bit VP9 plays flawlessly with 65% CPU usage and no GPU decoding active.

LG 4k60 10-bit HEVC grinds to a stutter with 70% CPU usage and no GPU decoding.

So SDR/HDR had nothing to do with it.

It seems that 4k 10-bit HEVC is processor intensive and needs GPU decoding for smooth playback, which R9 380 doesn't support. I tested this also by disabling GPU decoding on my higher spec i7-4790k + GTX 1070, and got the same stuttery result.

The real surprise is that 4k60 8-bit VP9 is fine without GPU decoding and a mediocre CPU. I guess that is a testament to the efficiency of VP9.

One thing I have yet to try is the LAV GPU decoding setting "D3D11", however I cannot try it as I am using Win7 and it requires 8+.

I suspect an upgrade to Win10 might do the trick and get 4k 10-bit HEVC playable on the R9 380.

DMU
24th October 2021, 16:57
Or if anyone knows a workaround to get D3D11 decoding from LAV under Win7, please advise.

Try this trick (https://forum.doom9.org/showthread.php?p=1951532#post1951532)first.

lvqcl
24th October 2021, 17:16
One thing I have yet to try is the LAV GPU decoding setting "D3D11", however I cannot try it as I am using Win7 and it requires 8+.

I suspect an upgrade to Win10 might do the trick and get 4k 10-bit HEVC playable on the R9 380.


According to https://en.wikipedia.org/wiki/Radeon_Rx_300_series#Desktop_models and https://en.wikipedia.org/wiki/Graphics_Core_Next#third your R9 380 is based on Tonga GPU which has UVD 5.0. And according to https://en.wikipedia.org/wiki/Unified_Video_Decoder#UVD_5 there's no hardware support for HEVC or VP9 in it.

You need UVD 6.0 for h/w decoding of 8-bit HEVC, UVD 6.3 for h/w decoding of 10-bit HEVC and VCN 1.0 for h/w decoding of VP9.

lvqcl
24th October 2021, 17:21
Also: do you use 32-bit or 64-bit video player?

Rippner
24th October 2021, 17:49
Rippner
Hmm...
It seems the issue at madVR side.

today i tried again, now the frequency changes. I don't know why lol still no hdr
but i found another problem: when i switch to the second screen, the exclusive mode no longer works

zveroboy
24th October 2021, 18:31
No, only one display (LG CX).

I`m using a dual display configuration.
1 - default: Asus VG259QM
2 - extended: Panasonic TX-P55ST60

madVR can switch a modes for default display only, but for extended display it can`t.

flossy_cake
24th October 2021, 19:31
Try this trick (https://forum.doom9.org/showthread.php?p=1951532#post1951532)first.

Thanks, but no effect.

I am pretty certain the issue is that 4k HEVC decoding is simply too expensive for CPU, as demonstrated by CPU decoding still being too slow on my i7-4790k which is not a weak CPU.


You need UVD 6.0 for h/w decoding of 8-bit HEVC, UVD 6.3 for h/w decoding of 10-bit HEVC and VCN 1.0 for h/w decoding of VP9.

Correct me if I'm wrong, but I seem to get the impression that LAV's D3D11 decoding option may be compatible with any GPU that supports D3D11?

Also: do you use 32-bit or 64-bit video player?

64-bit.