Creating RTSP MJPEG stream

Tim Müller tim at centricular.com
Fri Oct 10 08:01:39 PDT 2014


On Fri, 2014-10-10 at 05:47 -0700, zdravco wrote:

Hi,

> I am trying to create RTSP MJPEG stream. My source is a sequence of raw
> images. 
> I have tried with this pipe first:
> 
> appsrc name=mysrc ! videoconvert ! jpegenc ! rtpjpegpay pt=96 name=pay0
> 
> with the appsrc caps set like this:
> 
> g_object_set(G_OBJECT(appsrc), "caps", 	
> gst_caps_new_simple("video/x-raw", 
> "format", G_TYPE_STRING, "RGB", 
> "width", G_TYPE_INT, 1280, 
> "height", G_TYPE_INT, 1024, 
> "framerate", 
> GST_TYPE_FRACTION, 10, 1, NULL), NULL);

Are you sure this is what you're doing?

Because the log says:

0:00:03.842167902 WARN basesrc
gstbasesrc.c:2865:gst_base_src_loop:<mysrc> error: streaming task
paused, reason not-negotiated (-4)

which indicates incompatible caps somewhere.

And just before that:

gst_event_new_caps: creating caps event video/x-jpeg,
format=(string)RGB, width=(int)1280, height=(int)1024,
framerate=(fraction)10/1

Note that "video/x-jpeg" is not a valid media type. Maybe you meant
video/x-raw? Alternative, use image/jpeg if you're pushing jpeg.


Cheers
 -Tim



> When I try to play the stream from vlc I get this output (debug level 4)
> jpegenc-output.txt
> <http://gstreamer-devel.966125.n4.nabble.com/file/n4668999/jpegenc-output.txt>  
> and the output from vlc is this  vlc-output.txt
> <http://gstreamer-devel.966125.n4.nabble.com/file/n4668999/vlc-output.txt>  
> 
> I have no problem when streaming h264 (similar pipe and caps). Also, I have
> tried to encode to jpeg myself and try to stream with image/jpeg caps and
> pipe without jpegenc, but without success. 
> 
> Can somebody help me with this please?
> 
> Thanks,
> zdravco
> 
> 
> 
> 
> 
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Creating-RTSP-MJPEG-stream-tp4668999.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list