Thank you for your reply. I think I do something wrong.
I tried two method to run the wget and gst-launch-1.0 commands. First from the gstreamer container, but i used something different or not the correct way, because in your example the prompt was “~#”, the prompt in my container was “/#”. How or where did you run these commands?
This is what i used in the container:
root@apalis-imx6-10678703:/# wget http://linode.boundarydevices.com/videos/trailer_1080p_h264_mp3.avi
--2023-10-17 11:40:55-- http://linode.boundarydevices.com/videos/trailer_1080p_h264_mp3.avi
Resolving linode.boundarydevices.com (linode.boundarydevices.com)... 173.255.200.20
Connecting to linode.boundarydevices.com (linode.boundarydevices.com)|173.255.200.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10527382 (10M) [video/x-msvideo]
Saving to: ‘trailer_1080p_h264_mp3.avi’
trailer_1080p_h264_mp3.avi 100%[==================================================>] 10.04M 3.74MB/s in 2.7s
2023-10-17 11:40:58 (3.74 MB/s) - ‘trailer_1080p_h264_mp3.avi’ saved [10527382/10527382]
root@apalis-imx6-10678703:/# gst-launch-1.0 filesrc location=trailer_1080p_h264_mp3.avi ! avidemux ! decodebin ! waylandsink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Redistribute latency...
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
WARNING: from element /GstPipeline:pipeline0/GstWaylandSink:waylandsink0: A lot of buffers are being dropped.
Additional debug info:
../libs/gst/base/gstbasesink.c(3143): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstWaylandSink:waylandsink0:
There may be a timestamping problem, or this computer is too slow.
The second time, I added the gst-launch-1.0 command to the docker run parameter:
torizon@apalis-imx6-10678703:~$ wget -P /tmp http://linode.boundarydevices.com/videos/trailer_1080p_h264_mp3.avi
Connecting to linode.boundarydevices.com (173.255.200.20:80)
saving to '/tmp/trailer_1080p_h264_mp3.avi'
trailer_1080p_h264_m 100% |*****************************************************************| 10.0M 0:00:00 ETA
'/tmp/trailer_1080p_h264_mp3.avi' saved
torizon@apalis-imx6-10678703:~$ docker run -d --rm --name=weston-gstreamer --net=host --cap-add CAP_SYS_TTY_CONFIG -v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ -v /tmp:/tmp --device-cgroup-rule='c 4:* rmw' --device-cgroup-rule='c 13:* rmw' --device-cgroup-rule='c 226:* rmw' --device-cgroup-rule='c 81:* rmw' own_user/gst_example gst-launch-1.0 filesrc location=/tmp/trailer_1080p_h264_mp3.avi ! avidemux ! decodebin ! waylandsink
I increased the CMA to 320MB:
torizon@apalis-imx6-10678703:~$ dmesg | grep cma
[ 0.000000] cma: Reserved 320 MiB at 0x3c000000
[ 0.000000] Kernel command line: enable_wait_mode=off vmalloc=400M root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/80b84d3908d9a18e712de5f31c58a5db3f8d2647b72698051cee740e1554abae/0 cma=320MB
[ 0.000000] Memory: 686788K/1048576K available (8192K kernel code, 900K rwdata, 4196K rodata, 1024K init, 435K bss, 34108K reserved, 327680K cma-reserved, 90112K highmem)
I got same result both method, the CPU usage was high, over 300%, in the TorizonCore 5.7.2 version.
The weston container what i used:
docker run -d --rm --name=weston --net=host --cap-add CAP_SYS_TTY_CONFIG -v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ --device-cgroup-rule='c 4:* rmw' --device-cgroup-rule='c 13:* rmw' --device-cgroup-rule='c 199:* rmw' --device-cgroup-rule='c 226:* rmw' torizon/weston:$CT_TAG_WESTON --developer weston-launch --tty=/dev/tty7 --user=torizon
The dockerfile of the gstreamer container:
ARG BASE_NAME=wayland-base
ARG IMAGE_ARCH=linux/arm/v7
ARG IMAGE_TAG=3
ARG DOCKER_REGISTRY=torizon
FROM --platform=$IMAGE_ARCH $DOCKER_REGISTRY/$BASE_NAME:$IMAGE_TAG
ARG IMAGE_ARCH
RUN apt-get -y update && apt-get install -y --no-install-recommends \
libgstreamer1.0-0 \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
gstreamer1.0-tools \
gstreamer1.0-x \
gstreamer1.0-alsa \
gstreamer1.0-gl \
gstreamer1.0-gtk3 \
gstreamer1.0-pulseaudio \
v4l-utils \
&& if [ "${IMAGE_ARCH}" = "linux/arm64/v8" ]; then \
apt-get install -y --no-install-recommends \
gstreamer1.0-qt5; fi \
&& apt-get clean && apt-get autoremove && rm -rf /var/lib/apt/lists/*
On the TorizonCore 6.4.0 version both method works well with your solution, it uses 10% CPU with cgroup parameter and over 300% CPU without cgroup parameter.
Unfortunately, I don’t see where the problem might be. Please let me know if you know where I’m doing it wrong.
Best Regards,
Balázs Vígh