Streaming webcam to .ts file: link error

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


Hello,

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      : usb-xhci-hcd.2.auto-1.1.4
	Driver version: 3.10.105
	Capabilities  : 0x84000001
		Video Capture
		Streaming
		Device Capabilities
	Device Caps   : 0x04000001
		Video Capture
		Streaming
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
value=0
                       contrast (int)    : min=0 max=64 step=1 default=32
value=32
                     saturation (int)    : min=1 max=128 step=1 default=64
value=64
                            hue (int)    : min=-40 max=40 step=1 default=0
value=0
                          gamma (int)    : min=72 max=500 step=1 default=100
value=100
                           gain (int)    : min=0 max=100 step=1 default=0
value=0
           power_line_frequency (menu)   : min=0 max=2 default=1 value=1
                      sharpness (int)    : min=0 max=6 step=1 default=2
value=2
         backlight_compensation (int)    : min=0 max=2 step=1 default=1
value=1


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

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
<http://wiki.oz9aec.net/index.php/Pixel_formats>  ), and also tried having
(fourcc) in the format based on the same chart, but that threw a parsing
error.

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



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Streaming-webcam-to-ts-file-link-error-tp4682888.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list