How Can I Grab Video From Usb Video Capture + Dvb Device With Gstreamer?
I own a avermedia volar HX usb stick, I want to capture fromthe composite input , but I can't because I'm unable to select the input. I'm using gstreamer with + python, I think I n
Solution 1:
src = gst.element_factory_make("v4l2src", "src")
src.set_state(gst.STATE_PAUSED)
try:
# channel names will be different for each device
channels = src.list_channels()
composite = [x for x in channels if x.label == "Composite1"]
if composite:
self.src.set_channel(composite[0])
except AttributeError, e:
log.warn("Could not tune video source\n")
Solution 2:
To anyone stumbling on this, some internal gstreamer changes since this was originally posted may require gst.STATE_READY now instead of STATE_PAUSED. Tripped me up as it seems half the capture devices I encounter default to PAL and I need to use the GST_TUNER interface to change it.
Solution 3:
The code shown above seems basically correct, but it will flounder on the rocks of v4l2. The strings you get will depend on what card you have:
On four different cards so far I've encountered:
- "Composite"
- "Composite1"
- "composite"
- "Composite Video Input"
Also be aware that some cards will have the driver lie, since the chip set has four inputs, the driver will often report four, even if the manufacturer only connects to two of them.
Post a Comment for "How Can I Grab Video From Usb Video Capture + Dvb Device With Gstreamer?"