Recode a motion-jpeg stream into mpeg-ts?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Recode a motion-jpeg stream into mpeg-ts?

Christophe Lohr
Hi,
  Sorry, I have a final-user question... (I'm quite far to become a gst
developper...) So, may I ask my question here?

  I'm trying to recode the motion-jpeg stream for a network cam into an
mpeg-ts stream
(the ultimate wish is to watch this on a DLNA TV via Rygel, but this is
another step)

For now, I can watch the mjpeg stream via gstreamer:

$ gst-launch-1.0 uridecodebin uri=http://192.168.3.55/mjpg/video.mjpg !
autovideosink

It's fine, I'm happy.

Now, I try to reencode the stream:

$ gst-launch-1.0 -v uridecodebin uri=http://192.168.3.55/mjpg/video.mjpg
! video/x-raw, framerate=25/1, width=640, height=480 !  videoconvert !
avenc_mpeg2video ! mpegtsmux ! tcpserversink
../..
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1: caps = video/x-raw,
framerate=(fraction)25/1, width=(int)640, height=(int)480
ERROR: from element
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstSoupHTTPSrc:source:
Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop ():
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstSoupHTTPSrc:source:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

So, what's wrong?

Best regards
Christophe
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Recode a motion-jpeg stream into mpeg-ts?

Antonio Ospite-2
On Wed, 6 Feb 2019 11:45:23 +0100
Christophe Lohr <[hidden email]> wrote:

> Hi,
>   Sorry, I have a final-user question... (I'm quite far to become a gst
> developper...) So, may I ask my question here?
[...]

> Now, I try to reencode the stream:
>
> $ gst-launch-1.0 -v uridecodebin uri=http://192.168.3.55/mjpg/video.mjpg
> ! video/x-raw, framerate=25/1, width=640, height=480 !  videoconvert !
> avenc_mpeg2video ! mpegtsmux ! tcpserversink
> ../..
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter1: caps = video/x-raw,
> framerate=(fraction)25/1, width=(int)640, height=(int)480
> ERROR: from element
> /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstSoupHTTPSrc:source:
> Internal data stream error.
> Additional debug info:
> gstbasesrc.c(3055): gst_base_src_loop ():
> /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstSoupHTTPSrc:source:
> streaming stopped, reason not-negotiated (-4)
> ERROR: pipeline doesn't want to preroll.
> Setting pipeline to NULL ...
> Freeing pipeline ...
>
> So, what's wrong?
>

Caps negotiation failed, you can look up what this means at a lower
level.

In the particular case, if the source material is not 640x480 (your
desired destination resolution) you'll have to add videoscale as well
next to videoconvert (also add videorate if you are changing the
framerate too).

Ciao,
   Antonio

--
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Recode a motion-jpeg stream into mpeg-ts?

Nicolas Dufresne-5
In reply to this post by Christophe Lohr


Le mer. 6 févr. 2019 06 h 27, Christophe Lohr <[hidden email]> a écrit :
Hi,
  Sorry, I have a final-user question... (I'm quite far to become a gst
developper...) So, may I ask my question here?

  I'm trying to recode the motion-jpeg stream for a network cam into an
mpeg-ts stream
(the ultimate wish is to watch this on a DLNA TV via Rygel, but this is
another step)

For now, I can watch the mjpeg stream via gstreamer:

$ gst-launch-1.0 uridecodebin uri=http://192.168.3.55/mjpg/video.mjpg !
autovideosink

It's fine, I'm happy.

Now, I try to reencode the stream:

$ gst-launch-1.0 -v uridecodebin uri=http://192.168.3.55/mjpg/video.mjpg
! video/x-raw, framerate=25/1, width=640, height=480 !  videoconvert !
avenc_mpeg2video ! mpegtsmux !

I'm not sure, but maybe you need a parser after the encoder. mpegvideoparse I think. I'm really not certain from the output.

tcpserversink
../..
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1: caps = video/x-raw,
framerate=(fraction)25/1, width=(int)640, height=(int)480
ERROR: from element
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstSoupHTTPSrc:source:
Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop ():
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstSoupHTTPSrc:source:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

So, what's wrong?

Best regards
Christophe
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Recode a motion-jpeg stream into mpeg-ts?

