Posts by csaba

    Hi,

    What is the expected behaviour when I play a Dolby Vision HEVC video on RPI4, if my TV supports Dolby Vision (LG OLED 55 CX)? Using LibreELEC 10.0 RC1 (9.97.1) I see a greenish picture on my TV. I think Dolby Vision is not supported because of the licensing...

    Thank you.

    Hi,

    I have carried out a little test about the HEVC playback capability of my Raspberry PI 4 1 GB with LibreELEC 9.2.2. I used Big Buck Bunny 4K 3840x2160, 30fps, H.264 as a source (http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_…0fps_normal.mp4) and encoded the first 60 seconds of the video to HEVC using Handbrake 1.3.2 with the following settings: MKV, 3840x2160, H.265 10 bit x265, profile main10, level 5.1, constant quality RF 20, 18, 16, 14, 13, 12, 11, 10, 9, 8, and 7 to produce HEVC video files with increasing bitrates.

    During playback KODI Adjust display refresh rate was set to Always, the video was played from a Synology NAS through wired gigabit LAN. (The network bandwith is 930 Mbps measured by iperf3 from the PI to the NAS, and the NAS is able to serve large files at ~800 Mbps speed.)

    According to my test the highest bitrate the PI4 played smoothly was RF13 with the maximum bitrate ~60 Mbps. Playing the RF12 video dropped 3 frames between 30 sec and 40 sec where the video bitrate topped ~70 Mbps. This result is somewhat similar to my experience with real life 4K HEVC UHD-BD videos: if the video bitrate is above 80 Mbps somewhere in the video, the RPI4 playback is likely to get choppy/stuttering.

    The CPU usage is usually very low (<16%) during playback (observed using SSH & top). So I think it is more likely the limitation of the HEVC decoding block of the RPI4 SoC, or some settings in KODI, or the RPI4 is sensitive to some HEVC encoding settings.

    Unfortunately I haven't found the official specification of the RPI4 HEVC playback capability so I don't know what to expect. The only info I've found is the "INSIDE RASPBERRY PI 4" by pi3g.com stating the RPI4 is capable of decoding "HEVCv2 Main 4:4:4 10 design supporting bitstreams up to profile 5.1".

    Above 120 Mbps video bitrate the entire RPI4 is likely to freeze, and above 130 Mbps (RF 7) it is for sure. The PI4 is properly cooled so I think it is not an overheating issue. When the PI4 freezes not only the KODI user interface is unresponsive, but the SSH command line as well, and only disconnecting the power helps.

    You can see the bitrates of the encoded video files by time on the attached chart. The bitrate was calculated using ffprobe.

    I also attached the log file of first playing the RF10 video (result: stuttering) and next playing the RF7 video (result: freeze).

    Hi,


    Setting force_turbo=1 helped a bit, it solved the out of sync audio problem with some hevc movies.


    The gpu_mem=512 crashed the hevc movie playback with every movie I tried, so I reverted back to 320.


    I have carried out extensive tests with different downloaded hevc movies and with the Big Buck Bunny test video converted to hevc with different quality/bitrate settings. Based on the tests I think the RPI4 can play hevc videos smoothly with video bitrates below 80 Mbps, above 80 Mbps the playback stutters. Somewhere above 100 Mbps the RPI4 gets unresponsive and freezes.

    Unfortunately lots of movies are converted/remuxed with parts or the whole movie above 80 Mbps, and the RPI4’s SoC is not capable / not powerful to play them.

    I think it's more like a freeze than a crash. The RPI4 becomes so "slow", that you are not able to interact with it. You can't use the KODI UI, and you can't use the terminal to issue a command either. And after some time the system reboots. It seems to me, that it's the problem of the underlying OS and RPI4 HW.

    I will carry out more test on the weekend, and will try to find other 4K H265 video files to reproduce the problem.

    This video freezes my KODI and RPI4, sometimes the entire system reboots:

    jellyfish-120-mbps-4k-uhd-hevc-10bit.mkv

    It is referenced here in KODI wiki.

    The last log file lines on the terminal screen during freeze:

    2019-12-11 22:48:23.901 T:3011290448 DEBUG: Previous line repeats 3 times.

    2019-12-11 22:48:23.901 T:3011290448 DEBUG: CMMALRenderer::RenderUpdate - vsync 15810 (+1)

    2019-12-11 22:48:23.928 T:2627339120 DEBUG: ffmpeg[9C9A0370]: [hevc] av_rpi_zc_ref: *** Not one of our buffers: NULL

    2019-12-11 22:48:23.968 T:3011290448 DEBUG: Previous line repeats 4 times.

    2019-12-11 22:48:23.968 T:3011290448 DEBUG: CMMALRenderer::RenderUpdate - vsync 15814 (+1)

    2019-12-11 22:48:24.003 T:2627339120 DEBUG: ffmpeg[9C9A0370]: [hevc] av_rpi_zc_ref: *** Not one of our buffers: NULL

    2019-12-11 22:48:24.233 T:3011290448 DEBUG: Previous line repeats 17 times.

    2019-12-11 22:48:24.233 T:3011290448 DEBUG: CMMALRenderer::RenderUpdate - vsync 15830 (+1)

    2019-12-11 22:48:24.292 T:2627339120 DEBUG: ffmpeg[9C9A0370]: [hevc] av_rpi_zc_ref: *** Not one of our buffers: NULL

    2019-12-11 22:48:24.423 T:3011290448 DEBUG: Previous line repeats 8 times.

    2019-12-11 22:48:24.423 T:3011290448 DEBUG: CMMALRenderer::RenderUpdate - vsync 15840 (+2)

    2019-12-11 22:48:24.438 T:2627339120 DEBUG: ffmpeg[9C9A0370]: [hevc] av_rpi_zc_ref: *** Not one of our buffers: NULL

    Hi,

    I would like to include the LFE channel (.1) when 5.1 audio is downmixed to 2.0 by KODI. The default behaviour is that the LFE is dropped, and because of that I miss the bass effects from the movies.

    The Raspberry PI is connected to a Sony TV by HDMI, and a stereo amplifier is connected to the optical output of the TV by an optical cable. The stereo amplifier is not capable of Dolby 5.1 decoding, so the Raspberry PI + KODI has to do the job. My speakers are able to reproduce the bass of the LFE channel, but they don't get it, because the LFE is dropped during the downmix process.

    Csaba

    Hi,

    I have tested more VC-1 movies on my PI 4, and I think that if one cpu core is powerful enough to decode the movie (decoder cpu core utilization < 95%), then the playback is smooth (no frame drop), and if one the decoder core utilization is higher than 95% VC-1 playback stutters, there are frame drops.

    Csaba

    Hi,

    I have stuttering problem with some VC-1 full HD movies on PI 4 (1080p 23.976 fps 22.2 Mbps TrueHD 5.1). Player debug info reports several dropped frames, and one cpu core has 98-100% load. It can be reproduced with the VC-1 sample file on KODI Samples page: VC-1 1080i/29.970 (MKV w/DTS-HD MA 5.1 audio). Interestingly the other sample VC-1 file plays smoothly.

    9.1.002 ALPHA is installed on PI 4, 'Adjust display refresh rate' is set to Always, there is no thermal throttling (arm_freq is 1500).

    I understand, that PI 4 has no HW decode, so I can't by a licence. It seems to me, that the software decode uses only one core, and maybe it's too much work for it.

    Does anybody has the same experience?

    Csaba