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 hevcIts 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 keyboardSeren 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 problemIll 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:- "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
- 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:- "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
- 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 lowerIm 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.2Edit: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 -
Hi I'm also having trouble playing this 4K HVEC video on my RPi-4B-8GB.
I'm overclocking and increasinggpu_mem
. Here is my config.txt.unless it is HDR, that is not fully supported yet.
The video format is HDR10, so maybe that's the main problem. Although, I've experience flickering when moving around Kodi's menu and also with the Megadrive emulator (but maybe that's an unrrelated problem).
Btw, I also have an LG Tv and just set the
HDMI Ultra HD Deep Color
option and addhdmi_enable_4kp60=1
in my config.txt -
@alegasalv Is the gpu_mem actually using the 512mb though? I found that enabling the 'hdmi_enable_4kp60' overrides the setting, as running 'free' in the terminal was showing less than 512 being used. It's only meant to boost the stock gpu memory by 50mb's...or so I've read.
I have mine set at:
force_turbo=1
over_voltage=8
arm_freq=2147
gpu_freq=750
gpu_mem=512Needed to force_turbo in order to go above gpu_freq=550 though, tested by running 'vcgencmd measure_clock core' to confirm. Also, 'vcgencmd measure_clock arm' for the cpu.
edit: Forgot to mention...if raising the gpu_mem, then using the raspi-config gui to modify anything, it will automatically hash out the hdmi_enable_4kp60 on you...or at least it does for me. I guess it's anything over a certain value.
edit2: Sorry...also forgot to mention that in order to use the gpu_mem=512, you need to enable cma=512 as well. The kernel crashes on me otherwise.
dtoverlay=vc4-fkms-v3d,cma=512
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.