barkzer
Posts: 4
Joined: Sun Jul 23, 2017 10:09 pm

Kodi crashing when attempting to play x265 files

Sun Jul 23, 2017 10:17 pm

Hi all,

I've recently purchased a Raspberry Pi 3 with retropie, however I'm having an issue with playing x265 files.
I'll explain my current setup first, however.

Upstairs I have two external HDDs plugged into a WDLive player. Those drives are discoverable over the network via SMB; I can access them via a laptop, etc.

Now, downstairs I have my Raspberry Pi 3 and I access the media via wifi. The first time I set it up it sync the library; took some time, but then I could play files; sometimes a little sketchy, but fine. However I then added a x265 file, re-synced the library, then tried to play. However, when I do this, Kodi thinks about it for approximately 5 seconds on a black screen, then Kodi 'crashes' and it goes back to the emulationstation screen and I have to select Kodi again and restart it.
I also added a x265 file to a USB, plugged it in to the Pi and tried to play it - crashed.

Any help would be greatly appreciated as I want to replace my upstairs WDLive player with another Pi3 and stream to downstairs also.

Thanks so much.

Matt

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

Re: Kodi crashing when attempting to play x265 files

Mon Jul 24, 2017 7:15 am

The Pi does NOT have a HW H265 decoder. It has to do that decode in software. That might be overloading the power supply, if you even have the x265 software decoder installed.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

barkzer
Posts: 4
Joined: Sun Jul 23, 2017 10:09 pm

Re: Kodi crashing when attempting to play x265 files

Mon Jul 24, 2017 8:08 am

Hi Jamesh,

Firstly thank you for your reply.
Secondly, how do I install a decoder for the purpose of playing x265 files?

Appreciate any assistance in rectifying my issues.

Cheers,

Matt

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

Re: Kodi crashing when attempting to play x265 files

Mon Jul 24, 2017 8:24 am

Not sure how to do it in Kodi - might already be installed. However, you are not going to get great performance - think it runs out of stream at 720p30, any more than that and there is not enough CPU power to decode it.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

User avatar
Imperf3kt
Posts: 4675
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Kodi crashing when attempting to play x265 files

Mon Jul 24, 2017 8:49 am

Kodi doesn't support HEVC/265 files.
You either need to use x264 or something royalty free like vp9
55:55:44:44:4C
52:4C:52:42:41

Rose tinted glasses are difficult to see through.

Rascas
Posts: 761
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal

Re: Kodi crashing when attempting to play x265 files

Mon Jul 24, 2017 11:50 am

Kodi should play 720p h265 files fine on the Rpi 3. Some 1080p can be slow but they should play not crash. What is your kernel firmware version? You need a recent ones for h265 playback so update your system packages.

beta-tester
Posts: 1554
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Kodi crashing when attempting to play x265 files

Mon Jul 24, 2017 12:06 pm

Rascas wrote:Kodi should play 720p h265 files fine on the Rpi 3. Some 1080p can be slow but they should play not crash. What is your kernel firmware version? You need a recent ones for h265 playback so update your system packages.
kodi should or do you expect that it should?
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

Rascas
Posts: 761
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal

Re: Kodi crashing when attempting to play x265 files

Mon Jul 24, 2017 12:17 pm

beta-tester wrote:
Rascas wrote:Kodi should play 720p h265 files fine on the Rpi 3. Some 1080p can be slow but they should play not crash. What is your kernel firmware version? You need a recent ones for h265 playback so update your system packages.
kodi should or do you expect that it should?
I said should because it depends on many things, like bitrate, fps, and other selected options at encode time.
For example, with the latest kodi version available on Raspbian, I could play every 1080p, 24fps, h265 files that I throw at it just fine, without slowdowns.

User avatar
Imperf3kt
Posts: 4675
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Kodi crashing when attempting to play x265 files

Mon Jul 24, 2017 9:06 pm

For a laptop or desktop linux install, you can use hardware decoding, but for Raspbian on Pi3, you must use software decoding, which is too much for the Pi to handle in most cases.
Kodi v14 (changelog) introduced software decoding support for HEVC. Kodi v15 (changelog) introduced limited hardware decoding support for some devices, such as a few Android-based video decoders, for Linux on Amlogic SoCs and for Windows via DXVA. Kodi v16 (changelog) further improved hardware decoding on Android and Windows and introduced it via VAAPI and VDPAU API on linux. Most HTPCs do not have hardware decoding support for HEVC, so they will need a fairly powerful desktop class CPU in order to playback HEVC videos.
http://kodi.wiki/view/HEVC
55:55:44:44:4C
52:4C:52:42:41

