Sample Header Ad - 728x90

How to get proper ffplay output with UVC camera?

1 vote
0 answers
1819 views
My end goal is to use a UVC webcam with esp32 or Raspberry PI. I was hoping to learn while doing some fun projects. I have an old UVC webcam (Creative model ct6840) but I can't seem to get it to work with ffplay. I have tried looking through the documentation and other questions here but I can't seem to get it to work. So far I have only been able to achieve a noisy-jittery output. Running
-shell
ffplay -f rawvideo -video_size 640x480 /dev/video2
I get: screenshot of ffplay window popup Can someone help me understand how to make the camera work with ffplay or ffmpeg? The following is the information of my webcam:
-shellsession
$ ffmpeg -f v4l2 -list_formats all -i /dev/video2
[video4linux2,v4l2 @ 0x17eb3c0] Compressed: Unsupported :          GSPCA OV511 : 320x240 640x480

$ v4l-info /dev/video2
### v4l2 device info [/dev/video2] ###
general info
    VIDIOC_QUERYCAP
	driver                  : "ov519"
	card                    : "USB Camera (05a9:0511)"
	bus_info                : "usb-0000:00:14.0-8.2"
	version                 : 6.1.79
	capabilities            : 0x85200001 [VIDEO_CAPTURE,?,READWRITE,STREAMING,(null)]

standards

inputs
    VIDIOC_ENUMINPUT(0)
	index                   : 0
	name                    : "ov519"
	type                    : CAMERA
	audioset                : 0
	tuner                   : 0
	std                     : 0x0 []
	status                  : 0x0 []

video capture
    VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE)
	index                   : 0
	type                    : VIDEO_CAPTURE
	flags                   : 1
	description             : "GSPCA OV511"
	pixelformat             : 0x3131354f [O511]
    VIDIOC_G_FMT(VIDEO_CAPTURE)
	type                    : VIDEO_CAPTURE
	fmt.pix.width           : 640
	fmt.pix.height          : 480
	fmt.pix.pixelformat     : 0x3131354f [O511]
	fmt.pix.field           : NONE
	fmt.pix.bytesperline    : 640
	fmt.pix.sizeimage       : 614400
	fmt.pix.colorspace      : JPEG
	fmt.pix.priv            : 4276996862

controls
    VIDIOC_QUERYCTRL(BASE+0)
	id                      : 9963776
	type                    : INTEGER
	name                    : "Brightness"
	minimum                 : 0
	maximum                 : 255
	step                    : 1
	default_value           : 127
	flags                   : 48
    VIDIOC_QUERYCTRL(BASE+1)
	id                      : 9963777
	type                    : INTEGER
	name                    : "Contrast"
	minimum                 : 0
	maximum                 : 255
	step                    : 1
	default_value           : 127
	flags                   : 32
    VIDIOC_QUERYCTRL(BASE+2)
	id                      : 9963778
	type                    : INTEGER
	name                    : "Saturation"
	minimum                 : 0
	maximum                 : 255
	step                    : 1
	default_value           : 127
	flags                   : 32
    VIDIOC_QUERYCTRL(BASE+24)
	id                      : 9963800
	type                    : MENU
	name                    : "Power Line Frequency"
	minimum                 : 0
	maximum                 : 2
	step                    : 1
	default_value           : 0
	flags                   : 0
    VIDIOC_QUERYCTRL(BASE+32)
	id                      : 9963808
	type                    : BOOLEAN
	name                    : "Brightness, Automatic"
	minimum                 : 0
	maximum                 : 1
	step                    : 1
	default_value           : 1
	flags                   : 8
Can someone guide me here please? Any advice will be greatly appreciated~ (NOTE: the camera works perfectly with guvcview and xawtv... so it can work with ffmpeg, right?)
Asked by Abdulla Masud (15 rep)
Mar 1, 2024, 09:46 PM
Last activity: Mar 5, 2024, 02:27 PM