Error reading an IP camera MJPEG stream

Icarus Alive icarus.alive at gmail.com
Thu Sep 1 11:33:42 PDT 2011


On Thu, Sep 1, 2011 at 11:23 PM, Wim Taymans <wim.taymans at gmail.com> wrote:
> On 09/01/2011 01:32 PM, Icarus Alive wrote:
>>
>> 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
>
> You need .. ! jpegdec ! ffmpegcolorspace ! autovideosink

Perfect. That worked. Any particular reason why the ffmpegcolorspace
filter was required ?
Didn't find any example using this element.

>>
>> 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 !
>>
>>
>> ~ Icarus
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>


More information about the gstreamer-devel mailing list