Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Playing 4k HEVC in Kodi



  • So ive been using the latest version of RetroPie for Emulators and Kodi for when i want to stream, but anytime i try to play a 4K HEVC file is crashes kodi
    Im not sure if it’s specifically 4k hevc streams Or all hevc

    Its weird because I thought that the 4b supports hevc?

    Im running on a Rasp pi 4b
    4Gb Ram
    Using the official rasp pi 4 charger
    Only usb device connected is keyboard

    Seren with Real-Debrid is my choice of addon for streaming.

    If anyone could help me figure out why it keeps crashing, i would be forever grateful.
    I really want to watch anything in 4k but cant because if this problem

    Ill attach the crash log file for anyone to look at
    crash log



  • @Justin2916 said in Playing 4k HEVC in Kodi:

    Its weird because I thought that the 4b supports hevc?

    It does.

    But Kodi doesn't support 3rd party piracy addons .. and they're the cause of the crashing which you'll get no help with here, or on the Kodi forums.



  • @Justin2916 4K HEVC is supported and works fine, unless it is HDR, that is not full supported yet.
    Anyway, your crash was because you don't have enough memory allocated to the GPU. The recommended for the Pi 4 is 320MB.



  • @Rascas
    How would i go about allocating more memory to the gpu?
    In the Retropie config.txt file?
    Or the Retropie config in Emulationstation?



  • @Justin2916 Raspberry Pi config.txt, /boot/config.txt



  • @Rascas
    So i got it to finally play after increasing the GPU memory.
    I increased the GPU mem to 512mb.

    But when it started playing, it worked perfectly for about 1 second then the video cut out.
    The stream was still going and the Audio was playing and the subtitles were on point but the video just wouldn’t display.
    Sometimes the video would kind of flicker back for a split second if i moved the mouse around or something. But thats it.

    I tried a couple different sources and all of them had some level of flicker with the video(some are watchable)
    Is It just a video decoding problem?
    Any ideas?



  • @Justin2916 Did you reboot after changing config.txt? Does it play 4k videos fine from the sdcard (not from network or internet) ?



  • @Rascas
    I did reboot ans i did try a download file too but it did the same thing.
    Though, the one I downloaded was the same one i was trying to stream, so that might be why.

    Im trying one of the streams again and I noticed that the video and everything works perfectly right in the very beginning of the stream, but if i touch any buttons at all(even the volume) the video cuts out and doesn’t come back



  • @Justin2916
    I guess this is an error retale to the frame rate.
    See:

    1. "By default, when connected to a 4K monitor, the Raspberry Pi 4B will select a 30hz refresh rate. Use this option to allow selection of 60Hz refresh rates. Note, this will increase power consumption and increase the temperature of the Raspberry Pi. It is not possible to output 4Kp60 on both micro HDMI ports simultaneously." Reference link from raspberrypi forum
    2. Another "evidence": https://www.reddit.com/r/kodi/comments/heg1p9/kodi_flickering/

    If it's really caused by the uncompatible frame rate, the easiest way to address out the issue you'd better to decrease the frame rate manully, see: steps to change frame rate. However, that's only working fine when you are not streamming any sports videos. :|



  • @Justin2916 Reproduce the error again and post a Kodi debug log: https://kodi.wiki/view/Log_file



  • @Janew said in Playing 4k HEVC in Kodi:

    @Justin2916
    I guess this is an error retale to the frame rate.
    See:

    1. "By default, when connected to a 4K monitor, the Raspberry Pi 4B will select a 30hz refresh rate. Use this option to allow selection of 60Hz refresh rates. Note, this will increase power consumption and increase the temperature of the Raspberry Pi. It is not possible to output 4Kp60 on both micro HDMI ports simultaneously." Reference link from raspberrypi forum
    2. Another "evidence": https://www.reddit.com/r/kodi/comments/heg1p9/kodi_flickering/

    If it's really caused by the uncompatible frame rate, the easiest way to address out the issue you'd better to decrease the frame rate manully, see: steps to change frame rate. However, that's only working fine when you are not streamming any sports videos. :|



  • @Janew
    So it stopped doing the flickering on its own, but im still trying to figure out how to enable 60hz in 4k
    The only option is 30hz and lower

    Im using hdmi 0(closest to power input)
    I added “hdmi_enable_4kp60=1 to the config.txt
    I have a native 60hz, 4k tv
    Hdmi ports on TV use HDCP 2.2

    Edit:after 2 weeks, I finally figured out how to get it to display in 4k 60hz!!!
    All i had to do, was go into the picture setting on my tv and enable “hmdi ultra hd deep color”
    Im using a LG tv, on others, this setting will be labeled as “HDMI UHD Color” or something similar



Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.