Streaming webcam to .ts file: link error

Dystroxic kyle at
Tue May 2 21:39:41 UTC 2017


I have a webcam, and I'm trying to use gstreamer to stream the audio and
video to a .ts fifo file. This is the info for the webcam:

Driver Info (not using libv4l2):
	Driver name   : uvcvideo
	Card type     : USB 2.0 Camera
	Bus info      :
	Driver version: 3.10.105
	Capabilities  : 0x84000001
		Video Capture
		Device Capabilities
	Device Caps   : 0x04000001
		Video Capture
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
	Width/Height      : 752/416
	Pixel Format      : 'YUYV'
	Field             : None
	Bytes per Line    : 1504
	Size Image        : 625664
	Colorspace        : Default
	Transfer Function : Default
	YCbCr Encoding    : Default
	Quantization      : Default
Crop Capability Video Capture:
	Bounds      : Left 0, Top 0, Width 752, Height 416
	Default     : Left 0, Top 0, Width 752, Height 416
	Pixel Aspect: 1/1
Streaming Parameters Video Capture:
	Capabilities     : timeperframe
	Frames per second: 20.000 (20/1)
	Read buffers     : 0
                     brightness (int)    : min=-64 max=64 step=1 default=0
                       contrast (int)    : min=0 max=64 step=1 default=32
                     saturation (int)    : min=1 max=128 step=1 default=64
                            hue (int)    : min=-40 max=40 step=1 default=0
                          gamma (int)    : min=72 max=500 step=1 default=100
                           gain (int)    : min=0 max=100 step=1 default=0
           power_line_frequency (menu)   : min=0 max=2 default=1 value=1
                      sharpness (int)    : min=0 max=6 step=1 default=2
         backlight_compensation (int)    : min=0 max=2 step=1 default=1

So from this, we see that it's using YUYV format. So then I try to run this

gst-launch-1.0 -e -v v4l2src device="/dev/video0" !
'video/x-raw,format=YUYV,framerate=25/1,width=640,height=360' ! x264enc
bitrate=498 ! mpegtsmux ! filesink location=video1.ts

But it gives the error:

WARNING: erroneous pipeline: could not link v4l2src0 to x264enc0

And I cannot figure out why I can't get this to work. I also tried "YUY2"
for the format field (based on  this chart
<>  ), and also tried having
(fourcc) in the format based on the same chart, but that threw a parsing

Any thoughts on how I can get this camera to stream to the file?

View this message in context:
Sent from the GStreamer-devel mailing list archive at

More information about the gstreamer-devel mailing list