Nevcairiel / LAVFilters

LAV Filters - Open-Source DirectShow Media Splitter and Decoders
GNU General Public License v2.0
7.48k stars 788 forks source link

The hardware accelearation not working for some H.264 video with format profile High. #410

Closed iseki0 closed 3 years ago

iseki0 commented 3 years ago

Before that I check the thread: #311 , you said the format profile both constrained baseline, main and high is working. >>>
But my video's format profile is High 10@L5.2 and it cannot use hardware. I don't know what's the problem. Be honest decodeing 2160P60FPS video by software at old platform is difficult...(x

I want to know what's the problem (why it can't decode by hardware) and any solution if exists. Thank you for your help.

Because the video has some NSFW content... If video is needed I will paste a link to it. Thank you for your help.

Video info generate by PotPlayer ``` General Complete name : E:\Rythmical_Rin [4K60].mp4 Format : MPEG-4 Format profile : Base Media / Version 2 Codec ID : mp42 (mp42/mp41) File size : 1.26 GiB Duration : 2 min 38 s Overall bit rate mode : Variable Overall bit rate : 68.5 Mb/s Encoded date : UTC 2019-06-06 20:22:25 Tagged date : UTC 2019-06-06 20:22:46 TIM : 00;00;00;00 TSC : 60 TSZ : 1 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High 10@L5.2 Format settings : CABAC / 4 Ref Frames Format settings, CABAC : Yes Format settings, Reference fra : 4 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 2 min 38 s Bit rate : 68.1 Mb/s Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 60.000 FPS Standard : NTSC Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 10 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.137 Stream size : 1.25 GiB (100%) Language : English Encoded date : UTC 2019-06-06 20:22:26 Tagged date : UTC 2019-06-06 20:22:26 Color range : Full Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 Codec configuration box : avcC Audio ID : 2 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 2 min 38 s Source duration : 2 min 38 s Bit rate mode : Variable Bit rate : 317 kb/s Maximum bit rate : 409 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 SPF) Compression mode : Lossy Stream size : 5.98 MiB (0%) Source stream size : 5.98 MiB (0%) Language : English Encoded date : UTC 2019-06-06 20:22:26 Tagged date : UTC 2019-06-06 20:22:26 ```
Nevcairiel commented 3 years ago

"High 10" is not the same as "High", and unsupported in hardware

iseki0 commented 3 years ago

@Nevcairiel Thank you for your help, I don't know enough about video format.

F1ReB4LL commented 3 years ago

"High 10" is not the same as "High", and unsupported in hardware

Hi! May I ask why does VLC have a hardware support for High 10 profile videos, then?

Nevcairiel commented 3 years ago

No consumer PC hardware has support for H.264 Main 10, that is not something software can change.

F1ReB4LL commented 3 years ago

No consumer PC hardware has support for H.264 Main 10, that is not something software can change.

Hmm, interesting. MPC-HC + LAVFilters take around 15-25 percents of CPU load while running an AVC/High 10@L4 video, while VLC uses less than 10 percents + DXVA Checker trace log is full of DXVAHD_VideoProcessBltHD calls. But it seems VideoProcessBltHD isn't about decoding and the speed difference is probably due to the much more optimized software decoder in VLC?

clsid2 commented 3 years ago

That is the renderer using DXVA video processing for scaling and colorspace conversion. That is unrelated to the video decoding.

Try with this video renderer in MPC-HC: https://github.com/Aleksoid1978/VideoRenderer

F1ReB4LL commented 3 years ago

Try with this video renderer in MPC-HC: https://github.com/Aleksoid1978/VideoRenderer

Yep, using this one also lowers the CPU usage to below 10%. And switching LAV to CoreAVC lowers it even more.

Anyway, I've understood that DXVA calls during the VLC's playback are unrelated to the h/w decoding and it also plays them in software, thank you.