AW: Getting Timestamps From a Resulting Video File With splitmuxsink
Michael MacIntosh
mmacintosh at linear-systems.com
Thu Jun 15 02:04:48 UTC 2017
Hey,
Thank you guys for all of your responses! The message should do the trick!
For some reason I didn't even think that the splitmuxsink would be
posting messages on the bus. Is there documentation on this? The
gstreamer documentation on element messages says check the documentation
for that element, but from what I can tell, no elements have
documentation stating what element messages they use. I just had to
look over the source code to find out what the parameters were for
"splitmuxsink-fragment-opened".
Anyways, after some digging I realized that the splitmuxsink holds onto
the last I frame it has received and only writes to the file when it
gets the next I frame (it has a full GOP length).
This makes things interesting when you grab a specific frame from the
stream, and want to know where in the output video file it would land,
because you technically wouldn't know until the splitmuxsink makes the
decision that it will either record that GOP to the current file, or
that the GOP is too big (I am rotating on max bytes) and it needs to
save it to a new file.
For now I can grab the starting times and filenames from the bus with
the "splitmuxsink-fragment-opened" message, and use them to build a
mapping, and calculate the differences when recording has finished.
Still, it feels like I am missing the mark, I feel like the muxer or the
filesink should be aware of what the timestamp is going to be in the
file it is writing to, but whatever.
Cheers,
Michael.
On 6/14/2017 1:55 AM, Thornton, Keith wrote:
> Splitmuxsink sends splitmuxsink-fragment-opened / splitmuxsink-fragment-closed messages for each fragment.
>
> -----Ursprüngliche Nachricht-----
> Von: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] Im Auftrag von Tim Müller
> Gesendet: Mittwoch, 14. Juni 2017 10:40
> An: gstreamer-devel at lists.freedesktop.org
> Betreff: Re: Getting Timestamps From a Resulting Video File With splitmuxsink
>
> On Tue, 2017-06-13 at 18:31 -0700, Michael MacIntosh wrote:
>
> Hi Michael,
>
> Doesn't splitmuxsink post ELEMENT messages on the bus that give you a mapping of running time to filename ?
>
> If you keep track of those it should allow you to figure out which file it is and what the time into the file part is.
>
> Alternatively you could just use splitmuxsrc of course and seek to the right location that way based on the original timestamp.
>
> Cheers
> -Tim
>
> --
> Tim Müller, Centricular Ltd - http://www.centricular.com _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list