SRT stalling/errors
Marianna Smidth Buschle
msb at qtec.com
Mon Sep 13 07:34:15 UTC 2021
Hi,
I have been trying to use the SRT examples from
https://www.collabora.com/news-and-blog/blog/2018/02/16/srt-in-gstreamer/
But I can't get anything to work, it stays stuck at 0:00:00.0:
gst-launch-1.0 videotestsrc ! video/x-raw,width=640,height=480 !
x264enc ! mpegtsmux ! srtsink uri=srt://:33333 --gst-debug=*:3
PAUSERER rørledning ...
Rørledningen PREROLL'er ...
0:00:00.012148582 278786 0x562731a85980 WARN aggregator
gstaggregator.c:2046:gst_aggregator_query_latency_unlocked:<mpegtsmux0>
Latency query failed
0:00:00.012154380 278786 0x562731a859e0 FIXME default
gstutils.c:4025:gst_pad_create_stream_id_internal:<videotestsrc0:src>
Creating random stream-id, consider implementing a deterministic way of
creating a stream-id
Omlægger ventetid...
0:00:00.190766349 278786 0x562731a85980 FIXME basesink
gstbasesink.c:3384:gst_base_sink_default_event:<srtsink0> stream-start
event without group-id. Consider implementing group-id handling in the
upstream elements
Rørledningen er PREROLL'ed ...
Rørledning sættes til AFSPIL ...
New clock: GstSystemClock
0:00:00.0 / 99:99:99.
If I change "uri=srt://:33333" to "uri=srt://localhost:33333" or
"uri=srt://127.0.0.1:33333" I get this error after being stuck at
0:00:00.0 for ~5 seconds:
0:00:03.063014677 278844 0x55d47e6bf920 WARN srtobject
gstsrtobject.c:1436:gst_srt_object_send_headers:<srtsink0> error:
Connection does not exist
FEJL: fra element /GstPipeline:pipeline0/GstSRTSink:srtsink0: Kunne ikke
skrive til ressource.
Yderligere fejlsøgningsinformation:
../ext/srt/gstsrtobject.c(1436): gst_srt_object_send_headers ():
/GstPipeline:pipeline0/GstSRTSink:srtsink0:
Connection does not exist
0:00:03.063327514 278844 0x55d47e6bf920 WARN srtsink
gstsrtsink.c:181:gst_srt_sink_render:<srtsink0> error: Failed to write
to SRT socket: Unknown error
FEJL: fra element /GstPipeline:pipeline0/GstSRTSink:srtsink0: Failed to
write to SRT socket: Unknown error
Yderligere fejlsøgningsinformation:
../ext/srt/gstsrtsink.c(181): gst_srt_sink_render ():
/GstPipeline:pipeline0/GstSRTSink:srtsink0
Execution ended after 0:00:02.879225909
Rørledning sættes til NUL ...
0:00:03.063504673 278844 0x55d47e6bf920 FIXME aggregator
gstaggregator.c:1365:gst_aggregator_aggregate_func:<mpegtsmux0> Subclass
should call gst_aggregator_selected_samples() from its aggregate
implementation.
0:00:03.063651379 278844 0x55d47e6f2210 WARN srtlib
epoll.cpp:865:update_events: : epoll/update: IPE: update struck E1 which
is NOT SUBSCRIBED to @312011233
0:00:03.063892875 278844 0x55d47e6bf980 WARN basesrc
gstbasesrc.c:3127:gst_base_src_loop:<videotestsrc0> error: Internal data
stream error.
0:00:03.063947540 278844 0x55d47e6bf980 WARN basesrc
gstbasesrc.c:3127:gst_base_src_loop:<videotestsrc0> error: streaming
stopped, reason error (-5)
FEJL: fra element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
Internal data stream error.
Yderligere fejlsøgningsinformation:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop ():
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming stopped, reason error (-5)
0:00:03.158370051 278844 0x55d47e6f2210 WARN srtlib
epoll.cpp:865:update_events: : epoll/update: IPE: update struck E1 which
is NOT SUBSCRIBED to @312011233
gst-launch-1.0 --version
gst-launch-1.0 version 1.18.1
GStreamer 1.18.4
http://packages.qa.debian.org/gstreamer1.0
Thanks
Marianna
On 13.09.2021 06.22, gstreamer-devel-request at lists.freedesktop.org wrote:
> Send gstreamer-devel mailing list submissions to
> gstreamer-devel at lists.freedesktop.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> or, via email, send a message with subject or body 'help' to
> gstreamer-devel-request at lists.freedesktop.org
>
> You can reach the person managing the list at
> gstreamer-devel-owner at lists.freedesktop.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of gstreamer-devel digest..."
>
>
> Today's Topics:
>
> 1. Re: GStreamer 1.18.5 stable bug fix release (Tim-Philipp M?ller)
> 2. Re: plugin writing: base class for format conversion
> (Guennadi Liakhovetski)
> 3. splitmuxsink peggs cpu core when async-handling=true (Alan)
> 4. issue with multiple concurrent srtsink (?) (Marc)
> 5. facedetect not build from source (Marc)
> 6. how to nvenc/nvdec build 1.18 (Marc)
> 7. Re: how to nvenc/nvdec build 1.18 (Nirbheek Chauhan)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 12 Sep 2021 13:05:19 +0100
> From: Tim-Philipp M?ller <t.i.m at zen.co.uk>
> To: gstreamer-devel at lists.freedesktop.org
> Subject: Re: GStreamer 1.18.5 stable bug fix release
> Message-ID: <0e91d94a874b0f0a92fe81f894338cc0d329f465.camel at zen.co.uk>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi,
>
> Binaries are up now too:
>
> https://gstreamer.freedesktop.org/download/
>
> Cheers
> Tim
>
>
>
> ------------------------------
>
> Message: 2
> Date: Sun, 12 Sep 2021 17:31:33 +0200 (CEST)
> From: Guennadi Liakhovetski <g.liakhovetski at gmx.de>
> To: Michael Gruner <michael.gruner at ridgerun.com>
> Cc: Discussion of the development of and with GStreamer
> <gstreamer-devel at lists.freedesktop.org>
> Subject: Re: plugin writing: base class for format conversion
> Message-ID: <ce68f4e-dc8-7026-3cb-4015b7928325 at gmx.de>
> Content-Type: text/plain; charset=UTF-8
>
> Got it working!
>
> On Sat, 11 Sep 2021, Guennadi Liakhovetski wrote:
>
>> Hi Michael,
>>
>> As you notice, I might be slow (hey, it's a hobby in the end) but I'm
>> steady! I now have two plugins: the first one does the actual temperature
>> calculations on the original binary data, and exports temperature values
>> as metadata. Then comes a standard scaler in the pipeline, then my second
>> plugin, which should add the side bar with those temperature values. That
>> second plugin can already receive metadata from the first one, can add a
>> side border and can draw a colour gradient in it.
>>
>> Now I want to print those temperature values in that border next to that
>> gradient. You previously recommended an overlay plugin, but I want to do
>> that programmatically from my plugin, i.e. I need a C gstreamer API for
>> that. I've done some searching and I see pango (on Linux) being used in
>> gstbasetextoverlay and related code, but again, that's just building
>> plugins and not exporting an API for other gstreamer code. Do I understand
>> it correctly that there's no such API? Do I have to export those values in
>> text sinks and then use them for textoverlay (if that even would work...)?
>>
>> Thanks
>> Guennadi
>>
>> On Sun, 1 Aug 2021, Guennadi Liakhovetski wrote:
>>
>>> GstMeta worked beautifully, thanks a lot!
>>>
>>> On Sat, 31 Jul 2021, Michael Gruner wrote:
>>>
>>>> Hey Guennadi
>>>>
>>>> GStreamer has the GstMeta API, which allows you to attach metadata to
>>>> the buffers which, from your last email, seems to be what you need. If
>>>> you are using GStreamer 1.20 or later you can use
>>>> gst_buffer_add_custom_meta. On previous versions, you?ll need to
>>>> implement your own meta. If you need an example, here?s an
>>>> implementation that adds video-related metadata to the buffers:
>>>>
>>>> https://github.com/GStreamer/gst-plugins-base/blob/master/gst-libs/gst/video/gstvideometa.c
>>>>
>>>> The meta approach is what I would personally go for. For completeness of
>>>> the answer, there is a way to have elements within elements, it?s called
>>>> a bin. Your element would inherit from GstBin and basically build a
>>>> sub-pipeline.
>>>>
>>>> One final idea is to consider using a third party scaler in your
>>>> element, opencv or libyuv, for example. Your transform_caps method would
>>>> change, not only the format, but the size as well. Then on the
>>>> transform_frame you?d call the scaler after your processing. however,
>>>> i?d remain principled and avoid mixing the two responsibilities and go
>>>> for the meta approach.
>>>>
>>>> Michael
>>>>
>>>>> On 31 Jul 2021, at 02:42, Guennadi Liakhovetski <g.liakhovetski at gmx.de> wrote:
>>>>>
>>>>> ?Hi Michael,
>>>>>
>>>>>> On Mon, 19 Jul 2021, Michael Gruner wrote:
>>>>>>
>>>>>> Glad it worked!
>>>>>>
>>>>>> If you want to overlay a picture (like the thermal bar in that GIF), you
>>>>>> can check the gdkpixbufoverlay
>>>>>> <https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-gdkpixbufoverlay.html>
>>>>>> element. If you also want to add a border to the image so that the
>>>>>> overlay doesn?t cover part of the image, you may look at the videobox
>>>>>> <https://gstreamer.freedesktop.org/documentation/videobox/index.html?gi-language=c>
>>>>>> element. By setting the ?right? property to a negative value, you?ll add
>>>>>> a black border to the right of the image.
>>>>> Thanks, I'll check those! Meanwhile I realised, that I have one more
>>>>> difficulty with this: the image I'm getting from the camera is 32x24
>>>>> pixels, so, if I just extend it similar to that GIF I still only have 24
>>>>> pixels vertically which isn't a lot for temperature text :-) I usually add
>>>>> a videoscale element to the pipeline after my conversion plugin, that
>>>>> works well, but that doesn't help with that bar - I want to add it after
>>>>> scaling, and the actual processing must happen before scaling, it must
>>>>> access original camera data.
>>>>>
>>>>> One approach I could take is write a second plugin to apply after scaling,
>>>>> but apart from the image that plugin would need some additional data from
>>>>> the first one - at least the temperature range. My current plan is to pass
>>>>> those two numbers in metadata lines below the image and hope that those
>>>>> numbers aren't modified by the videoscale plugin...
>>>>>
>>>>> Are there better ways to achieve this? Can I "call" videoscale internally
>>>>> in my conversion plugin, then I wouldn't need two plugins. Or can I pass
>>>>> metadata in some way more robust than image pixels?
>>>>>
>>>>> Thanks
>>>>> Guennadi
>>>>>
>>>>>>>> On 18 Jul 2021, at 05:09, Guennadi Liakhovetski <g.liakhovetski at gmx.de> wrote:
>>>>>>>> On Sat, 17 Jul 2021, Michael Gruner wrote:
>>>>>>>> The default is to only allow the same format. You need to reimplement
>>>>>>>> the transform_caps virtual method in order to change the format. (note
>>>>>>>> that transform_caps is a basetransform method).
>>>>>>> Great, this works! Thanks very much! I've got a colour-coded image now.
>>>>>>> Ideally - if not too much work - I'd also like to get numeric temperature
>>>>>>> information like on the side bar in the GIF on
>>>>>>> https://github.com/makerportal/raspi-thermal-cam or maybe in an additional
>>>>>>> in-frame metadata channel. I found a discussion here
>>>>>>> https://developer.ridgerun.com/wiki/index.php/GStreamer_and_in-band_metadata
>>>>>>> but that doesn't seem to have made it to the mainline. I guess the most
>>>>>>> user-friendly would be adding a side bar like in the former link. It
>>>>>>> should be possible to extend the width of the image and overlay that kind
>>>>>>> of information, right?
>>>>>>>
>>>>>>> Thanks
>>>>>>> Guennadi
>>>>>>>
>>>>>>>>> On 17 Jul 2021, at 13:50, Guennadi Liakhovetski <g.liakhovetski at gmx.de> wrote:
>>>>>>>>>
>>>>>>>>> ?Hi Michael,
>>>>>>>>>
>>>>>>>>>> On Sat, 17 Jul 2021, Michael Gruner wrote:
>>>>>>>>>>
>>>>>>>>>> Hi Guennadi
>>>>>>>>>>
>>>>>>>>>> The videoconvert element can already handle this conversion for you:
>>>>>>>>>>
>>>>>>>>>> gst-launch-1.0 v4l2src ! videoconvert ! video/x-raw,format=RGB ! ?
>>>>>>>>> Yes, I know about videoconvert, but I need to do some special processing
>>>>>>>>> of thermal data. For the algorithms to work I have to access the raw data,
>>>>>>>>> which is output by the v4l2 driver in GRAY16_BE format (1-to-1 from the
>>>>>>>>> camera), and I want to transform that to a colour gradient similar to well
>>>>>>>>> known thermal images, so my plugin cannot just stay within GRAY16_BE and
>>>>>>>>> use videoconvert to convert that to RGB - you'd just get a gray image of
>>>>>>>>> course.
>>>>>>>>>
>>>>>>>>>> If you, for other reason, need to write your own element, you probably
>>>>>>>>>> want to use the videofilter base class. It?s a specialization of the
>>>>>>>>>> basetransform class for video. The important virtual method for you to
>>>>>>>>>> implement is ?transform_caps?, that will allow you to specify the input
>>>>>>>>>> and output caps respectively.
>>>>>>>>> The videofilter class is "allowed" to convert between formats? I thought
>>>>>>>>> it would be, so I actually tried it. But I was unable to get it to input
>>>>>>>>> and output different formats. I was only able to get it to work with the
>>>>>>>>> same format. Are you sure that is supposed to work?
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>> Guennadi
>>>>>>>>>
>>>>>>>>>> Michael
>>>>>>>>>>
>>>>>>>>>>>> On 17 Jul 2021, at 05:05, Guennadi Liakhovetski via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
>>>>>>>>>>> ?Hi,
>>>>>>>>>>>
>>>>>>>>>>> I'm trying to write a plugin to convert data from a thermal camera. It
>>>>>>>>>>> should take data from the v4l2src source in GRAY16_BE format and convert
>>>>>>>>>>> it to an RGB video output. I'm looking at gst-element-maker but I'm not
>>>>>>>>>>> finding any suitable base class that would take video/x-raw as input and
>>>>>>>>>>> generate the same as output and would convert between format. Do I have to
>>>>>>>>>>> write a plugin from scratch? Or should I use basetransform? Any tutorials
>>>>>>>>>>> for that?
>>>>>>>>>>>
>>>>>>>>>>> Thanks
>>>>>>>>>>> Guennadi
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> gstreamer-devel mailing list
>>>>>>>>>>> gstreamer-devel at lists.freedesktop.org
>>>>>>>>>>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>>>>
>
> ------------------------------
>
> Message: 3
> Date: Sun, 12 Sep 2021 11:52:42 -0400
> From: Alan <dartagnan64b at gmail.com>
> To: Discussion of the development of and with GStreamer
> <gstreamer-devel at lists.freedesktop.org>
> Subject: splitmuxsink peggs cpu core when async-handling=true
> Message-ID:
> <CAKeB8L--ALgmzbVks66SNuuKMLfNoYnNPNw3F=-b0mGG6eoU8g at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello,
>
> I have a pipeline tee branch that uses ... ! queue ! valve ! splitmuxsink.
> My requirement is that this branch should only have data flow on an event.
> So the pipeline starts, doesn't pre-roll since data is dropped by the valve
> element. If I set async-handling=true on splitmuxsink data flows in other
> branches (and is blocked in the valve branch as expected); however, the CPU
> is pegged.
>
> Should this be filed as a bug for splitmuxsink?
>
> Is there another way to not have a branch to pre-roll (I do need the queue
> to pre-buffer so I can't just dynamically add/remove the branch)?
>
> Thank you very much
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210912/e7309440/attachment-0001.htm>
>
> ------------------------------
>
> Message: 4
> Date: Sun, 12 Sep 2021 16:16:26 +0000
> From: Marc <Marc at f1-outsourcing.eu>
> To: Discussion of the development of and with GStreamer
> <gstreamer-devel at lists.freedesktop.org>
> Subject: issue with multiple concurrent srtsink (?)
> Message-ID: <32cc14dad71a42e18e6d96c33767da36 at f1-outsourcing.eu>
> Content-Type: text/plain; charset="utf-8"
>
> This seems to run fine, I get the stream playing in vlc on port 33333
>
> gst-launch-1.0 -v srtsrc uri=srt://:55555?mode=listener ! tee name=t \
> t. ! queue ! srtsink uri=srt://:33333 \
> t. ! queue ! filesink location=video.m2s
>
> However this does not stream in a vlc client.
>
> gst-launch-1.0 -v srtsrc uri=srt://:55555?mode=listener ! tee name=t \
> t. ! queue ! srtsink uri=srt://:33333 \
> t. ! queue ! srtsink uri=srt://:33334 \
> t. ! queue ! filesink location=video.m2s
>
>
> ------------------------------
>
> Message: 5
> Date: Sun, 12 Sep 2021 18:10:45 +0000
> From: Marc <Marc at f1-outsourcing.eu>
> To: Discussion of the development of and with GStreamer
> <gstreamer-devel at lists.freedesktop.org>
> Subject: facedetect not build from source
> Message-ID: <9a651dff21bf4458bb9690827cf8e9ca at f1-outsourcing.eu>
> Content-Type: text/plain; charset="utf-8"
>
>
> I have gstreamer 1.18.5 build from git generating this error
>
> 0:00:00.030326651 9847 0x12c6040 ERROR faceoverlay gstfaceoverlay.c:147:gst_face_overlay_create_children:<GstFaceOverlay at 0x136a040> facedetect element not found (opencv plugin)
>
> The faceoverlay is being build, it looks like the opencv is correctly detected[1]. So it I am probably missing some other library. How can I see what library I am missing for building the facedect? I am not really familiar with the meson build / ninja -C build options and discovering dependencies.
>
> [1]
> Run-time dependency opencv found: YES 3.4.6
> Dependency opencv found: YES 3.4.6 (cached)
> Has header "opencv2/bgsegm.hpp" : YES
> Has header "opencv2/calib3d.hpp" : YES
> Has header "opencv2/core.hpp" : YES
> Has header "opencv2/imgproc.hpp" : YES
> Has header "opencv2/objdetect.hpp" : YES
> Has header "opencv2/opencv.hpp" : YES
> Has header "opencv2/video.hpp" : YES
>
> ------------------------------
>
> Message: 6
> Date: Sun, 12 Sep 2021 22:16:19 +0000
> From: Marc <Marc at f1-outsourcing.eu>
> To: Discussion of the development of and with GStreamer
> <gstreamer-devel at lists.freedesktop.org>
> Subject: how to nvenc/nvdec build 1.18
> Message-ID: <220c1ae9378545e48e3ab635c2e87c53 at f1-outsourcing.eu>
> Content-Type: text/plain; charset="utf-8"
>
> Is there some man page how to build nvidia support with gstreamer 1.18?
>
>
> ------------------------------
>
> Message: 7
> Date: Mon, 13 Sep 2021 09:51:48 +0530
> From: Nirbheek Chauhan <nirbheek.chauhan at gmail.com>
> To: Discussion of the development of and with GStreamer
> <gstreamer-devel at lists.freedesktop.org>
> Cc: Marc <Marc at f1-outsourcing.eu>
> Subject: Re: how to nvenc/nvdec build 1.18
> Message-ID:
> <CADqQcK6rh5U+bQo9j66XuN0kBrcyyG0EKCddJ9dOkM1KR_UcKQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi,
>
> The nvcodec plugin does not have any build-time dependencies in 1.18, so
> just building gst-build should suffice.
>
> The plugin will simply not load if it cannot find the necessary Nvidia
> libraries at runtime.
>
> Cheers,
> Nirbheek.
>
>
> On Mon, 13 Sep, 2021, 05:00 Marc via gstreamer-devel, <
> gstreamer-devel at lists.freedesktop.org> wrote:
>
>> Is there some man page how to build nvidia support with gstreamer 1.18?
>>
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210913/c2657aab/attachment.htm>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> ------------------------------
>
> End of gstreamer-devel Digest, Vol 128, Issue 29
> ************************************************
--
Best regards / Med venlig hilsen
“Marianna Smidth Buschle”
More information about the gstreamer-devel
mailing list