Error reading an IP camera MJPEG stream

Mailing List SVR lists at svrinformatica.it
Thu Sep 1 10:57:36 PDT 2011


Il 01/09/2011 19:50, Icarus Alive ha scritto:
> On Thu, Sep 1, 2011 at 7:47 PM, Mailing List SVR
> <lists at svrinformatica.it>  wrote:
>> Il 01/09/2011 13:32, Icarus Alive ha scritto:
>>> Hi,
>>>
>>> Got a rather tacky little east-asian IP camera (apparently a Foscam
>>> knock-off), and trying to write a little DIY DVR (of sorts) for it on
>>> Linux (Debian 'Sid'). Here's the command I use:
>>>
>>> icarus at crunchex:~$ gst-launch-0.10 -v souphttpsrc
>>> location=http://icarus:icarus123@192.168.1.20:8012/videostream.cgi
>>> do-timestamp=true ! multipartdemux ! jpegdec ! autovideosink
>> try
>>
>> gst-launch souphttpsrc location=... ! jpegparse ! jpegdec ! xvimagesink
>> sync=false
>>
> Hello Nicola,
>
> Here's what I get with that...
>
> icarus at crunchex:~$ gst-launch-0.10 -v souphttpsrc
> location=http://icarus:icarus123@192.168.1.20:8012/videostream.cgi !
> jpegparse ! jpegdec ! xvimagesink
> WARNING: erroneous pipeline: no element "jpegparse"
>
> and...
>
> icarus at crunchex:~$ gst-inspect-0.10 jpegparse
> No such element or plugin 'jpegparse'


jpegparse is in -bad plugins, do you have gstreamer plugins bad 
installed? If yes what version are you using?

I think jpegparse is in -bad since 0.10.21

Nicola


>
>
> and, I tried the following...
>
> icarus at crunchex:~$ gst-launch-0.10 -v souphttpsrc
> location=http://icarus:icarus123@192.168.1.20:8012/videostream.cgi !
> jpegdec ! xvimagesink sync=false
> Setting pipeline to PAUSED ...
> ERROR: Pipeline doesn't want to pause.
> ERROR: from element
> /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Could not
> initialise Xv output
> Additional debug info:
> xvimagesink.c(1433): gst_xvimagesink_get_xv_support ():
> /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
> No port available
> Setting pipeline to NULL ...
> Freeing pipeline ...
>
>
> So, no luck so far.
>
> ~Icarus
>
>>> and here's what I get.
>>>
>>> Setting pipeline to PAUSED ...
>>> Pipeline is PREROLLING ...
>>> /GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:sink: caps = image/jpeg
>>> /GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:src: caps =
>>> video/x-raw-yuv, format=(fourcc)I420, width=(int)640, height=(int)480,
>>> framerate=(fraction)0/1
>>> ERROR: from element
>>> /GstPipeline:pipeline0/GstSoupHTTPSrc:souphttpsrc0: Internal data flow
>>> error.
>>> Additional debug info:
>>> gstbasesrc.c(2582): gst_base_src_loop ():
>>> /GstPipeline:pipeline0/GstSoupHTTPSrc:souphttpsrc0:
>>> streaming task paused, reason not-negotiated (-4)
>>> ERROR: pipeline doesn't want to preroll.
>>> Setting pipeline to NULL ...
>>> /GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:src: caps = NULL
>>> /GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:sink: caps = NULL
>>> /GstPipeline:pipeline0/GstMultipartDemux:multipartdemux0.GstPad:src_0:
>>> caps = NULL
>>> Freeing pipeline ...
>>>
>>> The username/password for the challenged domain is correct, as I can
>>> test it with exact same URL in Firefox, and similarly in vlc. Could
>>> someone suggest what I should be checking and what might be wrong ?
>>>
>>> On reading around, I found 2 different syntaxes on reading MJPEG
>>> streams off IP cams, and not sure which one is to be used, and what's
>>> the difference --
>>>
>>> Approach-1: (writes to file)
>>> gst-launch -v souphttpsrc location=http://10.11.12.13/mjpeg
>>> do-timestamp=true ! multipartdemux
>>>     ! image/jpeg,width=640,height=480 ! matroskamux
>>>     ! filesink location=mjpeg.mkv
>>>
>>> Approach-2: (displays on local display device)
>>> gst-launch souphttpsrc
>>> location=http://admin:1234@192.168.1.150/mjpg/video.mjpg timeout=5 !
>>> jpegdec ! glimagesink force-aspect-ratio=true
>>>
>>> In first approach, there's a step of demuxing multipart encoded JPEGs,
>>> and then possibly specifying image decode with certain attributes. In
>>> second approach I don't see any multipart encode handling, and direct
>>> invocation of jpeg-decoder.
>>>
>>> In my setup, I don't even seem to have a glimagesink though !



More information about the gstreamer-devel mailing list