-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DTS issues question #50
Comments
It is difficult to handle it properly without knowing why the dts is decreasing. I suggest looking into the root cause - a difference of 17179995184 vs. 17185193584 is significant. One possible workaround might be to add a fictional offset to adjust the timestamp when seeing a big gap in dts, something like src/packager/media/formats/mp2t/es_parser_h264.cc&l=317 media_sample->set_dts(current_timing_desc.dts + timestamp_adjustment_); That said, I think the best option is still to find the root cause and solve the problem there. The workaround should be avoided if possible. |
Yes, BRS/ |
@peyoh I have updated https://github.com/kqyang/edash-packager to ignore samples with decreasing timestamp. Can you give it a try? It will be great if you can post logging messages as well. I am interested in seeing what is the timestamp pattern when it happens. Thanks. |
got it. |
Hi,
and
|
You can ignore the errors in container_names.cc - these errors should have been suppressed, sorry for the confusion. As for the warnings in nalu_reader.cc, it is as a result of #93 fix - the source content is not properly escaped. Other than that, is it still running? Have you seen errors like "Seeing sample with dts ..."? |
Hi KQ,
|
Hi KQ, here are additional logs:
|
The error in your previous log looks like a network failure:
From your 2nd log, the code was able to skip some misbehaved samples. Do you see any playback problem? |
Hi,
With this time difference, I must wait a lot of time before see something. |
Em... It is about 20 minutes difference. What do you expect to see? A continuous playback from sample at 106459200 to sample at 2678400, i.e. treat the sample at 2678400 as the next sample of the sample at 106459200? |
Another question: How does the timestamp progress? Something like (1) or (2)? (1) A sequence of samples with incorrect timestamp (T-1000 to T-800) are inserted between T+50 and T+51: T, T+1, T+2, ... T+50, T-1000, T-999, T-998, ... T-801, T-800, T+51, T+52, T+53 (2) T-1000 is the next sample of T+50 (The system adjusts timestamp by 1050): T, T+1, T+2, ... T+50, T-1000, T-999, T-998, ... T-801, T-800, ... It will be helpful if you can post the full log. |
Hi KQ, |
Ok, so it looks like it is more like case 2 mentioned above. Another solution I have in mind now is to start a new segment when seeing timestamp rolling back. Timeline will be something like:
It will then be up to player to decide how to handle a timeline like this. |
Hi KQ,
Because I'm unable to fully understand it from the spec. I know, that this is not a support forum, but this can help me to implement it properly at the client side. |
See ISO/IEC 23009-1:2014 5.3.9.6.2 for the semantics of segment timeline. Basically 't' specifies the start time of the segment, and 'd' specifies the duration of the segment, and 'r' specifies the repeat count,
is equivalent to
|
Hi KQ. |
No, that is not the cause of the problem. Although PTS/DTS is only 33 bits, it should wrap around and restart from 0. Our code handles that internally. We keep an internal base, the actual time stamp is calculated as (base << 33) + pts/dts. Whenever the time stamp wraps around, the internal base is increment by one. |
You do that something before fragmenter? Can you show me where? |
Sorry for the late reply. Somehow missed your message. Here is the code to unroll the timestamp: |
Closing due to long time of no activity. Feel free to re-open if there is any update. |
Hello,
sometimes, when the input stream is broken for some reason, packager fails in
DCHECK_GT(media_sample->dts(), pending_sample_->dts());
In fact this could not be happened with a well created video file, but it is possible with a live stream.
May you suggest some workaround on this?
The text was updated successfully, but these errors were encountered: