[gst-devel] Firewire cameras with DirectShow

Phil Rendell philrendell at gmail.com
Mon Jun 29 11:23:52 CEST 2009


Thanks for the suggestions. Unfortunately they didn't have any noticeable
effect, and the decodebin couldn't find a the demuxer ('A Digital Video (DV)
System Stream demuxer plugin is required to play this stream, but not
installed' error).

I also tried setting the lowres property of ffdec_dvvideo to 1/4 size to see
if that would make a difference, but again, no luck, which leads me to
believe that it's not a problem with decoding the stream.

It's just a shame there's not a windows port of libdv, otherwise I could try
building dvdemux. I don't know if there's anything else I could try?

Phil

2009/6/26 Julien Isorce <julien.isorce at gmail.com>

> ok so your firewire camera only supports systemstream=true.
>
> try with the default width, height and framerate, and without
> deinterlacing:
> gst-launch-0.10 dshowvideosrc ! "video/x-dv, systemstream=true" !
> ffdemux_dv ! ffdec_dvvideo ! ffmpegcolorspace ! directdrawsink
>
> If still low fps, you could try to set lower width, height and framerate,
> or qdd a queue before ffmpegcolorspace.
>
> You could also try:
>
> gst-launch-0.10 dshowvideosrc ! "video/x-dv, systemstream=true" ! decodebin
> ! ffmpegcolorspace ! directdrawsink
> and
> gst-launch-0.10 dshowvideosrc ! decodebin ! ffmpegcolorspace !
> directdrawsink
>
> About the crash I think it came from:  format=dvsd
> the right way is: format=(fourcc)dvsd
>
>
> Julien
>
> 2009/6/26 Phil Rendell <philrendell at gmail.com>
>
>>
>>
>> 2009/6/26 Julien Isorce <julien.isorce at gmail.com>
>>
>>> Forgot this problem then we will use true and false, instead of 0 and 1.
>>> Sorry for waste of time.
>>
>>
>> No problem - without your help I would be completely stuck and end up
>> being forced to do something drastic like hunt around in the source code
>> before giving up!
>>
>>
>>
>>> Phil, can you tell me if
>>> gst-launch-0.10.exe dshowvideosrc ! "video/x-dv, systemstream=false,
>>> width=640, height=480, framerate=10" ! fakesink
>>> leads to the same result as true ?
>>
>>
>> No, it doesn't. It gives me the usual link error:
>>
>> D:\Camera\Common\GStreamer\bin>gst-launch-0.10.exe -v dshowvideosrc !
>> "video/x-dv, systemstream=false, width=640, height=480, framerate=30" !
>> fakesink
>> WARNING: erroneous pipeline: could not link dshowvideosrc0 to fakesink0
>>
>>
>>
>>> About the screenshot. I can see that only the pin00 can be handled by
>>> dshowvideosrc because it's
>>> MEDIATYPE_Video and MEDIASUBTYPE_dvsd
>>> but unfortunatelly grapedit does not tell us if it's FORMAT_DvInfo (case
>>> systemstream=true)
>>> or FORMAT_VideoInfo (case systemstream=false)
>>> About the warnings, do not care about it, it seems that
>>> granularityVideoWidth/Height are not set by your camera driver.
>>> Or has no sense in case of systemstream=true.
>>>
>>
>> Ok, thanks.
>>
>>
>>> Anyway, for now I just do not know how to decode or render a video/x-dv,
>>> systemstream=true.
>>> I am sure someone else knows ?
>>
>>
>> Good idea with the ffdemux_dv. The command you suggested didn't quite
>> work, but once I added the dv decoder you suggested in a previous email and
>> added a deinterlacer I managed to get something to display, although I ended
>> up with a pretty bad 0.5-1 fps. Could I be doing something wrong?
>>
>> Thanks,
>>
>> Phil
>>
>>
>> Without the decoder (runs straight through with no visual output):
>>
>> D:\rendell_p\Camera\Common\GStreamer\bin>gst-launch-0.10.exe -v
>> dshowvideosrc ! "video/x-dv, systemstream=true, width=720, height=576,
>> framerate=25" ! ffdemux_dv ! ffmpegcolorspace ! directdrawsink
>> Setting pipeline to PAUSED ...
>> ** (gst-launch-0.10:2500): WARNING **: your desired video size is not
>> valid : 720 mod 1244160 !=0
>> ** (gst-launch-0.10:2500): WARNING **: your desired video size is not
>> valid : 576 mod 1577311108 !=0
>> /GstPipeline:pipeline0/GstDshowVideoSrc:dshowvideosrc0.GstPad:src: caps =
>> video/x-dv, systemstream=(boolean)true, width=(int)720, height=(int)576,
>> framerate=(int)25
>> Pipeline is live and does not need PREROLL ...
>> Setting pipeline to PLAYING ...
>> New clock: GstSystemClock
>> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
>> video/x-dv,systemstream=(boolean)true, width=(int)720, height=(int)576,
>> framerate=(int)25
>> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps =
>> video/x-dv, systemstream=(boolean)true, width=(int)720, height=(int)576,
>> framerate=(int)25
>> /GstPipeline:pipeline0/ffdemux_dv:ffdemux_dv0.GstPad:sink: caps =
>> video/x-dv, systemstream=(boolean)true, width=(int)720, height=(int)576,
>> framerate=(int)25
>> ERROR: from element /GstPipeline:pipeline0/ffdemux_dv:ffdemux_dv0:
>> Internal data stream error.
>> Additional debug info:
>> ..\..\ext\ffmpeg\gstffmpegdemux.c(1456): gst_ffmpegdemux_loop ():
>> /GstPipeline:pipeline0/ffdemux_dv:ffdemux_dv0:
>> streaming stopped, reason not-linked
>> Execution ended after 187550000 ns.
>> Setting pipeline to PAUSED ...
>> Setting pipeline to READY ...
>> /GstPipeline:pipeline0/ffdemux_dv:ffdemux_dv0.GstPad:audio_01: caps = NULL
>> /GstPipeline:pipeline0/ffdemux_dv:ffdemux_dv0.GstPad:audio_00: caps = NULL
>> /GstPipeline:pipeline0/ffdemux_dv:ffdemux_dv0.GstPad:video_00: caps = NULL
>> /GstPipeline:pipeline0/ffdemux_dv:ffdemux_dv0.GstPad:sink: caps = NULL
>> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL
>> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = NULL
>> /GstPipeline:pipeline0/GstDshowVideoSrc:dshowvideosrc0.GstPad:src: caps =
>> NULL
>> Setting pipeline to NULL ...
>> FREEING pipeline ...
>>
>>
>> With the decoder and deinterlacing (NOTE: there are no errors until I
>> close the window):
>>
>> D:\Camera\Common\GStreamer\bin>gst-launch-0.10.exe -v dshowvideosrc !
>> "video/x-dv, systemstream=true, width=720, height=576, framerate=25" !
>> ffdemux_dv ! ffdec_dvvideo ! ffdeinterlace ! ffmpegcolorspace !
>> directdrawsink
>> Setting pipeline to PAUSED ...
>> ** (gst-launch-0.10:432): WARNING **: your desired video size is not valid
>> : 720 mod 1244160 !=0
>> ** (gst-launch-0.10:432): WARNING **: your desired video size is not valid
>> : 576 mod 1577311108 !=0
>> /GstPipeline:pipeline0/GstDshowVideoSrc:dshowvideosrc0.GstPad:src: caps =
>> video/x-dv, systemstream=(boolean)true, width=(int)720, height=(int)576,
>> framerate=(int)25
>> Pipeline is live and does not need PREROLL ...
>> Setting pipeline to PLAYING ...
>> New clock: GstSystemClock
>> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
>> video/x-dv,systemstream=(boolean)true, width=(int)720, height=(int)576,
>> framerate=(int)25
>> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps =
>> video/x-dv, systemstream=(boolean)true, width=(int)720, height=(int)576,
>> framerate=(int)25
>> /GstPipeline:pipeline0/ffdemux_dv:ffdemux_dv0.GstPad:sink: caps =
>> video/x-dv, systemstream=(boolean)true, width=(int)720, height=(int)576,
>> framerate=(int)25
>> /GstPipeline:pipeline0/ffdec_dvvideo:ffdec_dvvideo0.GstPad:sink: caps =
>> video/x-dv, width=(int)720, height=(int)576, framerate=(fraction)25/1,
>> systemstream=(boolean)false, format=(fourcc)I420
>> /GstPipeline:pipeline0/ffdec_dvvideo:ffdec_dvvideo0.GstPad:src: caps =
>> video/x-raw-yuv, width=(int)720, height=(int)576, framerate=(fraction)25/1,
>> format=(fourcc)I420
>> /GstPipeline:pipeline0/GstFFMpegDeinterlace:ffmpegdeinterlace0.GstPad:src:
>> caps= video/x-raw-yuv, width=(int)720, height=(int)576,
>> framerate=(fraction)25/1, format=(fourcc)I420
>> /GstPipeline:pipeline0/GstFFMpegDeinterlace:ffmpegdeinterlace0.GstPad:sink:
>> caps = video/x-raw-yuv, width=(int)720, height=(int)576,
>> framerate=(fraction)25/1, format=(fourcc)I420
>> /GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src: caps =
>> video/x-raw-rgb, width=(int)720, height=(int)576, framerate=(fraction)25/1,
>> bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280,
>> green_mask=(int)16711680, blue_mask=(int)-16777216
>> /GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink: caps =
>> video/x-raw-yuv, width=(int)720, height=(int)576, framerate=(fraction)25/1,
>> format=(fourcc)I420
>> /GstPipeline:pipeline0/GstDirectDrawSink:directdrawsink0.GstPad:sink: caps
>> = video/x-raw-rgb, width=(int)720, height=(int)576,
>> framerate=(fraction)25/1, bpp=(int)32, depth=(int)24, endianness=(int)4321,
>> red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216
>> ERROR: from element /GstPipeline:pipeline0/ffdemux_dv:ffdemux_dv0:
>> Internal data stream error.
>> Additional debug info:
>> ..\..\ext\ffmpeg\gstffmpegdemux.c(1456): gst_ffmpegdemux_loop ():
>> /GstPipeline:pipeline0/ffdemux_dv:ffdemux_dv0:streaming stopped, reason
>> error
>> Execution ended after 6375163000 ns.
>> Setting pipeline to PAUSED ...
>> Setting pipeline to READY ...
>> /GstPipeline:pipeline0/GstDirectDrawSink:directdrawsink0.GstPad:sink: caps
>> = NULL
>> /GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src: caps = NULL
>> /GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink: caps = NULL
>> /GstPipeline:pipeline0/GstFFMpegDeinterlace:ffmpegdeinterlace0.GstPad:src:
>> caps= NULL
>> /GstPipeline:pipeline0/GstFFMpegDeinterlace:ffmpegdeinterlace0.GstPad:sink:
>> caps = NULL
>> /GstPipeline:pipeline0/ffdec_dvvideo:ffdec_dvvideo0.GstPad:src: caps =
>> NULL
>> /GstPipeline:pipeline0/ffdec_dvvideo:ffdec_dvvideo0.GstPad:sink: caps =
>> NULL
>> /GstPipeline:pipeline0/ffdemux_dv:ffdemux_dv0.GstPad:audio_01: caps = NULL
>> /GstPipeline:pipeline0/ffdemux_dv:ffdemux_dv0.GstPad:audio_00: caps = NULL
>> /GstPipeline:pipeline0/ffdemux_dv:ffdemux_dv0.GstPad:video_00: caps = NULL
>> /GstPipeline:pipeline0/ffdemux_dv:ffdemux_dv0.GstPad:sink: caps = NULL
>> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL
>> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = NULL
>> /GstPipeline:pipeline0/GstDshowVideoSrc:dshowvideosrc0.GstPad:src: caps =
>> NULL
>> Setting pipeline to NULL ...
>> FREEING pipeline ...
>>
>>
>>
>>
>>
>>>
>>>
>>> Julien
>>>
>>>
>>>
>>>
>>>   2009/6/26 Phil Rendell <philrendell at gmail.com>
>>>
>>>>
>>>> 2009/6/26 Julien Isorce <julien.isorce at gmail.com>
>>>>
>>>>>
>>>>> 2009/6/26 Phil Rendell <philrendell at gmail.com>
>>>>>>
>>>>>>
>>>>>>  Sorry, no joy with this. Both complained about an erroneous
>>>>>> pipeline. I don't think this could be the same error as before with feeding
>>>>>> dshowvideosrc into ffmpegcolorspace, as if I remover the systemstream
>>>>>> property, or set it to either true or false, gst-launch crashes. Setting it
>>>>>> to anything else appears to cause the erroneous pipeline error.
>>>>>>
>>>>>>  D:\Camera\Common\GStreamer\bin>gst-launch-0.10.exe -v dshowvideosrc !
>>>>>> "video/x-dv, systemstream=0" ! fakesink
>>>>>> WARNING: erroneous pipeline: could not link dshowvideosrc0 to
>>>>>> fakesink0
>>>>>> D:\Camera\Common\GStreamer\bin>gst-launch-0.10.exe -v dshowvideosrc !
>>>>>> "video/x-dv, systemstream=1" ! fakesink
>>>>>> WARNING: erroneous pipeline: could not link dshowvideosrc0 to
>>>>>> fakesink0
>>>>>> D:\Camera\Common\GStreamer\bin>gst-launch-0.10.exe -v dshowvideosrc !
>>>>>> "video/x-dv, systemstream=2" ! fakesink
>>>>>> WARNING: erroneous pipeline: could not link dshowvideosrc0 to
>>>>>> fakesink0
>>>>>> D:\Camera\Common\GStreamer\bin>gst-launch-0.10.exe -v dshowvideosrc !
>>>>>> fakesink
>>>>>> Setting pipeline to PAUSED ...
>>>>>> <Crash>
>>>>>> D:\Camera\Common\GStreamer\bin>
>>>>>>
>>>>>
>>>>> I am not sure t follow you. You said "as if I remover the systemstream
>>>>> property, or set it to either true or false"
>>>>> but you got a link error with "video/x-dv, systemstream=1". Then a
>>>>> crash ?
>>>>>
>>>>
>>>> Sorry, I probably should have laid that out clearer. I actually executed
>>>> 4 commands there - one for systemstream=0, one for systemstream=1, one for
>>>> systemstream=2 and the other as before.
>>>>
>>>> If I do a gst-inspect on dshowvideosrc I can see that systemstream is
>>>> set to true in one case and false in another. No matter what I set it to I
>>>> always got a crash. However, now when I execute 'gst-launch dshowvideosrc !
>>>> "video/x-dv, systemstream=true" ! fakesink' I get a lot of console output,
>>>> which I assume means everything works fine. I'm really not sure what I'm
>>>> doing differently now though.
>>>>
>>>>     D:\Camera\Common\GStreamer\bin>gst-launch-0.10.exe -v dshowvideosrc
>>>>>> ! "video/x-dv, format=dvsd, width=640, height=480, framerate=10" ! fakesink
>>>>>> Setting pipeline to PAUSED ...
>>>>>> ** (gst-launch-0.10:2448): WARNING **: your desired video size is not
>>>>>> valid : 640 mod 1244160 !=0
>>>>>>
>>>>>> ** (gst-launch-0.10:2448): WARNING **: your desired video size is not
>>>>>> valid : 480 mod 1577311108 !=0
>>>>>> <Crash>
>>>>>>
>>>>>
>>>>> Could you try to add systemstream property as following:
>>>>>
>>>>> gst-launch-0.10.exe -v dshowvideosrc ! "video/x-dv, format=dvsd,
>>>>> width=640, height=480, framerate=10, systemstream=1" ! fakesink
>>>>> and
>>>>> gst-launch-0.10.exe -v dshowvideosrc ! "video/x-dv, format=dvsd,
>>>>> width=640, height=480, framerate=10, systemstream=0" ! fakesink
>>>>>
>>>>
>>>> I think my attempts at experimenting are a little bit of a red herring.
>>>> gst-launch crashes whenever I pass in the format argument. If  I run
>>>> gst-launch without this property set I still get the warning about the
>>>> desired video size being invalid and the same type of console output I
>>>> experienced just setting the caps to "video/x-dv, systemstream=true":
>>>>
>>>> D:\Camera\Common\GStreamer\bin>gst-launch-0.10.exe -v dshowvideosrc !
>>>> "video/x-dv, systemstream=true, width=640, height=480, framerate=10" !
>>>> fakesink
>>>> Setting pipeline to PAUSED ...
>>>>
>>>> ** (gst-launch-0.10:3556): WARNING **: your desired video size is not
>>>> valid : 640 mod 1244160 !=0
>>>>
>>>> ** (gst-launch-0.10:3556): WARNING **: your desired video size is not
>>>> valid : 480 mod 1577311108 !=0
>>>>
>>>> /GstPipeline:pipeline0/GstDshowVideoSrc:dshowvideosrc0.GstPad:src: caps
>>>> = video/x-dv, systemstream=(boolean)true, width=(int)640, height=(int)480,
>>>> framerate=(int)10
>>>> Pipeline is live and does not need PREROLL ...
>>>> Setting pipeline to PLAYING ...
>>>> New clock: GstSystemClock
>>>> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
>>>> video/x-dv, systemstream=(boolean)true, width=(int)640, height=(int)480,
>>>> framerate=(int)10
>>>> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps =
>>>> video/x-dv, systemstream=(boolean)true, width=(int)640, height=(int)480,
>>>> framerate=(int)10
>>>> /GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps =
>>>> video/x-dv, systemstream=(boolean)true, width=(int)640, height=(int)480,
>>>> framerate=(int)10
>>>> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "preroll
>>>> *******"
>>>> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "event
>>>> ******* E(type: 102, GstEventNewsegment, update=(boolean)false,
>>>> rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_BYTES,
>>>> start=(gint64)0, stop=(gint64)-1, position=(gint64)0;) 013379C0"
>>>> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain
>>>> ******* <(144000 bytes, timestamp: 0:00:00.078125000, duration:
>>>> 0:00:00.040000000, offset: -1, offset_end: -1, flags: 32) 044D3320"
>>>> /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain
>>>> ******* <(144000 bytes, timestamp: 0:00:00.125000000, duration:
>>>> 0:00:00.040000000, offset: -1, offset_end: -1, flags: 0) 044D3378"
>>>> ...
>>>>
>>>> Again, it doesn't appear to work when I set systemstream to 0, 1, or 2,
>>>> only booleans.
>>>>
>>>> For some reason when I execute 'gst-launch dshowvideosrc ! "video/x-dv,
>>>> systemstream=true, width=640, height=480, framerate=10" ! ffdec_dvvideo !
>>>> directdrawsink' I get the link error saying that it cannot link
>>>> dshowvideosrc0 to ffdec_dvvideo0. Could this be something to do with the
>>>> format parameter being missing?
>>>>
>>>>
>>>>>
>>>>> The thing I know is that dshowvideosrc implementation goes in a wrong
>>>>> way in case of "video/x-dv, systemstream=1".
>>>>> I mean it uses FORMAT_VideoInfos fields while it should use
>>>>> FORMAT_DvInfo fields.
>>>>> Even if I have no dv camera I could try something but
>>>>> first I really have to know if it's systemstream=0 or 1.
>>>>>
>>>> You probably don't need it now, but I've attached a screenshot of the
>>>> filter dialog in graphedit, which might be able to tell you which
>>>> systemstream is being used.
>>>>
>>>> Thanks,
>>>>
>>>> Phil
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> gstreamer-devel mailing list
>>>> gstreamer-devel at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>>>
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>
>>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090629/39e71436/attachment.htm>


More information about the gstreamer-devel mailing list