Page 1 of 1
Posted: Mon Oct 02, 2017 5:09 pm
If I run hello_video.bin with a rather large .h264 file on a pi3, it seems to consume almost all available memory.
Is this expected behavour? I would like to avoid that the system starts using a swap file. If I stop the program and run top, the memory does not come back. I might not have the most recent hello_video.bin, but I am not aware of any recent patches that might alter it's behavour.
When I use omxplayer instead, I have some scrolling text in the video that becomes jerky. It's almost like the screen refreshing doesn't align with the frame update so that occasionally the text is shifting 2 pixels instead of one. I can't seem to find a setting that fixes this.
Posted: Mon Oct 02, 2017 5:14 pm
If your using omxplayer, make sure your GPU memory is set to 128MB.
Posted: Mon Oct 02, 2017 6:29 pm
I tried setting it to 256MB it doesn't make a difference.
It's one specific piece of video with a scrolling banner.
hello_video.bin plays it fine and the banner scrolls smoothly over the screen.
On omxplayer, it doesn't scroll smoothly. I tried the -y -z and -r settings, but nothing seems to fix that.
Thanks anyhow for the reply.
Posted: Wed Oct 04, 2017 1:50 pm
After reading that omxplayer doesn't like files that are converted to .H264 for hello_video.bin, I retried with the original mp4 file and the gpu memory settings to 128 MB. It's playing the file normally like that. I used ffmpeg to combine the 5 mp4 files that need to be played in a loop. (As stopping and starting omxplayer seems to cause a short black screen between 2 video fragments) I played the resulting 800MB mp4 file with omxplayer in a loop. To my suprise, top in another terminal window also reports the memory to be fully used by omxplayer. If I stop omxplayer, the memory doesn't return.
I started a vnc session and ran the taskmanager in the desktop. That is happily reporting a memory usage below 200MB, so it's basically top reporting the memory usage wrong when a video is being played ? Maybe it's me reading the numbers wrong?
I haven't tried it yet with the latest unmodified raspbian OS. Lost enough time already trying to solve problems that don't really exist.
My OS uses a self compiled kernel with the aufs file system so that the root fs can be made "read only"
It (hopefully) allows to cut the power any moment without corrupting the sd card.
uname -a reports it as 4.4.11-v7+ #1 SMP
Posted: Wed Oct 04, 2017 1:58 pm
Does reading www.linuxatemyram.com
help ? Perhaps this is
just a (common) misunderstanding.
Posted: Wed Oct 04, 2017 3:50 pm
Yes, it helps.
It was indeed a misunderstanding of the numbers.
It was the first time I was seeing the free memory becoming so low due to the OS using it for file cache.
If my system remains stable, I am a happy camper again.
Thanks for the link.
Posted: Wed Oct 04, 2017 3:56 pm
Make sure that you use the "free" command to make an informed decision. I can't vouch for
that "top" and "free" mean the same thing when using the same words.