(Note: there is a copy of this thread on the Kodi forums: link)
Hi everyone, and thanks in advance for your help,
I am running OSMC 2021.12-1 (kernel: Linux 5.10.78-2-osmc) on a Raspberry Pi CM4 (2GB RAM, 32GB eMMC storage) and on the carrier board ‘TOFU’ (oratek).
I am using the skin Estuary and no special add-on to my knowledge.
Issue:
I have some custom-made m3u playlists that point to files stored in the SSD drive. When I read them, everything works perfectly for about 7 minutes, then I get a blue screen with a frowny face and Kodi restarts. The log file seems to point to an ffmpeg error with memory allocation on the heap.
The error always arises when switching from one video to another in the playlist, but happens regardless of the video (the playlist is randomized). The error is always identical. Here is the log.
The error is at the end of that log and is the following:
2022-01-21 14:34:33.951 T:1510 INFO <general>: ffmpeg[(nil)X]: Failed to alloc 12533760 from dma-heap(fd=176): 12 (Cannot allocate memory)
2022-01-21 14:34:33.951 T:1510 ERROR <general>: ffmpeg[(nil)X]: [hevc] v4l2_request_hevc_start_frame: Failed to get dst buffer
I found only one thread online with a similar issue here (I also have 4k video). But the “cma-512” solution was already in my /boot/config.txt as shipped by OSMC.
I tried creating a swap file to no effect (still same error after same amount of time).
I am out of ideas here as to what I could test, would anyone be able to help?
Hmm. have about the same issue. Didn’t time it to 7minutes though.
My logs showed nothing (I admit, I’m not running in debug mode). Running the same skin estuary.
Kernel:$ uname -a
Linux vero4k2 4.9.113-60-osmc #1 SMP PREEMPT Sun Dec 19 23:56:28 UTC 2021 aarch64 GNU/Linux
And running on a vero4k2+.
The files are mounted through NFS partition/fstab - hence it seems local to kodi.
Playlist is the format: more than 3 stars, so it is dynamically extracted songs.
We did some digging in the Kodi forum thread, and we found that the issue doesn’t happen in LibreELEC.
They seem to suggest the main difference in ffmpeg between LibreELEC and OSMC (at identical Kodi versions) is that LibreELEC has a patch that optimizes memory.
I’d like to try applying that patch to ffmpeg in OSMC to see if that fixes the issue, but I don’t know how to do it. Could anyone here give me some pointers?
I am seeing a similar issue on a Pi 3B+ with playing a continuous slideshow of pictures and videos, I have an autoexec.py file which adds them from a folder. Things were fine with the 2021.11-2 version and after I upgraded it, Kodi would freeze after a few hours. I started afresh with the 2021.12-1 version, and that does the same. The processor load values seem to creep up slowly over time. Will logs be collected in such cases if I enable that?
The folder that I am copying the files from does contain both photos and videos. Digital picture frames do not seem to allow display of both together, it is one or the other, so OSMC/Kodi is a great alternative. For a while, with Kodi 18, that feature was lost, but fortunately it was restored later. With Kodi 17, I could even have background music which would stop during videos and restart for the pictures, but that feature was apparently something unintended and could not be brought back!
I tested with the latest OSMC release, and the display seems to freeze with the very first video. With the earlier releases, it would take more time. The 2021.08-1 version seems to be the only version which works properly. Now that Kodi 19.4 is incorporated, can this be looked into? Thanks.
The latest release might have solved the issue of crashing the slideshow when playing playlists with photos and videos together, I don’t see the processor load values gradually increasing over time. Perhaps the other people who had this issue could also test and confirm? Thanks.
Looks like my setup also goes into a no video output state after a few days of the slideshow with mixed photos and videos. I did enable logging, but without a video output, I don’t quite know how to upload the logs. I can connect via ssh and see the logs in the .kodi/temp folder, I could transfer them to my laptop using WinSCP. I am not sure whether the logs are indeed correct, as I don’t see anything with earlier timestamps. Will it help if I put them on my Google drive and provide a link? Thanks.
Just checking back to see if the logs were of any use. This is a standard installation, no customization except for the autoexec.py starting the slideshow with mixed photos and videos. It seems to run well for a few days, but then the processor load values seem to go up and the display is gone. Stopping and restarting Kodi seems to work sometimes, reboot is the only other option. Thanks.
After more testing, I think that this issue might be related to the TV used for the display. When I use an old Dynex 19" TV with a 1366 x 768 pixel resolution, I have the video freeze problem. But with a more recent 39" Samsung TV that has a 1920 x 1080 resolution, the problem does not seem to be there. Even if I use an old Dell 19" monitor which has a 1280 x 1024 resolution, with a HDMI to DVI adapter, the photo/video display continues on without any issues. The processor load values also seem to be more erratic when I use the Dynex as compared to the Samsung or Dell. Is there anything in the video drivers that gets impacted by the resolution? Is there any Kodi/OSMC setting that needs to be changed?