2
votes

I want to connect to a HTTP MJPEG live stream and dump it locally as a video file. So I did:

$ gst-launch -vvv souphttpsrc location=http://bikersschool.dyndns.org/video.cgi?resolution=vga is-live=true do-timestamp=true ! multipartdemux ! jpegdec ! videorate ! video/x-raw-yuv, framerate=60/1 ! theoraenc ! oggmux ! filesink location="hi.ogg"

However, when playing the hi.ogg, the video is slow-motioned.

Here's a sample video that it produced:

UPDATED:

I tried dropping the videorate and the caps filter. But it failed with the following message:

$ gst-launch -vvv souphttpsrc location=http://bikersschool.dyndns.org/video.cgi?resolution=vga is-live=true do-timestamp=true ! multipartdemux ! jpegdec ! theoraenc ! oggmux ! filesink location="hi.ogg"

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/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:
..\..\..\Source\gstreamer\libs\gst\base\gstbasesrc.c(2507): gst_base_src_loop (): /GstPipeline:pipeline0/GstSoupHTTPSrc:souphttpsrc0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 1547045000 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/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
Setting pipeline to NULL ...
Freeing pipeline ...
1

1 Answers

0
votes

whats the purpose of the videorate ! video/x-raw-yuv, framerate=60/1?

Technically videorate will duplicate of drop frames to make the output rate 60fps. What if you drop the videorate ! capsfilter? What does gst-launch print for the caps of jpegdec?