Recode a motion-jpeg stream into mpeg-ts?

Christophe Lohr christophe.lohr at cegetel.net
Thu Mar 7 15:52:39 UTC 2019


Hi Tim,
  many thanks for your help

> there shouldn't be any need to specify that caps filter in front of
> videorate, you just need the one after it to force it to a certain
> output framerate, so
>
>    $ gst-launch-1.0 -v uridecodebin uri=... ! videorate ! video/x-raw,
>    framerate=25/1 ! autovideosink sync=false
>
> should hopefully work.

Unfortunately I still have issues
If I understand well, videorate complains about the lack of timestamp on
the input.

Ok, this is just a WARN, but I get nothing in my sinks

Is there a way to add some timing info on mjpeg decoding?


$ gst-launch-1.0 -v uridecodebin uri=http://192.168.3.55/mjpg/video.mjpg
! videorate ! video/x-raw, framerate=25/1 ! filesink location=foo.bar
or
$ gst-launch-1.0 -v uridecodebin uri=http://192.168.3.55/mjpg/video.mjpg
! videorate ! video/x-raw, framerate=25/1 ! autovideosink sync=false
or
$ gst-launch-1.0 -v uridecodebin uri=http://192.168.3.55/mjpg/video.mjpg
! videorate ! video/x-raw, framerate=25/1 ! fakesink  dump=true

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0: source =
"\(GstSoupHTTPSrc\)\ source"
0:00:00.034807168  4681 0x557ebc60e070 WARN               structure
gststructure.c:1832:priv_gst_structure_append_to_gstring: No value
transform to serialize field 'session' of type 'SoupSession'
Got context from element 'source': gst.soup.session=context,
session=(SoupSession)NULL, force=(boolean)false;
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstTypeFindElement:typefindelement0.GstPad:src:
caps = multipart/x-mixed-replace
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind:
force-caps = multipart/x-mixed-replace
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0:
sink-caps = multipart/x-mixed-replace
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstQueue2:queue2-0.GstPad:sink:
caps = multipart/x-mixed-replace
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstQueue2:queue2-0.GstPad:src:
caps = multipart/x-mixed-replace
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0.GstGhostPad:sink.GstProxyPad:proxypad0:
caps = multipart/x-mixed-replace
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps = multipart/x-mixed-replace
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstMultipartDemux:multipartdemux0.GstPad:sink:
caps = multipart/x-mixed-replace
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:sink:
caps = multipart/x-mixed-replace
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0.GstGhostPad:sink:
caps = multipart/x-mixed-replace
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0.GstPad:src_0:
caps = image/jpeg
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstJpegDec:jpegdec0.GstPad:sink:
caps = image/jpeg
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0.GstMultiQueuePad:sink_0:
caps = image/jpeg
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstJpegDec:jpegdec0.GstPad:src:
caps = video/x-raw, format=(string)I420, width=(int)1280,
height=(int)800, interlace-mode=(string)progressive,
multiview-mode=(string)mono,
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono,
pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2,
colorimetry=(string)1:4:0:0, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0:
max-size-buffers = 5
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0:
max-size-time = 0
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0:
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstVideoRate:videorate0.GstPad:src: caps =
video/x-raw, format=(string)I420, width=(int)1280, height=(int)800,
interlace-mode=(string)progressive, multiview-mode=(string)mono,
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono,
pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2,
colorimetry=(string)1:4:0:0, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
video/x-raw, format=(string)I420, width=(int)1280, height=(int)800,
interlace-mode=(string)progressive, multiview-mode=(string)mono,
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono,
pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2,
colorimetry=(string)1:4:0:0, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps =
video/x-raw, format=(string)I420, width=(int)1280, height=(int)800,
interlace-mode=(string)progressive, multiview-mode=(string)mono,
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono,
pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2,
colorimetry=(string)1:4:0:0, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps =
video/x-raw, format=(string)I420, width=(int)1280, height=(int)800,
interlace-mode=(string)progressive, multiview-mode=(string)mono,
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono,
pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2,
colorimetry=(string)1:4:0:0, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstVideoRate:videorate0.GstPad:sink: caps =
video/x-raw, format=(string)I420, width=(int)1280, height=(int)800,
interlace-mode=(string)progressive, multiview-mode=(string)mono,
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono,
pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2,
colorimetry=(string)1:4:0:0, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0.GstGhostPad:src_0.GstProxyPad:proxypad3:
caps = video/x-raw, format=(string)I420, width=(int)1280,
height=(int)800, interlace-mode=(string)progressive,
multiview-mode=(string)mono,
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono,
pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2,
colorimetry=(string)1:4:0:0, framerate=(fraction)0/1
0:00:02.138225698  4681 0x7fdab804c050 WARN               videorate
gstvideorate.c:1525:gst_video_rate_transform_ip:<videorate0> Got buffer
with GST_CLOCK_TIME_NONE timestamp, discarding it
0:00:02.142110560  4681 0x7fdab804c050 WARN               videorate
gstvideorate.c:1525:gst_video_rate_transform_ip:<videorate0> Got buffer
with GST_CLOCK_TIME_NONE timestamp, discarding it
0:00:02.144457457  4681 0x7fdab804c050 WARN               videorate
gstvideorate.c:1525:gst_video_rate_transform_ip:<videorate0> Got buffer
with GST_CLOCK_TIME_NONE timestamp, discarding it
0:00:02.146801631  4681 0x7fdab804c050 WARN               videorate
gstvideorate.c:1525:gst_video_rate_transform_ip:<videorate0> Got buffer
with GST_CLOCK_TIME_NONE timestamp, discarding it
0:00:02.149150693  4681 0x7fdab804c050 WARN               videorate
gstvideorate.c:1525:gst_video_rate_transform_ip:<videorate0> Got buffer
with GST_CLOCK_TIME_NONE timestamp, discarding it
../..
^Chandling interrupt.
Interrupt: Stopping pipeline ...
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...


Best regards
Christophe




More information about the gstreamer-devel mailing list