EOS the pipeline:
<p>gst-launch-1.0 -e filesrc location=%s ! qtdemux name=demux ! queue ! h264parse ! queue ! mpegpsmux name=mux ! filesink location=/tmp/a.mp4<br/>
<b>or</b><br/>
gst_element_send_event(Pipeline, gst_event_new_eos());</p>
<p>
editing the timestamps you can do it this way also:<br/>
filesrc location=%s ! qtdemux name=demux ! queue ! identity ! h264parse ! queue ! mpegpsmux name=mux ! filesink location=/tmp/a.mp4<br/>
C++:<br/>
GstElement* identity = gst_bin_get_by_name(GST_BIN(pipeline),"identity0");<br/>
g_signal_connect(identity, "handoff", G_CALLBACK(identity_handoff),this->pRtspPipeline);<br/>
<pre>
void identity_handoff(GstElement* element, GstBuffer* buffer, gpointer user_data)
{
auto pRtspPipe = static_cast<RtspPipeline*>(user_data);
try
{
GstClockTime now;
GstClockTime base_time;
now = gst_clock_get_time(gst_element_get_clock(element));
base_time = gst_element_get_base_time(element);
if (gst_buffer_is_writable(buffer))
GST_BUFFER_DTS(buffer) = now - base_time;
}
catch (std::exception ex)
{
}
}</pre>
</p>
<div class="signature" style="margin-top:1em;color:#666666;font-size:11px;">
------------------------------
<br/>Gstreamer 1.14.4
<br/>------------------------------
<br/>Windows
</div>
<br/><hr align="left" width="300" />
Sent from the <a href="http://gstreamer-devel.966125.n4.nabble.com/">GStreamer-devel mailing list archive</a> at Nabble.com.<br/>