Rose tinted glasses are difficult to see through.

asavah
Posts: 384
Joined: Thu Aug 14, 2014 12:49 am

Re: Kodi crashing when attempting to play x265 files

Mon Jul 24, 2017 9:38 pm

All the info in this thread is wrong and outdated.

Current Kodi master on pi _3_ with proper kernel and uptodate firmware can play hevc(x265) very well.
It's not pure hardware decoding but a state-of-the-art hack which offloads some heavy work to VC4.
pi1 won't be up to the job, I'm not sure about pi2, pi2 rev 1.2 which has cortex-a53 should be good if overclocked, pi3 with slight memory overclock is recommended. Edit: get a good PSU and heatsink too.
From my personal experience even 1080p hevc play flawlessly from NFS share (kernel mount).

Some outstanding work has been done by Dom (popcornmix) and other people (I don't know who you are, but you rock)
However you would need to build Kodi from right source https://github.com/popcornmix/xbmc/tree/newclock5 with ffmpeg built with right patches https://github.com/popcornmix/xbmc/blob ... ions.patch < this is the key.
Building Kodi on raspbian from source would require time and knowledge.

Those wishing to try out experimental features should use @Milhouse's LibreElec test builds https://forum.kodi.tv/showthread.php?tid=298461

My suggestion would be to get an additional sdcard and try those builds.

User avatar
Imperf3kt
Posts: 4675
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Kodi crashing when attempting to play x265 files

Mon Jul 24, 2017 10:05 pm

Hmm, will try that because the Kodi build you get from the Raspbian repositories definitely does not work for .265 files
55:55:44:44:4C
52:4C:52:42:41

Rose tinted glasses are difficult to see through.

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Kodi crashing when attempting to play x265 files

Tue Jul 25, 2017 2:46 am

Imperf3kt wrote:Hmm, will try that because the Kodi build you get from the Raspbian repositories definitely does not work for .265 files
It does work if the resolution and fps is not too high. I've tested the new German DVB-T2 format, H265 at 1280p50, and it played with a lot missing frames. One of my test files was corrupted during recording (message on my tuner box). When I tried to play that file, kodi crashed. But for lower resolution and frame rates it plays quite well.
And I used the version from the repository!
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Rascas
Posts: 761
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal

Re: Kodi crashing when attempting to play x265 files

Wed Jul 26, 2017 1:45 pm

There seems to be some misinformation about Kodi on Raspbian.
Like said above by asavah and in other topics, the Raspberry Pi doesn't have a h265 hardware decoder but work has been made by dom and other Raspberry Pi enginners to offload some of the work to the hardware.
But contrary to what asavah said, this patches/optimizations are currently included not only on Libre/OpenELEC, OSMC but also on the current available packages in Raspbian. So you don't need to compile Kodi for it, because it is already done.
So yes, the RPi 2 and 3 can play h265 files!
But for that, like I said above, you need the latest Raspbian image, or to update your kernel/firmware version, otherwise Kodi will crash playing h265.
Like it is now, the RPi 2 plays 720p24 fps h265 just fine and the Pi 3 plays 1080p24 h265. Since the Pi 1/0 is armv6, so without support of neon instructions, this optimizations won't work on them.
H265 videos with more than 24 fps will probably strugle to play since more processing power is required.
@greikdl Kodi can crash playing malformed videos, not just h265 ones. It happened for me before with h264 and mpeg2 files and also happens in x86_64 Ubuntu system.

barkzer
Posts: 4
Joined: Sun Jul 23, 2017 10:09 pm

Re: Kodi crashing when attempting to play x265 files

Mon Aug 07, 2017 10:57 am

Update:
Bought a new SD card and installed OMSC via NOOBS and it played the same X265 file, no worries.
I'll do some more testing and try a fresh install of Kodi and see if it works :)

barkzer
Posts: 4
Joined: Sun Jul 23, 2017 10:09 pm

Re: Kodi crashing when attempting to play x265 files

Tue Aug 08, 2017 12:16 pm

Okay so cancel that last post. The file was actually x264 but labelled as x265.
Downloaded another 1080p x265 and definitely didn't work :(

Return to “Troubleshooting”