Christophe Lohr
In reply to this post by Antonio Ospite-2
Le 06/02/2019 à 14:53, Antonio Ospite a écrit :
> you'll have to add videoscale as well next to videoconvert (also add
> videorate if you are changing the framerate too).

Let's keep the same resolution for now (each step one after the other ;)

But I wonder if there is an intrinsic issue about the frame rate...

$ gst-launch-1.0 -v uridecodebin uri=http://192.168.3.55/mjpg/video.mjpg
! queue ! videorate ! video/x-raw, framerate=5/1 ! videoconvert !
avenc_mpeg2video ! filesink location=test.mpg

/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)5/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
buffering... 0% 

and this stay at 0% !


Indeed, the original motion-jpeg stream has no frame rate.
To be more precise, the network-cam produces pictures at an actual rate
varying from 5.5 fps to 6.5 fps...

I expected that the "queue" could compensate the jitter... but there
should be something else more complicated to do ;-)
Does someone has an example on how to manage a mjpeg source an recode it
to something else?

Best regards
Christophe


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Framerate of a motion-jpeg stream

Christophe Lohr
Hi,
  I'd like to handle the motion-jpeg stream of a nework cam.


This commands works well and display the stream:

$ gst-launch-1.0 -v uridecodebin uri=http://192.168.3.55/mjpg/video.mjpg
! video/x-raw, framerate=0/1 ! autovideosink sync=false


The point is that mjpeg has no real "framerate"; pictures arrive as they
can
(well, on the local network this is about at 25fps)

Now, let says I want to convert this stream to another format at a given
framerate, how to do this?

If I add the "videorate" plugin, I get nothing, nothing to display
as if it can't feed its buffer...


This commands doesn't work (this open the display window, which remains
desperately empty):

$ gst-launch-1.0 -v uridecodebin uri=http://192.168.3.55/mjpg/video.mjpg
! video/x-raw, framerate=0/1 ! videorate !  video/x-raw, framerate=25/1
! autovideosink sync=false


Any idea ?

Best regards
Christophe


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Recode a motion-jpeg stream into mpeg-ts?

Christophe Lohr
In reply to this post by Christophe Lohr
Hi,
  I'm still trying to handle the motion-jpeg stream from my network cam.

I try another pipeline, based on souphttpsrc instead of uridecodebin
I have no more issues about the framerate, but I have issues about
"multiview mode"
This is very surprising because my cam has no stereoscopic mode at all.


export GST_DEBUG="*:2"
gst-launch-1.0 -v souphttpsrc
location="http://192.168.3.55/mjpg/video.mjpg" do-timestamp=false
is_live=true ! jpegdec ! videorate ! avenc_mpeg2video ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
0:00:00.037243353 26024 0x55c9a94e8ad0 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 'souphttpsrc0': gst.soup.session=context,
session=(SoupSession)NULL, force=(boolean)false;
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.319396676 26024 0x55c9a94a65e0 WARN            videodecoder
gstvideodecoder.c:2443:gst_video_decoder_chain:<jpegdec0> Received
buffer without a new-segment. Assuming timestamps start from 0.
/GstPipeline:pipeline0/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/GstVideoRate:videorate0.GstPad:src: caps =
video/x-raw, width=(int)1280, height=(int)800,
framerate=(fraction)750/1001, pixel-aspect-ratio=(fraction)1/1,
colorimetry=(string)1:4:0:0, chroma-site=(string)mpeg2,
format=(string)I420, 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
/GstPipeline:pipeline0/avenc_mpeg2video:avenc_mpeg2video0.GstPad:sink:
caps = video/x-raw, width=(int)1280, height=(int)800,
framerate=(fraction)750/1001, pixel-aspect-ratio=(fraction)1/1,
colorimetry=(string)1:4:0:0, chroma-site=(string)mpeg2,
format=(string)I420, 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
/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
0:00:00.416987752 26024 0x55c9a94a65e0 WARN                   libav
gstavvidenc.c:632:stereo_gst_to_av: Unsupported multiview mode - no
mapping in libav
0:00:00.442030959 26024 0x55c9a94a65e0 WARN                   libav
gstavvidenc.c:632:stereo_gst_to_av: Unsupported multiview mode - no
mapping in libav
/GstPipeline:pipeline0/avenc_mpeg2video:avenc_mpeg2video0.GstPad:src:
caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false,
width=(int)1280, height=(int)800, framerate=(fraction)750/1001,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)1:4:0:0, chroma-site=(string)mpeg2,
multiview-mode=(string)mono,
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps =
video/mpeg, mpegversion=(int)2, systemstream=(boolean)false,
width=(int)1280, height=(int)800, framerate=(fraction)750/1001,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)1:4:0:0, chroma-site=(string)mpeg2,
multiview-mode=(string)mono,
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
0:00:00.513455631 26024 0x55c9a94a65e0 WARN                   libav
gstavvidenc.c:632:stereo_gst_to_av: Unsupported multiview mode - no
mapping in libav
0:00:00.612562218 26024 0x55c9a94a65e0 WARN                   libav
gstavvidenc.c:632:stereo_gst_to_av: Unsupported multiview mode - no
mapping in libav
0:00:00.677977733 26024 0x55c9a94a65e0 WARN                   libav
gstavvidenc.c:632:stereo_gst_to_av: Unsupported multiview mode - no
mapping in libav
0:00:00.763901741 26024 0x55c9a94a65e0 WARN                   libav
gstavvidenc.c:632:stereo_gst_to_av: Unsupported multiview mode - no
mapping in libav
0:00:00.853542160 26024 0x55c9a94a65e0 WARN                   libav
gstavvidenc.c:632:stereo_gst_to_av: Unsupported multiview mode - no
mapping in libav
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:01.375909345
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...


