adding datetime stamp to location
Dwight Kulkarni
dwight at realtime-7.com
Wed Sep 8 14:35:28 UTC 2021
Hi all,
I am trying to get my pipeline to add a datetime stamp to the location, as
opposed to the numeric value.
Previously I was using: splitmuxsink location=video%02d.mkv
This is creating multiple files with video00.mkv etc. names.
Now I tried using: splitmuxsink location=video$(date +%s).mkv
This is creating only a single file with timestamp and appears to overwrite
the previous files.
1) I see some examples where a callback is used. Should I use a callback or
is there another way ?
2) If I use callback, I have GstMediaFactory object where I assign the
pipeline with: gst_rtsp_media_factory_set_launch
I can't seem to find how to access the pipeline element in GstMediaFactory
object.
I want to do something like this code:
static gchararray
format_location_callback (GstElement * splitmux,
guint fragment_id,
gpointer udata)
{
static int i =0;
gchararray myarray = g_strdup_printf("myvid%d.mp4", i);
i += 1;
return myarray;
}
g_signal_connect (G_OBJECT (bin->sink), "format-location",
G_CALLBACK (format_location_callback), bin);
Any help is appreciated. Thanks !
--
Sincerely,
Dwight Kulkarni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210908/bee1f374/attachment.htm>
More information about the gstreamer-devel
mailing list