Error working with appsink and appsrc

Anton Pryima zingfrid at gmail.com
Fri Sep 10 18:27:12 UTC 2021


Hello Dwight,

No, there is no way to launch appsrc pipeline using gst-launch. You need to
push data on need-data callback, so, you can use appsrc only using your own
c/python program.

Best regards,
Anton.

On Fri, Sep 10, 2021 at 7:32 PM Dwight Kulkarni <dwight at realtime-7.com>
wrote:

> Hi Anton,
>
> *1. I do not see a rtspsink in your  #2 pipeline.*
> >> I am not adding the rtspsink when I use the
> gst_rtsp_media_factory_set_launch it appears to setup that for me. My
> previous pipeline which was working I didn't have rtspsink either:
> v4l2src device=/dev/video1 ! video/x-raw, width=1920, height=1080,
> framerate=15/1 ! queue max-size-buffers=10
>                           ! vpuenc_h264 ! tee name=v ! queue
> max-size-buffers=10 ! rtph264pay name=pay0 pt=96 v.
>                          ! h264parse ! splitmuxsink name=filesink
> location=video%02d.mkv max-size-time=10000000000
> muxer-properties="properties,streamable=true"
>
>
> *2. Try to add rtpjitterbuffer into your #2 pipeline*
> Ok I will try this. When I added a queue to my earlier pipeline it started
> telling me there is no data available.
>
> *3. Did you check locally?* Do you see your stream from appsrc? Try to
> dump to file (if the display is not present).
>
> I am trying to figure out the command to do this, for example, if I start
> the appsink with:
>
> gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw, width=1920,
> height=1080, framerate=15/1 ! queue max-size-buffers=10
>                           ! vpuenc_h264 ! tee name=v ! queue
> max-size-buffers=10 ! appsink name=h264vid v.
>                          ! h264parse ! splitmuxsink name=filesink
> location=video%02d.mkv max-size-time=10000000000
> muxer-properties="properties,streamable=true"
>
>
> What would be my command to setup the receiver, all the examples that I
> see to tap into appsink with appsrc are using a programmatic call back not
> a text pipeline. For example is there something like:
>
> gst-launch-1.0 appsrc name=h264videosrc sink=h264vid ! avdec_h264 !
> autovideosink
>
>
> 4. Ok I'll post this
>
>
> On Fri, Sep 10, 2021 at 11:33 AM Anton Pryima <zingfrid at gmail.com> wrote:
>
>> Hello Dwight.
>>
>> 1. I do not see a rtspsink in your  #2 pipeline.
>> 2. Try to add rtpjitterbuffer into your #2 pipeline
>> 3. Did you check locally? Do you see your stream from appsrc? Try to dump
>> to file (if the display is not present).
>> 4. Post an error you've got on the receiver end.
>>
>> Best regards,
>> Anton.
>>
>> On Thu, Sep 9, 2021 at 10:47 PM Dwight Kulkarni via gstreamer-devel <
>> gstreamer-devel at lists.freedesktop.org> wrote:
>>
>>> Hi all,
>>>
>>> I am trying to setup RTSP server with master pipeline using appsrc and
>>> appsink.
>>>
>>> I) In media_configure callback I setup the generator pipeline:
>>>
>>> string pipeline = "v4l2src device=/dev/video1 ! video/x-raw, width=1920,
>>> height=1080, framerate=15/1 ! queue ! vpuenc_h264 ! appsink name=h264vid
>>> max-buffers=100 drop=true";
>>>
>>> 2) The RTSP pipeline is as follows:
>>> pipeline_config = "appsrc name=h264videosrc ! queue ! rtph264pay
>>> name=pay0 pt=96";
>>>
>>> 3) I have set the caps and need_data callback:
>>>   ctx->vid_appsrc = appsrc =
>>>       gst_bin_get_by_name_recurse_up (GST_BIN (element), "h264videosrc");
>>>   ctx->vid_appsink = appsink =
>>>       gst_bin_get_by_name (GST_BIN (ctx->generator_pipe), "h264vid");
>>>   g_object_set (G_OBJECT (appsrc), "caps", caps, NULL);
>>>   g_object_set (G_OBJECT (appsink), "caps", caps, NULL);
>>>  g_signal_connect (appsrc, "need-data", (GCallback) need_data, ctx);
>>>
>>> 4) In need_data callback I copy the data like so:
>>> GstSample *sample;
>>> sample = gst_app_sink_pull_sample (GST_APP_SINK (ctx->vid_appsink));
>>> GstBuffer *buffer = gst_sample_get_buffer (sample);
>>> GstSegment *seg = gst_sample_get_segment (sample);
>>> g_signal_emit_by_name (appsrc, "push-buffer", buffer, &ret);
>>>
>>>
>>> Based on the information I have, there is data in the need_data sample,
>>> however VlcClient after authentication throws error.
>>>
>>> Any help would be appreciated !
>>>
>>> --
>>> Sincerely,
>>>
>>> Dwight Kulkarni
>>>
>>
>
> --
> Sincerely,
>
> Dwight Kulkarni
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210910/fa938f11/attachment-0001.htm>


More information about the gstreamer-devel mailing list