<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi,</p>
<p>> Hi, the consumer needs an SPS and PPS. This could be
transmitted by setting the config-interval parameter of rtph264pay</p>
<p>I already tried this:</p>
<p><span style=" color:#646482;"> </span><span style="
color:#808bed;">const</span><span style=" color:#646482;"> </span><span
style=" color:#808bed;">auto</span><span style=" color:#646482;">
</span>payloader<span style=" color:#646482;"> </span><span
style=" color:#cfbfad;">=</span><span style=" color:#646482;"> </span><span
style=" color:#cfbfad;">::</span>gst_element_factory_make<span
style=" color:#cfbfad;">(</span><span style=" color:#ffcd8b;
background-color:#404040;">"rtph264pay"</span><span style="
color:#cfbfad;">,</span><span style=" color:#646482;"> </span><span
style=" color:#808bed;">nullptr</span><span style="
color:#cfbfad;">);</span></p>
<p><span style=" color:#646482;"> </span><span style="
color:#cfbfad;">::</span>g_object_set<span style="
color:#cfbfad;">(</span><span style=" color:#409090;">G_OBJECT</span><span
style=" color:#cfbfad;">(</span>payloader<span style="
color:#cfbfad;">),</span>
</p>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#646482;"> </span><span style=" color:#ffcd8b; background-color:#404040;">"config-interval"</span><span style=" color:#cfbfad;">,</span><span style=" color:#646482;"> </span><span style=" color:#f0ad6d;">1</span><span style=" color:#cfbfad;">,</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#646482;"> </span><span style=" color:#808bed;">nullptr</span><span style=" color:#cfbfad;">);
</span></pre>
with different values, as "-1", "1" and so on, but it does not help.<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">10.01.2018 17:14, Thornton, Keith
пишет:<br>
</div>
<blockquote type="cite"
cite="mid:7153D1686E3590498D57D986E0F83BA606E405@adeerl01sms004">
<pre wrap="">Hi, the consumer needs an SPS and PPS. This could be transmitted by setting the config-interval parameter of rtph264pay.
-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [<a class="moz-txt-link-freetext" href="mailto:gstreamer-devel-bounces@lists.freedesktop.org">mailto:gstreamer-devel-bounces@lists.freedesktop.org</a>] Im Auftrag von Denis Shienkov
Gesendet: Mittwoch, 10. Januar 2018 14:23
An: Discussion of the development of and with GStreamer <a class="moz-txt-link-rfc2396E" href="mailto:gstreamer-devel@lists.freedesktop.org"><gstreamer-devel@lists.freedesktop.org></a>
Cc: Tim Müller <a class="moz-txt-link-rfc2396E" href="mailto:tim@centricular.com"><tim@centricular.com></a>
Betreff: Video artifacts on a receiver side after re-creating of its pipeline
Hi all.
I use two own applications: producer & consumer.
A producer generates the video stream and sends to the UDP sink.
A consumer receives this stream and displays a video content.
When the consumer started before the producer, then I did not get any video artifacts on an consumer.
But, when I try to do stop/start the consumer (when the producer already running), then I see many video artifacts on the consumer.
A possible workaround it is try to restart the producer (in this case the consumer receives good video content).
How to solve this issue?
UPD:
A producer uses the following pipeline's equivalent:
[code]
void Producer::start()
{
...
...
m_appsrc = ::gst_element_factory_make("appsrc", nullptr);
::g_object_set(G_OBJECT(m_appsrc),
"stream-type", GST_APP_STREAM_TYPE_STREAM,
"is-live", true,
"format", GST_FORMAT_TIME,
nullptr);
const auto videoconvert =
::gst_element_factory_make("videoconvert", nullptr);
const auto videoenc = ::gst_element_factory_make("x264enc", nullptr);
::gst_util_set_object_arg(G_OBJECT(videoenc), "tune", "zerolatency");
::g_object_set(G_OBJECT(videoenc),
"key-int-max", 10,
nullptr);
const auto parse = ::gst_element_factory_make("h264parse", nullptr);
::g_object_set(G_OBJECT(parse),
"config-interval", -1,
nullptr);
const auto payloader = ::gst_element_factory_make("rtph264pay",
nullptr);
const auto udpsink = ::gst_element_factory_make("udpsink", nullptr);
const auto host = destination.host().toLocal8Bit();
const auto port = destination.port();
::g_object_set(G_OBJECT(udpsink),
"host", host.constData(),
"port", port,
nullptr);
m_pipeline = ::gst_pipeline_new("pipeline");
...
...
if (!m_appsrc || !videoconvert || !videoenc
|| !payloader || !udpsink) {
qCCritical(gstProducerControl) << "Unable to create one of pipeline element";
}
::gst_bin_add_many(GST_BIN(m_pipeline),
m_appsrc,
videoconvert,
videoenc,
parse,
payloader,
udpsink,
nullptr);
const auto result = ::gst_element_link_many(m_appsrc,
videoconvert,
videoenc,
parse,
payloader,
udpsink,
nullptr);
...
const auto status = ::gst_element_set_state(m_pipeline,
GST_STATE_PLAYING);
...
}
void Foo::stop()
{
...
::gst_element_set_state(m_pipeline, GST_STATE_NULL);
::gst_object_unref(m_pipeline);
m_appsrc = nullptr;
m_pipeline = nullptr;
...
}
[/code]
A consumer uses the following pipeline's equivalent:
[code]
void Consumer::start()
{
...
const auto udpsrc = ::gst_element_factory_make("udpsrc", nullptr);
::g_object_set(G_OBJECT(udpsrc),
"address", address.constData(),
"port", port,
nullptr);
const auto srccaps = ::gst_caps_new_simple(
"application/x-rtp",
"", G_TYPE_STRING, "",
nullptr);
::g_object_set(G_OBJECT(udpsrc),
"caps", srccaps,
nullptr);
const auto depay = ::gst_element_factory_make("rtph264depay", nullptr);
const auto decodebin = ::gst_element_factory_make("decodebin",
nullptr);
const auto videoconvert =
::gst_element_factory_make("videoconvert", nullptr);
const auto videofilter = ::gst_element_factory_make("capsfilter",
nullptr);
const auto videofiltercaps = ::gst_caps_new_simple(
"video/x-raw",
"format", G_TYPE_STRING, "BGRA",
nullptr);
::g_object_set(G_OBJECT(videofilter),
"caps", videofiltercaps,
nullptr);
m_videosink = m_renderer->videoSink();
::g_object_set(G_OBJECT(m_videosink),
"sync", false,
nullptr);
m_pipeline = ::gst_pipeline_new("pipeline");
...
::gst_bin_add_many(GST_BIN(m_pipeline),
udpsrc,
depay,
decodebin,
videoconvert,
videofilter,
m_videosink,
nullptr);
::gst_element_link_many(udpsrc, depay, decodebin, nullptr);
::gst_element_link_many(videoconvert, videofilter, m_videosink, nullptr);
...
const auto status = ::gst_element_set_state(m_pipeline,
GST_STATE_PLAYING);
...
}
void Consumer::stop()
{
::gst_element_set_state(m_pipeline, GST_STATE_NULL);
::gst_object_unref(m_pipeline);
m_videosink = nullptr;
m_pipeline = nullptr;
}
[/code]
BR,
Denis
_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>