innocent_bystander
Posts: 45
Joined: Mon Oct 15, 2018 12:15 am
Location: Florida, USA

RPi4 HEVC (h.265) playback not possible on Raspbian?

Sun Jul 21, 2019 7:13 pm

I have a number of .mkv files with 1080p HEVC (h.265) content and I can't get them to play smoothly.

- VLC playback is extremely choppy (no h/w decoding)
- Kodi can somewhat cope with them if there is not much motion in the content (no h/w decoding)
- omxplayer gives error: "Vcodec id unknown: ad"

I gave LibreELEC a spin and that worked well, however, I am also using my Pi for tinkering and other stuff and would like to keep Raspbian.

Has anyone been able to play HEVC files successfully? RPi 4 specs say it supports h/w decoding for HEVC (h.265). Not sure what gives.

If anyone could shed some light and any pointers on what I can do would be appreciated.

Thank you.
The Sirius Cybernetics Corporation is the primary manufacturer and supplier of androids, robots and autonomic assistants for the known universe. ... The company motto is "Share and Enjoy."

drgeoff
Posts: 9643
Joined: Wed Jan 25, 2012 6:39 pm

Re: RPi4 HEVC (h.265) playback not possible on Raspbian?

Sun Jul 21, 2019 7:27 pm

LibreELEC is currently the only one that utilises the RPI4B's hardware support for H.265 decoding.

innocent_bystander
Posts: 45
Joined: Mon Oct 15, 2018 12:15 am
Location: Florida, USA

Re: RPi4 HEVC (h.265) playback not possible on Raspbian?

Mon Jul 22, 2019 8:15 pm

Well, if LibreELEC can do it, it should be possible to do it on Raspbian too, no?
The Sirius Cybernetics Corporation is the primary manufacturer and supplier of androids, robots and autonomic assistants for the known universe. ... The company motto is "Share and Enjoy."

User avatar
davidcoton
Posts: 3952
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: RPi4 HEVC (h.265) playback not possible on Raspbian?

Mon Jul 22, 2019 8:38 pm

innocent_bystander wrote:
Mon Jul 22, 2019 8:15 pm
Well, if LibreELEC can do it, it should be possible to do it on Raspbian too, no?
Possible, yes.
Currently, no, as @drgeoff said.
Signature retired

innocent_bystander
Posts: 45
Joined: Mon Oct 15, 2018 12:15 am
Location: Florida, USA

Re: RPi4 HEVC (h.265) playback not possible on Raspbian?

Mon Jul 22, 2019 8:44 pm

@davidcoton any idear what the holdup is? No interest? (hard to believe) No one can figure it out? (LE people did) No one got around to it?
The Sirius Cybernetics Corporation is the primary manufacturer and supplier of androids, robots and autonomic assistants for the known universe. ... The company motto is "Share and Enjoy."

User avatar
davidcoton
Posts: 3952
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: RPi4 HEVC (h.265) playback not possible on Raspbian?

Mon Jul 22, 2019 8:48 pm

innocent_bystander wrote:
Mon Jul 22, 2019 8:44 pm
@davidcoton any idear what the holdup is? No interest? (hard to believe) No one can figure it out? (LE people did) No one got around to it?
Although I live within a few miles of Pi Towers, I have no insider knowledge.

Just by reading the fora here we all know that the engineers are very busy, there are lots of things to add to or correct in the Buster/Pi4 ecosystem, but only limited information about particular issues and priorities. You could try searching on here for specific issues.
Signature retired

trejan
Posts: 429
Joined: Tue Jul 02, 2019 2:28 pm

Re: RPi4 HEVC (h.265) playback not possible on Raspbian?

Mon Jul 22, 2019 9:07 pm

The devs know what to do. It is actually finding the time to do the work and there is a lot of it. The way the h.265 decoder works is different to h.264 which means you can't use the old MMAL interface which is deprecated now anyway. Eventually everything will use the V4L2 interface but that is where the work needs to be done.

LibreELEC can decode h.265 because there were RPi 4 specific patches made to the LibreELEC copy of ffmpeg so it can access the new decoder. Eventually these patches will need to be replaced when the V4L2 interface is ready.

innocent_bystander
Posts: 45
Joined: Mon Oct 15, 2018 12:15 am
Location: Florida, USA

Re: RPi4 HEVC (h.265) playback not possible on Raspbian?

Mon Jul 22, 2019 9:12 pm

davidcoton wrote:
Mon Jul 22, 2019 8:48 pm
Just by reading the fora here we all know that the engineers are very busy ...

@davidcolton it looks like there are too many bystanders and not enough engineers... :D

I got in touch with a very nice fella by the name of @popcornmix, who deserves a beer -- actually a case of beer. He has a kodi branch with working HEVC hardware decoding, which is what's used by LibreELEC.

From what I understood from him, the problem is twofold:

1. HEVC decoding can't be done purely by the GPU. It requires some work to be done on the CPU side. So omxplayer, which only supports GPU codecs is out of the question.

