Forum

Post a new question

Categories:

Tags:

Get correct timestamp from dash player

Lucas 2017-03-19 14:28:28 UTC in Nimble Streamer
Db545a75025ee910ce1008628c5ceb02

Sorry, I got some problems when I tried to get correct timestamp when I was playing DVR.
I don't know who I can ask, but I need some help...

There is my mpd file below,
I tried to get timestamp with player.timeAsUTC() function, but it's not correct.
Then I tried to get timestamp from player.timeAsUTC() - 3371240288 / 90000 (first SegmentTimeline t / timescale)
But it still has some difference which equals 16 secs..
I also tried availabilityStartTime + player.time() and still no luck.

Could anyone help me please?

<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" type="dynamic" xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 DASH-MPD.xsd" profiles="urn:mpeg:dash:profile:isoff-live:2011" availabilityStartTime="2017-03-19T13:27:39Z" minimumUpdatePeriod="PT5S" timeShiftBufferDepth="PT3M10.0S" minBufferTime="PT1.0S">
<Location>http://xxx.xxx.xxx.xxx:8081/b/a/manifest_dvr.mpd?nimblesessionid=124</Location>
<Period id="1" start="PT0.0S">
<AdaptationSet id="1" segmentAlignment="true" startWithSAP="1">
<Representation id="v0" mimeType="video/mp4" codecs="avc1.4d4032" width="1536" height="1536" bandwidth="887013">
<SegmentTemplate timescale="90000" media="dvr_v_p1_$Time$.m4s?nimblesessionid=124" initialization="dvr_i_p1.m4mv?nimblesessionid=124">
<SegmentTimeline>
<S t="3371240288" d="900072" />
<S t="3372140360" d="450038" />
<S t="3372590398" d="450036" />
<S t="3373040434" d="450038" />
<S t="3373490472" d="450034" />
<S t="3373940506" d="900074" />
<S t="3374840580" d="450036" />
<S t="3375290616" d="450036" />
<S t="3375740652" d="450036" />
<S t="3376190688" d="450038" />
<S t="3376640726" d="900072" />
<S t="3377540798" d="450036" />
<S t="3377990834" d="450036" />
<S t="3378440870" d="450038" />
<S t="3378890908" d="450036" />
<S t="3379340944" d="900072" />
<S t="3380241016" d="450036" />
<S t="3380691052" d="450036" />
<S t="3381141088" d="450038" />
<S t="3381591126" d="450036" />
<S t="3382041162" d="900072" />
<S t="3382941234" d="450036" />
<S t="3383391270" d="450036" />
<S t="3383841306" d="450038" />
.....
</SegmentTimeline>
</SegmentTemplate>
</Representation>
</AdaptationSet>
</Period>
</MPD>

Alex Pokotilo 2017-03-20 00:19:56 UTC
B0af1cee7eb1e40dd284d9982b3aef70

Hi,
what time your want to calculate ?

Lucas 2017-03-20 08:48:01 UTC
Db545a75025ee910ce1008628c5ceb02

Hi Alex. Thank you for your reply.
I want to get the timestamp which is the same as video was recorded.
For example,
I recorded DVR during 2017/3/1 12:00 to 2017/3/3 12:00
When I play DVR exactly at 2017/3/2 12:00 I want to get the timestamp of
2017/3/2 12:00.
I can't understand why the segment is from 3371240288 of above mpd file.
Because it's downloaded from a new recorded DVR mpd file. Should it start from 0?
I though the correct time will be
availabilityTimeFrom + segment t / timescale
But I am not sure about it.

Thank you for your patience

Alex Pokotilo 2017-03-21 02:45:07 UTC
B0af1cee7eb1e40dd284d9982b3aef70

Hi,
as I see you record mpegts stream.
In general your math correct.
If your mpegts recording starts from timestamp != 0 you get such problem as you have.

Lucas 2017-03-21 03:49:35 UTC
Db545a75025ee910ce1008628c5ceb02

Hi, Alex
Thank you again.
It's exactly the same as my problem.

When I started to record from 2017/3/1 12:00.
I check the mpd file immediately after the record started.
Why Nimble's mpd file first initial segmentTimeLine t != 0?
Especially it's availabilityStartTime is from 2017/3/1 12:00.

Lucas 2017-03-21 03:53:13 UTC
Db545a75025ee910ce1008628c5ceb02

For example
availabilityStartTime="2017-03-01T12:00:00Z"
...
<segmentTimeLine>
<S t="3371240288" d="600000" />

Should the t == 0 if I check the mpd file immediately after record was started?

Thank you.

Alex Pokotilo 2017-03-21 04:15:27 UTC
B0af1cee7eb1e40dd284d9982b3aef70

Ideally yes. We probably need to compensate this on Nimble side but we don't do that

Lucas 2017-03-23 16:07:30 UTC
D93f657ebdf11c769fd33c6e2367f601

Thank you so much.
I understand that.
We have already bought your solutions.
Because nimble's low usage of cpu & memory, I think it's amazing.

Is there any possible you will fix it in the future?
I have another question and I will open an new issue.

Yury Udovichenko 2017-03-23 22:57:53 UTC
8926135388643c4be9ec685a7033dc32

Hi Lucas,

Just to clarify - I don't find you in our customer base. Please drop a message to sales@wmspanel.com so I could map you to your request.

Thank you.

Lucas 2017-03-25 04:14:45 UTC
D93f657ebdf11c769fd33c6e2367f601

The register account is another, I sent you an email to sales@wmspanel.com
Thank you

Post a reply