HEVC decoding via VDPAU inside MythTV

Do you want advice about what hardware to buy for use with MythTV? Ask here.

Moderator: Forum Moderators

Post Reply
laasa
Junior
Posts: 19
Joined: Tue Jan 03, 2017 2:48 pm
Germany

HEVC decoding via VDPAU inside MythTV

Post by laasa »

Does anyone use HEVC decoding via VDPAU inside MythTV?

I am using
- Mythbuntu 16.04
- MythTV 0.28 synced to GIT
- Palit GeForce 1050Ti
- manual installed NVidia driver 375.26
- any VDPAU video profile.
Playing H264 and MPEG2 material works fine with HW acceleration.
HEVC material is not played. I got message box "Failed to initialize A/V Sync".
mplayer works fine (mplayer -vo vdpau -vc ffhevcvdpau <file>). Via top I can see that HEVC decoding really works.

In mythtvfrontend log (option: -v playback) I have found the error "VidOutVDPAU: Codec is not supported.".
In source file libs\libmythtv\videoout_vdpau.cpp the case of HEVC material is really missed.
When I add it
...
case kCodec_VC1_VDPAU:
vdp_decoder_profile = VDP_DECODER_PROFILE_VC1_ADVANCED;
break;
case kCodec_HEVC_VDPAU:
vdp_decoder_profile = VDP_DECODER_PROFILE_HEVC_MAIN;
max_refs = 16;
break;

default:
LOG(VB_GENERAL, LOG_ERR, LOC +
"Codec is not supported.");
errorState = kError_Unknown;
return;
...
some frames are works fine but then the PC freezes.

Thanks for any idea?
hrau
Newcomer
Posts: 3
Joined: Tue Nov 22, 2016 12:04 pm
Germany

Re: HEVC decoding via VDPAU inside MythTV

Post by hrau »

same issue here when decoding DVB-T2 HD (HEVC) live TV
any solution available..?!

Thanks
laasa
Junior
Posts: 19
Joined: Tue Jan 03, 2017 2:48 pm
Germany

Re: HEVC decoding via VDPAU inside MythTV

Post by laasa »

Looks like that it is an issue with quickly switching interlace mode inside MythTV at the start of playing any content.
When I disable deinterlacing for HEVC material it works.
Attachments
hevc_vdpau.diff
(1.09 KiB) Downloaded 261 times
hrau
Newcomer
Posts: 3
Joined: Tue Nov 22, 2016 12:04 pm
Germany

Re: HEVC decoding via VDPAU inside MythTV

Post by hrau »

perfect; thank you
DVB-T2 HD works now !!
patch should be implemented offical
chiluk
Newcomer
Posts: 3
Joined: Tue Feb 07, 2017 7:04 am
United States of America

Re: HEVC decoding via VDPAU inside MythTV

Post by chiluk »

Has anyone looked at integrating this into the git? Is there an open bug trac about this? I'm interested in this fix as well. I'd be willing to push the fix into Ubuntu once it's integrated into mythtv master.

Looking at the patch though, I don't think that disabling de-interlacing is the correct answer. I have a feeling something needs to be fixed in the if (enable) section of VideoOutputVDPAU::SetupDeinterlace instead.
chiluk
Newcomer
Posts: 3
Joined: Tue Feb 07, 2017 7:04 am
United States of America

Re: HEVC decoding via VDPAU inside MythTV

Post by chiluk »

Looking more closely, h265/HEVC support needs to be added to VideoOutputVDPAU::DrawSlice.
chiluk
Newcomer
Posts: 3
Joined: Tue Feb 07, 2017 7:04 am
United States of America

Re: HEVC decoding via VDPAU inside MythTV

Post by chiluk »

I created a ticket for this.
https://code.mythtv.org/trac/ticket/12992
User avatar
pgbennett
Developer
Posts: 504
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: HEVC decoding via VDPAU inside MythTV

Post by pgbennett »

I have committed the patch to MythTV git. It is available in fixes/29.
halucigenia
Senior
Posts: 122
Joined: Tue Nov 11, 2014 11:03 am
Great Britain

Re: HEVC decoding via VDPAU inside MythTV

Post by halucigenia »

Hi, I just came across this thread and wanted to test out HEVC decoding via VDPAU inside MythTV.
I have a GTX1050Ti which should be capable.
I have updated to mythtv-frontend amd64 2:29.1+fixes.201812281328.af5d819
I am using the VDPAU high quality playback setting
I have a video file which shows the following in mediainfo
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L4.1@Main
Codec ID : V_MPEGH/ISO/HEVC

But it won't play...

Is there something that I am missing?
User avatar
pgbennett
Developer
Posts: 504
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: HEVC decoding via VDPAU inside MythTV

Post by pgbennett »

Only certain NVidia cards will support H265. See https://developer.nvidia.com/video-enco ... ort-matrix
H265 was disabled in some versions of FFmpeg VDPAU, but is enabled in the latest version..
The latest master source of MythTV has been upgraded to FFmpeg 4.1 and VDPAU HEVC works there.
The latest master also has support for NVDEC, which works with HEVC.
halucigenia
Senior
Posts: 122
Joined: Tue Nov 11, 2014 11:03 am
Great Britain

Re: HEVC decoding via VDPAU inside MythTV

Post by halucigenia »

OK, pgbennett, so are you saying that it won't work with mythtv-frontend amd64 2:29.1+fixes.201812281328.af5d819 and I would have to install the latest master source?
halucigenia
Senior
Posts: 122
Joined: Tue Nov 11, 2014 11:03 am
Great Britain

Re: HEVC decoding via VDPAU inside MythTV

Post by halucigenia »

OK, after further experimentation I have found that I can use HEVC decoding via VDPAU inside MythTV with my hardware and current build of MythTv as long as it is 8bit and not 10bit encodes (that's what I was missing).

However, I see that things may be different in MythTV 30:-
"Hardware accelerated H.265/HEVC decoding with VDPAU is not available any more for Nvidia users. (This feature may come back in MythTV 31 with the NVDEC extension. In the meantime OpenGL playback is recommended for H.265/HEVC playback. Another option is to stay with MythTV 29, perhaps with the patch in #13211, if surround sound is used, e.g. for German DVB T2 HD.)"
https://www.mythtv.org/wiki/Release_Notes_-_30

So I may be waiting until MythTV 31 is available before I next upgrade if I want to keep HEVC decoding via VDPAU inside MythTV working.
User avatar
pgbennett
Developer
Posts: 504
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: HEVC decoding via VDPAU inside MythTV

Post by pgbennett »

It looks that way. It is working in Master if you want to run that, with the caveat that it may be less stable than the release version. However many people use the Master version.
Post Reply