New segment and mp4mux

killerrats koreysjunkmail at gmail.com
Thu Oct 11 19:23:21 UTC 2018


EOS the pipeline:
gst-launch-1.0 -e filesrc location=%s ! qtdemux name=demux ! queue !
h264parse ! queue ! mpegpsmux name=mux ! filesink location=/tmp/a.mp4
*or*
gst_element_send_event(Pipeline, gst_event_new_eos());
editing the timestamps you can do it this way also:
filesrc location=%s ! qtdemux name=demux ! queue ! identity ! h264parse !
queue ! mpegpsmux name=mux ! filesink location=/tmp/a.mp4
C++:
GstElement* identity = gst_bin_get_by_name(GST_BIN(pipeline),"identity0");
g_signal_connect(identity, "handoff",
G_CALLBACK(identity_handoff),this->pRtspPipeline);
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)	{	}}




-----
------------------------------
Gstreamer 1.14.4
------------------------------
Windows
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20181011/1de5319a/attachment.html>


More information about the gstreamer-devel mailing list