gst-device-monitor-1.0 is displaying devices of class Audio/Source only.it does not display Video/Source devices at all,
In addition it fails when asking explicitly for video devices only.
gst-device-monitor-1.0 Video/SourceProbing devices...0:00:00.023973000 37488 0x7fce61d80350 WARN default gstdevicemonitor.c:465:gboolean gst_device_monitor_start(GstDeviceMonitor *):<devicemonitor0> No providers match the current filtersFailed to start device monitor!
however the following command works, so it can see the built in camera, and I have another one attached through USB.
gst-launch-1.0 avfvideosrc device-index=0 ! video/x-raw, framerate=30/1, width=1280, height=720 ! autovideosink
Is there another way of finding out the device-index of the attached external camera, so that it can be passed to the avfvideosrc device?
gstreamer version:
gst-launch-1.0 --versiongst-launch-1.0 version 1.14.4GStreamer 1.14.4Unknown package origin
Running on OSX: Sierra 10.12.6
Best Answer
It might be a bug. It works fine on Windows 10:
gst-device-monitor-1.0Probing devices...Device found:name : Realtek Digital Output (Realtek(R) Audio)class : Audio/Sinkcaps : audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ];audio/x-raw, format=(string)U8, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ];audio/x-ac3, framed=(boolean)true;audio/x-dts, framed=(boolean)true;properties:device.api = directsounddevice.guid = "\{4AC70C7D-F592-460B-98A2-EAAC3947DEE6\}"directsound.device.driver = "\{0.0.0.00000000\}.\{4ac70c7d-f592-460b-98a2-eaac3947dee6\}"directsound.device.description = "Realtek\ Digital\ Output\ \(Realtek\(R\)\ Audio\)"gst-launch-1.0 ... ! directsoundsink device="\{4AC70C7D-F592-460B-98A2-EAAC3947DEE6\}"Device found:name : Speakers (Realtek(R) Audio)class : Audio/Sinkcaps : audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ];... etc ...properties:device.api = directsounddevice.guid = "\{5C211A4B-03A5-48DF-974A-E209146FDD9D\}"directsound.device.driver = "\{0.0.0.00000000\}.\{5c211a4b-03a5-48df-974a-e209146fdd9d\}"directsound.device.description = "Speakers\ \(Realtek\(R\)\ Audio\)"gst-launch-1.0 ... ! directsoundsink device="\{5C211A4B-03A5-48DF-974A-E209146FDD9D\}"Device found:name : Primary Sound Driverclass : Audio/Sinkcaps : audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ];... etc ...properties:device.api = directsounddevice.guid = "\(NULL\)"directsound.device.driver = ""directsound.device.description = "Primary\ Sound\ Driver"gst-launch-1.0 ... ! directsoundsinkDevice found:name : Microphone (Webcam C170)class : Audio/Sourcecaps : audio/x-raw, format=(string){ S16LE, S8 }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ];properties:device.api = directsounddevice.guid = "\{CF31A819-CCBA-47D4-A669-83CA42CE4DEB\}"directsound.device.driver = "\{0.0.1.00000000\}.\{cf31a819-ccba-47d4-a669-83ca42ce4deb\}"directsound.device.description = "Microphone\ \(Webcam\ C170\)"gst-launch-1.0 directsoundsrc device="\{CF31A819-CCBA-47D4-A669-83CA42CE4DEB\}" ! ...Device found:name : Primary Sound Capture Driverclass : Audio/Sourcecaps : audio/x-raw, format=(string){ S16LE, S8 }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ];properties:device.api = directsounddevice.guid = "\(NULL\)"directsound.device.driver = ""directsound.device.description = "Primary\ Sound\ Capture\ Driver"gst-launch-1.0 directsoundsrc ! ...Device found:name : Webcam C170class : Video/Sourcecaps : video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)[ 15/1, 30/1 ], pixel-aspect-ratio=(fraction)1/1;... etc ...image/jpeg, width=(int)1024, height=(int)768, framerate=(fraction)[ 15/1, 30/1 ], pixel-aspect-ratio=(fraction)1/1;gst-launch-1.0 ksvideosrc device-path="\\\\\?\\usb\#vid_046d\&pid_082b\&mi_00\#9\&19fda08e\&1\&0000\#\{6994ad05-93ef-11d0-a3cc-00a0c9223196\}\\global" ! ...Device found:name : Microphone (Webcam C170)class : Audio/Sourcecaps : audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)44100, channels=(int)1, channel-mask=(bitmask)0x0000000000000000;properties:device.api = wasapidevice.strid = "\{0.0.1.00000000\}.\{cf31a819-ccba-47d4-a669-83ca42ce4deb\}"wasapi.device.description = "Microphone\ \(Webcam\ C170\)"gst-launch-1.0 wasapisrc device="\{0.0.1.00000000\}.\{cf31a819-ccba-47d4-a669-83ca42ce4deb\}" ! ...Device found:name : Speakers (Realtek(R) Audio)class : Audio/Sinkcaps : audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003;properties:device.api = wasapidevice.strid = "\{0.0.0.00000000\}.\{5c211a4b-03a5-48df-974a-e209146fdd9d\}"wasapi.device.description = "Speakers\ \(Realtek\(R\)\ Audio\)"gst-launch-1.0 ... ! wasapisink device="\{0.0.0.00000000\}.\{5c211a4b-03a5-48df-974a-e209146fdd9d\}"Device found:name : Realtek Digital Output (Realtek(R) Audio)class : Audio/Sinkcaps : audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003;properties:device.api = wasapidevice.strid = "\{0.0.0.00000000\}.\{4ac70c7d-f592-460b-98a2-eaac3947dee6\}"wasapi.device.description = "Realtek\ Digital\ Output\ \(Realtek\(R\)\ Audio\)"gst-launch-1.0 ... ! wasapisink device="\{0.0.0.00000000\}.\{4ac70c7d-f592-460b-98a2-eaac3947dee6\}"
And
gst-device-monitor-1.0 Video/SourceProbing devices...Device found:name : Webcam C170class : Video/Sourcecaps : video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)[ 15/1, 30/1 ], pixel-aspect-ratio=(fraction)1/1;... etc ...image/jpeg, width=(int)1024, height=(int)768, framerate=(fraction)[ 15/1, 30/1 ], pixel-aspect-ratio=(fraction)1/1;gst-launch-1.0 ksvideosrc device-path="\\\\\?\\usb\#vid_046d\&pid_082b\&mi_00\#9\&19fda08e\&1\&0000\#\{6994ad05-93ef-11d0-a3cc-00a0c9223196\}\\global" ! ...
On Linux, this is the behavior I see when I install only gst-plugins-base
, and not also gst-plugins-good
. You might also want to add -bad
and -ugly
.