Hi, community
As use the playbin2 of gstreamer to play a local video file(Video:1080p/mp4/size:980MB CMD:gst-launch playbin2 uri=file:///home/username/001.mp4 ) ,
We find that cachedcontinuously rise until the whole physical memory is nearly occupied.
We suspect that video cache occupy the memory continuously, which result in that our other background process cannot obtain the memory.
how can We expect that video cache do not occupy the memory whenever possible or stipulate the size of memory for video cache, when playbin2 play local video smoothly?
■environment
imx6: dual lite
DDR: 512MB * 2
Gstreamer Version:
gst-fsl-plugins-3.0.7
gst-plugins-gl-0.10.3.1
gst-plugins-base0.10_0.10.35
gst-plugins-good0.10_0.10.30
gstreamer0.10_0.10.35
libfslcodec-3.0.7
libfslmscodec-3.0.7
libfslparser-3.0.7
libfslvpuwrap-1.0.35
libfslmsparser-3.0.7
已解决! 转到解答。
Thank you for your reply.
When we play the video, the other process in the background may use cache to read-write the file.
$ echo 1 >/proc/sys/vm/lowmem_reserve_ratio will cause that the processing data will be deleted.
We expect to solve the problems through the following measures:
Limit the maximal size of cache that video can use or only delete the cache video used.
Others, we try to perform $ echo 1 >/proc/sys/vm/drop_caches by the script of while1 in playing video.
The memory will not rise continuously and can play video normally.
Does this mean that it does not actually require a mass of memory for video cache when gstreamer is playing the local video?
Yours Sincerely,
I remember the following limitation :
When playing the video for a long time, allocation of contiguous memory may fail
(memory fragmentation).
To play video when the system memory is low, run the command:
$ echo 1 >/proc/sys/vm/lowmem_reserve_ratio
It protects the DMA zone and avoids memory allocation errors.
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank you for your reply.
When we play the video, the other process in the background may use cache to read-write the file.
$ echo 1 >/proc/sys/vm/lowmem_reserve_ratio will cause that the processing data will be deleted.
We expect to solve the problems through the following measures:
Limit the maximal size of cache that video can use or only delete the cache video used.
Others, we try to perform $ echo 1 >/proc/sys/vm/drop_caches by the script of while1 in playing video.
The memory will not rise continuously and can play video normally.
Does this mean that it does not actually require a mass of memory for video cache when gstreamer is playing the local video?
Yours Sincerely,