Hello,<p>

I'm trying to create a daemon that captures a video stream from an ip security-camera.<br>
The camera provides an jpeg stream with configurable framerate. I would like to capture this stream and encode it as x264 or some other popular video format (doesn't realy matter as long as the encoding process doesn't generate too much overhead). I also want the captured video to be split in 10 minute long files.
<p>
I tried the following pipeline based on <a href="http://ipcctvsoft.blogspot.com/2010/07/getting-image-from-mjpeg-source-using_15.html" target="_top" rel="nofollow" link="external">this</a> blog post:<p>
<code>
$ gst-launch-0.10 -evt souphttpsrc location='http://192.168.0.178/videostream.cgi?rate=1&user=admin&pwd=123456' do-timestamp=true timeout=5 ! multipartdemux ! jpegdec ! x264enc ! filesink location=test.x264<br>
Setting pipeline to PAUSED ...<br>
GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.<br>
Pipeline is PREROLLING ...<br>
/GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:sink: caps = image/jpeg<br>
/GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)320, height=(int)240, framerate=(fraction)0/1<br>
Floating point exception
</code>
<p>
Replacing x264enc with mpeg2enc also gives an error message:<p>
<code>
$ gst-launch-0.10 -evt souphttpsrc location='http://192.168.0.178/videostream.cgi?rate=1&user=admin&pwd=123456' do-timestamp=true timeout=5 ! multipartdemux ! jpegdec ! mpeg2enc ! filesink location=test.mpg<br>
Setting pipeline to PAUSED ...<br>
GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.<br>
Pipeline is PREROLLING ...<br>
/GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:sink: caps = image/jpeg<br>
/GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)320, height=(int)240, framerate=(fraction)0/1<br>
ERROR: from element /GstPipeline:pipeline0/GstSoupHTTPSrc:souphttpsrc0: Internal data flow error.<br>
Additional debug info:<br>
gstbasesrc.c(2582): gst_base_src_loop (): /GstPipeline:pipeline0/GstSoupHTTPSrc:souphttpsrc0:
streaming task paused, reason not-negotiated (-4)<br>
ERROR: pipeline doesn't want to preroll.<br>
Setting pipeline to NULL ...<br>
/GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:src: caps = NULL<br>
/GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:sink: caps = NULL<br>
/GstPipeline:pipeline0/GstMultipartDemux:multipartdemux0.GstPad:src_0: caps = NULL<br>
Freeing pipeline ...<br>
</code>
<p>
I can view the stream using xvimagesink however:<p>
<code>
$ gst-launch-0.10 -evt souphttpsrc location='http://192.168.0.178/videostream.cgi?rate=1&user=admin&pwd=123456' do-timestamp=true timeout=5 ! multipartdemux ! jpegdec ! xvimagesink
</code>
<p>
What am I doing wrong here and how can I fix it.
<p>
As a second question, what would be the best way to split the stream into 10 minute files, do I simply disconnect the filesink and connect a new one every ten minutes or is there a better way?
<p>
Thanks,
Hans Maree
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/capturing-mjpeg-from-ip-camera-tp3913047p3913047.html">capturing mjpeg from ip-camera</a><br/>
Sent from the <a href="http://gstreamer-devel.966125.n4.nabble.com/">GStreamer-devel mailing list archive</a> at Nabble.com.<br/>