So, why?
Note: adding 'video/x-raw, multiview-mode=mono, multiview-flag=none'
does not fix it.
Any idea ?


Best regards
Christophe

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Recode a motion-jpeg stream into mpeg-ts?

Tim Müller
On Tue, 2019-03-05 at 09:01 +0100, Christophe Lohr wrote:

Hi Christophe,

The multiview thing is just a warning in the debug log, I don't think
it should have any effect or cause any problems.

You can set fakesink silent=false and pass -v to gst-launch-1.0 to see
if you get output buffers on the fakesink (or use fakesink dump=true).

As for the pipeline in your previous mail

   $ gst-launch-1.0 -v uridecodebin uri=... ! video/x-raw,
   framerate=0/1 ! autovideosink sync=false

and

   $ gst-launch-1.0 -v uridecodebin uri=... ! video/x-raw,
   framerate=0/1 ! videorate !  video/x-raw, framerate=25/1 !
   autovideosink sync=false

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.

Cheers
 -Tim

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

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Recode a motion-jpeg stream into mpeg-ts?

Christophe Lohr
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


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Recode a motion-jpeg stream into mpeg-ts?

bor6
You must specify the correct format of the received video and then decode it.

gst-launch-1.0 -v uridecodebin uri=http://192.168.3.55/mjpg/video.mjpg !
image/jpeg,width=1280,height=800,framerate=25/1 ! queue ! jpegdec



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Recode a motion-jpeg stream into mpeg-ts?

Nicolas Dufresne-5
In reply to this post by Christophe Lohr


Le mer. 6 févr. 2019 06 h 27, Christophe Lohr <[hidden email]> a écrit :
Hi,
  Sorry, I have a final-user question... (I'm quite far to become a gst
developper...) So, may I ask my question here?

  I'm trying to recode the motion-jpeg stream for a network cam into an
mpeg-ts stream
(the ultimate wish is to watch this on a DLNA TV via Rygel, but this is
another step)

For now, I can watch the mjpeg stream via gstreamer:

$ gst-launch-1.0 uridecodebin uri=http://192.168.3.55/mjpg/video.mjpg !
autovideosink

It's fine, I'm happy.

Now, I try to reencode the stream:

$ gst-launch-1.0 -v uridecodebin uri=http://192.168.3.55/mjpg/video.mjpg
! video/x-raw, framerate=25/1, width=640, height=480 !  videoconvert

Is this the right caps? You might want to add videoscale and videorate before your caps filter.

!
avenc_mpeg2video ! mpegtsmux ! tcpserversink

You may need mpegvideoparse before the mixer.

../..
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1: caps = video/x-raw,
framerate=(fraction)25/1, width=(int)640, height=(int)480
ERROR: from element
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstSoupHTTPSrc:source:
Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop ():
/GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstSoupHTTPSrc:source:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

So, what's wrong?

Best regards
Christophe
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel