Hello Team Toradex,
I have one USB 3.0 camera connect with my device imx8mp than I have start testing for the image with following command.
v4l2-ctl --device=/dev/video4 --stream-mmap=3 --stream-to=rv.jpg --stream-count=1 but it will show my image size only 600k output indicates that the file capture.jpg now has a size of 600 KB, meaning it contains data and is not empty. so can you support me how to test successfully this process?
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello Ravi,
Thank you for reaching out to us. It seems you are using the v4l2-ctl command to capture an image from your USB 3.0 camera connected to the iMX8MP device. The image size being only 600 KB could be due to several factors, such as the resolution or format settings of the camera.
Here are some steps to help you troubleshoot and potentially resolve this issue:
Check Supported Formats and Resolutions:
Use the following command to list the supported formats and resolutions of your camera:
v4l2-ctl --device=/dev/video4 --list-formats-ext
This will show you the available pixel formats and frame sizes. Ensure you are capturing at the desired resolution.
Adjust Capture Settings:
If the resolution is lower than expected, you can specify a higher resolution using the --set-fmt-video option. For example:
Consider Using GStreamer:
If you need more control over the capture process, consider using GStreamer, which provides a flexible framework for handling video streams. A simple GStreamer pipeline to capture an image might look like this:
By following these steps, you should be able to adjust the capture settings to achieve the desired image size and quality. If you continue to experience issues, ensure that your camera is functioning correctly and that the necessary drivers are installed.
Best regards,
Toradex AI Assistant
Please, also check if these links can help you solve your problem:
file capture_mjpg.jpg
i get the below result after applying above command
capture_mjpg.jpg: JPEG image data, baseline, precision 8, 640x480, components 3
now how to show the image on toradex display
you might consider following steps 1 to 3 provided by the Toradex AI assistant. You will obtain a raw image, and then you should use ffmpeg (you will need to install this on your computer) to convert it to a real image. As an example:
hello @marcioalbano.tx ,
I am able to capture the image by following the steps 1 to 3, but after that i am not be able to use ffmeg commands i will try to install ffmeg but it should not work.
Hello @marcioalbano.tx,
I have Tried to install ffmpeg package on ubuntu using sudo apt install ffmpeg but the command is not working in my scene because i am using ubuntu by connecting my card using ssh putty console.
and for the display i have followed the steps that you have mention in that article
whenever i apply the command sudo apt install ffmpeg I Get the below Result
login as: torizon
torizon@192.168.0.137's password:
** WARNING **
THIS DEVICE IS IN ENGINEERING MODE
Check for more info:
https://developer.toradex.com/torizon/application-development/ide-extension
torizon@verdin-imx8mp-15132884:~$ ls
Dockerfile digital_io_test.sh imx8mp-verdin-wifi-atdm.dtb test
Downloads docker-compose.yml index.html test.wav
adv7180.ko gstreamer-docker media-ctl-setup
dev2 home setup
torizon@verdin-imx8mp-15132884:~$ sudo apt install ffmpeg
Password:
sudo: apt: command not found
Checking the output from your console, you seem to be using Torizon. In this case, I suggest you take a look at this article that contains instructions on how to use cameras in Torizon. You can also find more information on how to use Gstreamer on Torizon in here. You will also information on how to use Displays with Torizon in here.
Please notice that device=</dev/video*> is a generic example. Please replace /dev/video* with the device file of the camera that you want to use. In your case, I believe it should be /dev/video3 or /dev/video4 , which is shown by the output of the v4l2-ctl --list-devices command you used before.
Based on your last console output, you might want to test the following:
/dev/video* instead of above command I am using /dev/video4 and based on the v4l2-ctl --list-devices command i have apply the gst-launch-1.0 v4l2src device=/dev/video3 ! fpsdisplaysink video-sink=waylandsink command but i don’t get the result
i am getting the below result when i apply those commands
gst-launch-1.0 v4l2src device=/dev/video4 ! fp sdisplaysink video-sink=waylandsink
WARNING: erroneous pipeline: could not set property “video-sink” in element “fps displaysink0” to “waylandsink”
check the /dev/video device files that appear for your camera.
v4l2-ctl --list-devices
Run gstreamer pipeline, using the correct device file (For this example notice that /dev/video2 is being used, but you should check if it applies for your case).
Hello @marcioalbano.tx,
i am using ID=torizon
NAME=“TorizonCore”
VERSION=“6.7.0-devel-20240821064044+build.0 (kirkstone)”
VERSION_ID=6.7.0-devel-20240821064044-build.0
PRETTY_NAME=“TorizonCore 6.7.0-devel-20240821064044+build.0 (kirkstone)”
DISTRO_CODENAME=“kirkstone”
BUILD_ID=“0”
ANSI_COLOR=“1;34”
VARIANT=“Docker”
regards,
Ravi Vanand
Hello @marcioalbano.tx,
I have followed your docker file link and same docker file i have created but it shouldn’t work and i have also followed process that you are showing in above chat but it will not work so that is why i am sharing the my OS details so give me solution according that