videos with no audio streams - python gstreamer
aulges at googlemail.com
Tue Mar 13 10:02:53 PDT 2012
I'm using gstreamer for python (python-gst0.10) for extracting audio
streams from video files:
command = ("filesrc location=%s ! "
"decodebin2 name=dec dec.src1 ! "
"audioconvert ! "
"audio/x-raw-float, width=64, channels=1 ! "
"appsink name=sink sync=false "
pipeline = gst.parse_launch(command)
sink = pipeline.get_by_name('sink')
data = sink.emit('pull-buffer')
The problem is: when opening a video with no audio stream, the code
freezes on the 'sink.emit' statement.
My question is: Is there a way to check files for the presence of
audio streams (preferably in python-gst), or is there a way to check a
pipeline before pulling data, or can I get it to throw an error
instead of freezing?
thanks in advance -
More information about the gstreamer-devel