Unable to get stream with gstreamer in torizon-core-6.5

Hi,
I am using the below command to stream my camera in torizon-core 6.5 but command is returning the following error
gst-launch-1.0 v4l2src device=/dev/video3 ! “video/x-raw,width=2592,height=1944” ! fpsdisplaysink video-sink=waylandsink text-overlay=false sync=false -v

error:

gstwaylandsink.c(333): gst_wayland_sink_find_display (): /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstWaylandSink:waylandsink0:
Failed to create GstWlDisplay: ‘Failed to connect to the wayland display ‘(default)’’
Setting pipeline to NULL …
Freeing pipeline …

Where as with v4l2-ctl I’m able stream the camera. I’m also able to stream the camera using gstreamer with torizon-multimedia reference image but unable to do so in torizon-core-6.5

Greetings @sapthagiri,

I just tried this with a USB camera, using a similar pipeline command:

gst-launch-1.0 v4l2src device='/dev/video4'  ! "video/x-raw, format=YUY2, framerate=5/1, width=640, height=480" ! fpsdisplaysink video-sink=waylandsink text-overlay=false sync=false

It worked fine on my side. The error you are getting here:

Failed to create GstWlDisplay: ‘Failed to connect to the wayland display ‘(default)’’

Did you create a Weston container prior to starting your gstreamer pipeline as instructed here: How to use Cameras on Torizon | Toradex Developer Center

Best Regards,
Jeremias

Hi @jeremias.tx ,

I tried with USB camera and issue still persists.
Yes I ran weston container using below command

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 226:* rmw’ torizon/weston:$CT_TAG_WESTON --developer --tty=/dev/tty7

the weston container launched without any issue.

What device are you on? I tried both with iMX6 and iMX8 and it works with my USB camera.

Also the gstreamer container are you building it as described here?: How to use Cameras on Torizon | Toradex Developer Center

Best Regards,
Jeremias

Hi @jeremias.tx ,

I’m using a verdin with the evaluation board. Im using the attached docker file for gstreamer and compiling my gstreamer application. Note: i’m not using my gstreamer application to stream the camera but the standard gstreamer command.
Dockerfile.bsp5 (1.1 KB)

How did you construct this Dockerfile? You have 2 FROM statements. Your source images in the FROM statements are using the 1 tag which are not for Torizon OS 6.X and are 3 years old.

I would recommend reconstructing your Dockerfile using this sample as a reference: torizon-samples/gstreamer/bash/simple-pipeline at bookworm · toradex/torizon-samples · GitHub

Best Regards,
Jeremias

Hi Jeremias,
I was able to get stream by modifying the docker file.

Now I have a different issue . I have modified the dockerfile to compile my gstreamer application, Im receiving below error while building the docker file, the same commands worked for IMAGE_TAG 1

Building dependency tree…
Reading state information…
sudo is already the newest version (1.9.13p3-1+deb12u1).
curl is already the newest version (7.88.1-10+deb12u5).
libwayland-server0 is already the newest version (1.21.0-1).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libepoxy-dev : Depends: libegl-dev
Depends: libgl-dev
libgtk-3-dev : Depends: libegl1-mesa-dev
E: Unable to correct problems, you have held broken packages.

Dockerfile.bsp5 (1.5 KB)

I was able to get stream by modifying the docker file.

Glad to hear!

Now I have a different issue .

The issue here is due to a weird dependency chain around libgtk-3-dev. To get around this you want to apt-get install the imx-gpu-viv-wayland-dev package before libgtk-3-dev. Then the package dependencies should work out.

Best Regards,
Jeremias