2. On top of that HEVC decoder uses custom pixel format, so some additional patching is required for the likes of VLC, mpv, kodi, etc. There is already a haxxored version of kodi, which is used by LibreELEC, and some work is being done to get VLC working as well.

On top of all that there is some major rework is being done in the Linux kernel and Kodi to properly support 10-bit HDR.

I hope this sheds some light.
The Sirius Cybernetics Corporation is the primary manufacturer and supplier of androids, robots and autonomic assistants for the known universe. ... The company motto is "Share and Enjoy."

innocent_bystander
Posts: 45
Joined: Mon Oct 15, 2018 12:15 am
Location: Florida, USA

Re: RPi4 HEVC (h.265) playback not possible on Raspbian?

Mon Jul 22, 2019 9:19 pm

trejan wrote:
Mon Jul 22, 2019 9:07 pm
The devs know what to do. It is actually finding the time to do the work and there is a lot of it. The way the h.265 decoder works is different to h.264 which means you can't use the old MMAL interface which is deprecated now anyway. Eventually everything will use the V4L2 interface but that is where the work needs to be done.

LibreELEC can decode h.265 because there were RPi 4 specific patches made to the LibreELEC copy of ffmpeg so it can access the new decoder. Eventually these patches will need to be replaced when the V4L2 interface is ready.

@trejan you've nailed it my friend. It seems getting kodi to work on Raspbian would be the path of least resistance since a patched version already exists for LibreELEC.

Anyone up for the task? :shock:
The Sirius Cybernetics Corporation is the primary manufacturer and supplier of androids, robots and autonomic assistants for the known universe. ... The company motto is "Share and Enjoy."

User avatar
davidcoton
Posts: 3952
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: RPi4 HEVC (h.265) playback not possible on Raspbian?

Mon Jul 22, 2019 9:20 pm

innocent_bystander wrote:
Mon Jul 22, 2019 9:12 pm
@davidcolton it looks like there are too many bystanders and not enough engineers... :D
That shows a total disregard for the work of the RPT staff, and what they achieve with a small team of engineers and no bystanders.

You seem to have found the answers to your questions by your own research, well done.
Signature retired

innocent_bystander
Posts: 45
Joined: Mon Oct 15, 2018 12:15 am
Location: Florida, USA

Re: RPi4 HEVC (h.265) playback not possible on Raspbian?

Mon Jul 22, 2019 9:24 pm

davidcoton wrote:
Mon Jul 22, 2019 9:20 pm
That shows a total disregard for the work of the RPT staff, and what they achieve with a small team of engineers and no bystanders.

@davidcolton you misunderstood me. I wasn't referring to the RPT staff. I admire them for what they do. I was referring to everyone outside of their organization, like you, me and many other people on these fora... :o
The Sirius Cybernetics Corporation is the primary manufacturer and supplier of androids, robots and autonomic assistants for the known universe. ... The company motto is "Share and Enjoy."

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23083
Joined: Sat Jul 30, 2011 7:41 pm

Re: RPi4 HEVC (h.265) playback not possible on Raspbian?

Mon Jul 22, 2019 9:37 pm

innocent_bystander wrote:
Mon Jul 22, 2019 9:19 pm
trejan wrote:
Mon Jul 22, 2019 9:07 pm
The devs know what to do. It is actually finding the time to do the work and there is a lot of it. The way the h.265 decoder works is different to h.264 which means you can't use the old MMAL interface which is deprecated now anyway. Eventually everything will use the V4L2 interface but that is where the work needs to be done.

LibreELEC can decode h.265 because there were RPi 4 specific patches made to the LibreELEC copy of ffmpeg so it can access the new decoder. Eventually these patches will need to be replaced when the V4L2 interface is ready.

@trejan you've nailed it my friend. It seems getting kodi to work on Raspbian would be the path of least resistance since a patched version already exists for LibreELEC.

Anyone up for the task? :shock:
We are, and it's on the list to do. We only have a limited number of engineers, about 10 SW guys, and socks are being worked off on the list of issues that always appear on a new release. Although, actually, its not too bad given this is the biggest change to the HW since we started. Still a big list, just not as bad as it could have been. And, of course, other projects also demand time.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

innocent_bystander
Posts: 45
Joined: Mon Oct 15, 2018 12:15 am
Location: Florida, USA

Re: RPi4 HEVC (h.265) playback not possible on Raspbian?

Mon Jul 22, 2019 9:56 pm

jamesh wrote:
Mon Jul 22, 2019 9:37 pm
We are, and it's on the list to do. We only have a limited number of engineers, about 10 SW guys, and socks are being worked off on the list of issues that always appear on a new release. Although, actually, its not too bad given this is the biggest change to the HW since we started. Still a big list, just not as bad as it could have been. And, of course, other projects also demand time.

Hi @jamesh. Thanks for chiming in and thanks for all the incredible work you guys have done. :D

While trolling @davidcoton here I was quietly compiling @popcornmix's kodi 18 with HEVC patches in the background. Initial results are very encouraging. I am finally able to play my h.265 1080p videos without stutter. 8-)

