Creating successives files from appsrc source

kroketor mariano.escudero.sanjose at gmail.com
Tue Jul 19 19:29:58 UTC 2016


Thanks for your reply Arjen.
I've tried with the mpegtsmux value fot the muxer property and it works
worst, when i reproduce the video it only reproduce the first frame with no
movement, with  mp4mux it had a little of movement (less than a second)
whenever you jump in the reproduction bar.

I'm working on C++ and i don't know Python but i have this part of the code
that i believe that manage the timestamp like you say, please, correct me if
i'm wrong:
		
		rep >> video;
		size = video.rows * video.cols * video.channels();
		data1 = video.data;

		buffer = gst_buffer_new_allocate(NULL, size, NULL);
		gst_buffer_map(buffer, &map, GST_MAP_WRITE);
		memcpy((guchar *)map.data, data1, gst_buffer_get_size(buffer));
		GST_BUFFER_PTS(buffer) = timestamp;
		GST_BUFFER_DURATION(buffer) = gst_util_uint64_scale_int(1, GST_SECOND, 5);
		timestamp += GST_BUFFER_DURATION(buffer);

		g_object_set(G_OBJECT(app.appsrc), "caps",
			gst_caps_new_simple("video/x-raw",
				"format", G_TYPE_STRING, "BGR",
				"width", G_TYPE_INT, video.cols,
				"height", G_TYPE_INT, video.rows,
				"framerate", GST_TYPE_FRACTION, 1, 1,
				NULL), NULL);
		g_signal_emit_by_name(app.appsrc, "push-buffer", buffer, &ret);

The filesize of the segments is almost the desired (30s), their length are
between 28 and 30.

I have been seeking information and i'm startin to think that, like you say,
the root of the problem could be a bug. What alternative i have to the use
of the splitmuxsink in my case?




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Creating-successives-files-from-appsrc-source-tp4678736p4678761.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list