1

I have an HTTP server that streams images from a camera in a series of HTTP responses to a single request. The frame rate of this direct stream fluctuates, ie. some frames take longer to produce, some take shorter. The average framerate is around 2.1 FPS.

I can open the stream directly from the server with gstreamer this way:

gst-launch-1.0 -v souphttpsrc location=http://192.168.1.225:81/stream ! queue ! jpegdec ! videoconvert ! autovideosink

I want to augment this pipeline to convert the image stream to a MPEG TS. I guess a part of my problem is to convert the asynchronous images from the original source to a constant frame rate for the resulting MPEG TS. But as soon as I add the mpeg2enc plugin to the pipeline I get this error:

ERROR: from element /GstPipeline:pipeline0/GstSoupHTTPSrc:souphttpsrc0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstSoupHTTPSrc:souphttpsrc0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
ERROR: from element /GstPipeline:pipeline0/GstQueue:queue0: Internal data stream error.
Additional debug info:
../plugins/elements/gstqueue.c(990): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstQueue:queue0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

Any ideas how to address this? I guess I need a "sample-and-hold" plugin that just feeds the most recent image to the mpeg2enc plugin at the rate it requires, and maybe other stuff as well.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.