splitmuxsink and timestamps
Jan Schmidt
jan at centricular.com
Wed Apr 19 03:05:40 UTC 2017
Hi,
On 19/04/17 10:21, Philippe De Muyter wrote:
> Hi Jan,
>
> On Tue, Apr 18, 2017 at 09:05:56PM +1000, Jan Schmidt wrote:
>> Hi,
>>
>> On 18/04/17 19:26, Philippe De Muyter wrote:
>>> Hello Jan and list
>>>
>>> I would like to enhance splitmuxsink's "location" property with a way
>>> to produce files named after the absolute timestamp of the first frame
>>> included in the file.
>>>
>>> Which of GST_BUFFER_PTS, GST_BUFFER_DTS or GST_BUFFER_TIMESTAMP
>>> should I use for that purpose ?
>>>
>>> I work on a arm board running linux equipped with a camera sensor, and
>>> synchronised using ntp. Myv4l2 driver produces UTC-time timestamps of
>>> each frame.
>>>
>>> Also, is there a container format that can hold those absolute timestamps,
>>> in order to retrieve them when replaying the file ?
>>
>> In GStreamer 1.12 (and in the 1.11.90 pre-release), there's a
>> format-location-full signal on splitmuxsink that lets you do what you
>> want. It passes the first buffer of a new fragment, and you can use
>> whichever timestamp you want for generating the output filename.
>
> Thanks
>
> Is that useable by a gst-launch pipeline ?
No, you need some code to connect to the signal and calculate the
filenames. A python script should do it.
>> GST_BUFFER_TIMESTAMP is an alias for GST_BUFFER_PTS, so they're the same
>> time.
>>
> Is it meant to contain the absolute capture timestamp of the frame ?
> Or is another timestamp field available for that purpose ?
Short answer: No.
Longer answer: PTS can contain whatever timestamp upstream decides -
it's just an incrementing time with some arbitrary start point that
increases according to the playback/capture rate of the video according
to the clock it's being measured against..
> And when replaying h264 encoded files produced by splitmuxsink using splitmuxsrc,
> is it possible to retrieve the original capture timestamps of the frames ?
You'll need to use timecodes for that. Hopefully someone else can
answer, because I've never used them.
- Jan.
>
> Philippe
>
--
Jan Schmidt, Centricular Ltd - http://centricular.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170419/6b75f0ad/attachment.sig>
More information about the gstreamer-devel
mailing list