Once I figure out how to package it up as a .deb, I will post it here for others.
The Sirius Cybernetics Corporation is the primary manufacturer and supplier of androids, robots and autonomic assistants for the known universe. ... The company motto is "Share and Enjoy."

innocent_bystander
Posts: 45
Joined: Mon Oct 15, 2018 12:15 am
Location: Florida, USA

Kodi 18.3 Leia for Raspberry Pi 4

Wed Jul 24, 2019 2:14 am

Last edited by innocent_bystander on Mon Jul 29, 2019 2:49 pm, edited 3 times in total.
The Sirius Cybernetics Corporation is the primary manufacturer and supplier of androids, robots and autonomic assistants for the known universe. ... The company motto is "Share and Enjoy."

deanresin
Posts: 10
Joined: Sun Dec 02, 2018 8:11 am

Re: RPi4 HEVC (h.265) playback not possible on Raspbian?

Mon Aug 05, 2019 1:27 am

davidcoton wrote:
Mon Jul 22, 2019 9:20 pm
innocent_bystander wrote:
Mon Jul 22, 2019 9:12 pm
@davidcolton it looks like there are too many bystanders and not enough engineers... :D
That shows a total disregard for the work of the RPT staff, and what they achieve with a small team of engineers and no bystanders.

You seem to have found the answers to your questions by your own research, well done.
Not really a disregard at all. It happened to be the truth actually.

I'm actually quite upset I bought the RPI4 since it was marketed as HVEC capable. There was no mention of course there was no software to support it and not even a release date.

fruitoftheloom
Posts: 20210
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: RPi4 HEVC (h.265) playback not possible on Raspbian?

Mon Aug 05, 2019 1:43 am

deanresin wrote:
Mon Aug 05, 2019 1:27 am
davidcoton wrote:
Mon Jul 22, 2019 9:20 pm
innocent_bystander wrote:
Mon Jul 22, 2019 9:12 pm
@davidcolton it looks like there are too many bystanders and not enough engineers... :D
That shows a total disregard for the work of the RPT staff, and what they achieve with a small team of engineers and no bystanders.

You seem to have found the answers to your questions by your own research, well done.
Not really a disregard at all. It happened to be the truth actually.

I'm actually quite upset I bought the RPI4 since it was marketed as HVEC capable. There was no mention of course there was no software to support it and not even a release date.

LibreElec supports HVEC

https://libreelec.tv/2019/06/libreelec- ... ha1-rpi4b/
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

deanresin
Posts: 10
Joined: Sun Dec 02, 2018 8:11 am

Re: RPi4 HEVC (h.265) playback not possible on Raspbian?

Mon Aug 05, 2019 1:46 am

fruitoftheloom wrote:
Mon Aug 05, 2019 1:43 am
deanresin wrote:
Mon Aug 05, 2019 1:27 am
davidcoton wrote:
Mon Jul 22, 2019 9:20 pm

That shows a total disregard for the work of the RPT staff, and what they achieve with a small team of engineers and no bystanders.

You seem to have found the answers to your questions by your own research, well done.
Not really a disregard at all. It happened to be the truth actually.

I'm actually quite upset I bought the RPI4 since it was marketed as HVEC capable. There was no mention of course there was no software to support it and not even a release date.

LibreElec supports HVEC

https://libreelec.tv/2019/06/libreelec- ... ha1-rpi4b/
That's a good point. I can't use libreelec but I suppose I can't complain about my specific scenario.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23083
Joined: Sat Jul 30, 2011 7:41 pm

Re: RPi4 HEVC (h.265) playback not possible on Raspbian?

Mon Aug 05, 2019 9:14 am

deanresin wrote:
Mon Aug 05, 2019 1:27 am
davidcoton wrote:
Mon Jul 22, 2019 9:20 pm
innocent_bystander wrote:
Mon Jul 22, 2019 9:12 pm
@davidcolton it looks like there are too many bystanders and not enough engineers... :D
That shows a total disregard for the work of the RPT staff, and what they achieve with a small team of engineers and no bystanders.

You seem to have found the answers to your questions by your own research, well done.
Not really a disregard at all. It happened to be the truth actually.

I'm actually quite upset I bought the RPI4 since it was marketed as HVEC capable. There was no mention of course there was no software to support it and not even a release date.
We could have waited to release the Pi4 until we had a specific driver ready for the HEVC in Raspbian. But if you use that process, you never release anything because there is always something left to do. Same with USB boot. Since HEVC and USB boot are small use cases (currently - that will clearly change), we would have been delaying people who are fine without those features getting a new Pi.

So the Pi4 is HEVC capable, LibreElec works fine, and there will be a driver to use it in Raspbian in the future.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

Shadowmeph
Posts: 1
Joined: Fri Dec 22, 2017 7:22 pm

Re: RPi4 HEVC (h.265) playback not possible on Raspbian?

Sun Aug 18, 2019 7:18 pm

this is all good to know I was debating on buying a pi 4 but was wondering about the HVEC because even my Android tablet has issues playing those I cant remember what my Pi 3 b was using libreelec or a different one anyway thanks for t he info Peeps :)

Return to “Troubleshooting”