usb-cam using deprecated pixel format
I am using ubuntu mate 20.04 focal and i have installed ros noetic, I am trying to use a logitech c920 webcam, however when i run rosrun usb_cam usb_cam_node i get the following error [swscaler @ 0x229f390] no accelerated colorspace conversion from yuv422p to rgb24, [swscaler@ 0x229f390] deprecated pixel format used, make sure you set the range correctly
i read that these are just warnings however, when i run rosrun rviz rviz it doesn't display the image from the webcam
the webcam does work though if i open it through Cheese or vlc it displays just fine
i have tried using the fixes found here
https://answers.ros.org/question/1735...
and here
https://github.com/ros-drivers/usb_ca...
and here
https://github.com/ros-drivers/usb_ca...
however, no of these solutions have seemed to work i've also tried changing the ffmpeg code in the usb_cam.cpp code but i haven't been able to get that to work either....
when i run
v4l2-ctl --list-formats-ext -d /dev/video0
i get the following
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'YUYV' (YUYV 4:2:2)
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.042s (24.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.133s (7.500 fps)
Interval: Discrete 0.200s (5.000 fps)
i think the problem is that it's using deprecated ffmpeg code to try and convert it from yuyv to mjpeg? but i'm not sure if i'm right about this....
how do i fix this? please help..... is there another ros package that i could try?