No HW Acceleration for some 4K videos

View previous topic View next topic Go down

No HW Acceleration for some 4K videos

Post by nikkoaki on Sun Nov 12, 2017 7:18 pm

Greetings,

My integrated intel gpu supports 4k decoding acceleration for h264 videos.. For example, videos shot on 4k from a iphone play fine, 4k videos downloaded from youtube also play fine.
Some days ago i bought a phone that can shoot videos in 4k too but unfortunately MPC-HC doesn't use dxva on them, so it's very slow.
Comparing it to an iphone video on MediaInfo shows that the only differences are:

Iphone:

Format profile : Main@L5.1
Format settings, CABAC : Yes

My phone:

Format profile : Baseline@L5.1
Format settings, CABAC : No

In theory, the files from my phone should be easier to decode.
Is this driver related (i'm using the latest) or something that can be fixed on your side (or even LAV's side)?
Small sample here: sendspace.com 4wph4n

nikkoaki

Posts : 17
Join date : 2017-01-09

View user profile

Back to top Go down

Re: No HW Acceleration for some 4K videos

Post by Admin on Sun Nov 12, 2017 7:41 pm

The problem is that it uses baseline profile. That can include (optional) features of the H.264 format that are not compatible with hardware decoding. DXVA2 Hardware decoding is not used for such videos because there is no guarantee that it can be decoded correctly.

I may add a (hidden) option to override this restriction in the future.

Admin
Admin

Posts : 3689
Join date : 2011-06-17

View user profile http://codecs.forumotion.net

Back to top Go down

Re: No HW Acceleration for some 4K videos

Post by nikkoaki on Sun Nov 12, 2017 8:59 pm

Thank you for your answer.
If you add it, great.. if you don't, it's no big deal really since i don't plan on shooting 4k a lot and if i do, i'll probably re-encode it to 1080p to get more detail than just shooting in 1080p natively.

Also, is this a driver/device problem? You said that the DXVA isn't usually used to decode the baseline profile but after a short google search i found (for example) this implementation that decodes it fine (at least it says so):
https://msdn.microsoft.com/library/windows/desktop/dd797815(v=vs.85).aspx

Also, i used handbrake to re-encode the video to 1080p (also baseline and CAVLC) and HW acceleration works fine.


Last edited by nikkoaki on Sun Nov 12, 2017 9:01 pm; edited 1 time in total (Reason for editing : typo)

nikkoaki

Posts : 17
Join date : 2017-01-09

View user profile

Back to top Go down

Re: No HW Acceleration for some 4K videos

Post by Admin on Mon Nov 13, 2017 12:02 am

Baseline profile can have an additional value that indicates that it is compatible with Main profile. The original file is probably missing that, while the converted file has it. HW acceleration works fine here too for re-encoded file, even when it is 4k.

Admin
Admin

Posts : 3689
Join date : 2011-06-17

View user profile http://codecs.forumotion.net

Back to top Go down

Re: No HW Acceleration for some 4K videos

Post by nikkoaki on Mon Nov 13, 2017 11:41 am

Admin wrote:even when it is 4k.

You are right *facepalm*. I've been using handbrake and hybrid, trying to figure out what exactly breaks compatibility but to no avail.
Oh well, it is what it is, thanks anyway.


Last edited by nikkoaki on Mon Nov 13, 2017 5:47 pm; edited 1 time in total (Reason for editing : typo -_-)

nikkoaki

Posts : 17
Join date : 2017-01-09

View user profile

Back to top Go down

Re: No HW Acceleration for some 4K videos

Post by Admin on Mon Nov 13, 2017 2:45 pm

Those tools most likely always encode baseline profile in compatibility mode.

Admin
Admin

Posts : 3689
Join date : 2011-06-17

View user profile http://codecs.forumotion.net

Back to top Go down

Re: No HW Acceleration for some 4K videos

Post by nikkoaki on Mon Nov 13, 2017 5:45 pm

I just noticed that using Quicksync instead of DXVA gives me smooth playback. I kind of don't like quicksync for decoding since (at least for me) it always gave me problems in the past like the sound and image getting out of sync and small random stutters.
I'll just switch to it whenever i need then.. It's not a perfect fix but it's good enough for me

nikkoaki

Posts : 17
Join date : 2017-01-09

View user profile

Back to top Go down

Re: No HW Acceleration for some 4K videos

Post by Admin on Tue Nov 14, 2017 4:42 pm

Quicksync is outdated and doesn't support HEVC and VP9, so it isn't something I would recommend using by default.

Admin
Admin

Posts : 3689
Join date : 2011-06-17

View user profile http://codecs.forumotion.net

Back to top Go down

Re: No HW Acceleration for some 4K videos

Post by nikkoaki on Tue Nov 14, 2017 5:56 pm

I won't, i'll just change to it when i need to play these types of file.
Thanks again.

nikkoaki

Posts : 17
Join date : 2017-01-09

View user profile

Back to top Go down

Re: No HW Acceleration for some 4K videos

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum