-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Freeze frames with hardware decoding #2566
Comments
Reproduced. Oddly, when you pause and resume the stream, it works fine from that point onwards. |
Looking at the media internals when this happens, it looks like there's a Oddly enough, since Joey updated to the newest master, this seems to be happening a lot less frequently. I did a git bisect which suggests that ca81d55 is the root cause of that. I'm not sure why; the asset you provided does not have any text tracks. Looking at media internals again, the video element is still having periodic I'll try to figure out which CL this started with, tomorrow. At first I thought it was e018aaa, but then I got it to reproduce in an earlier revision. In some versions, this appears to happen a lot less often. Or maybe it has to do with what part of the livestream is playing, not sure yet. |
I have sometimes found that a git bisect can sometimes be misleading if the behavior you are testing turns out to be non-deterministic. If you do it again and get different results, you may want to try repro several times in a row at each step of the bisect.
Is that a typo, or is it the same sequence of events both when it freezes and unfreezes? |
When it freezes, the demuxer underflows. When it unfreezes, the decoder underflows. In both cases, the respective underflow is followed by a |
@theodab Do you have any update? |
I've noticed that, sometimes, it seems to freeze only briefly. To try to figure out if this is a result of the period flattening changes, since that is one of the biggest code changes since With current master: With current master, modified to disable parts of the period-flattening code: I could run more trials in the future, but for now that's looking like a no. I also tried running the stream in Firefox and Safari. Firefox played for half an hour with no issues. Safari repeatedly got stuck buffering, but it was actually buffering rather than getting stuck decoding a video frame, so that's probably an unrelated issue. So it is looking like this might be a problem with the decoding pipeline in Chrome, rather than Shaka Player. The audio keeps playing while the video is frozen, and the messages in media internals both suggest that the video pipeline might be getting stuck. If you don't have any objections, I can show the stream to a Chrome person, to see if they know what could be happening under the hood. |
Yes, you can show the video and share the stream privately with someone from Chrome, you have my permission. Thanks for the research! |
@theodab Do you have any feedback from the Chrome team? |
They're looking into this now. They might open a crbug for this. If so, the plan is to create repro steps that do not require your content (both for reasons of privacy, and also not having to rely on a livestream for repro). |
@theodab do you have any update? maybe a crbug link? |
No news yet. The Chrome team is still trying to isolate a consistent repro for this. I haven't heard anything since last week. |
@avelad, the Chrome team has had no luck in understanding the problem because of the inconsistency in reproducing it. They have some suggestions though:
Thanks! |
They just emailed us again with one more suggestion:
await this.enqueueOperation_(
contentType,
() => this.append_(contentType, data)); Add this: await this.enqueueOperation_(
contentType,
() => this.abort_(contentType)); Note that this appears several times in the method, in branches dependent on transmuxing, closed captions, etc. |
I tried the 1 option and the stream works as expected. I'm going to try the rest of the points, but I need a little time. |
My perception is that it is something related to hardware decoding ... It is the only change that has made it work. |
If the content fails with hardware decode, there is probably some encoding parameter that you could adjust to improve this. But I don't know what it is. I'll talk to the Chrome team again. An alternative to option 4 is that you could check if the segments all begin with a keyframe. They should, for what it's worth. But if they don't start with a keyframe, then the content will need to be fixed. |
Chrome team believes that this is seems to be a content issue, but that they also see a chance to improve Chrome's response, either with rejection or a helpful log message. Would you please file a bug on crbug.com and link to it here? I will CC the right people on that issue and they will try to determine the root cause in your content. |
Someone from Chrome team filed this bug to investigate further: https://bugs.chromium.org/p/chromium/issues/detail?id=1091969 |
I've seen issues like this with the macOS hardware decoder in Chrome caused by mismarked keyframes. The implementation will discard frames until it finds an IDR, and if it never finds one then you get the behavior described here. This should be logged in the media log, and there may also be messages in chrome://gpu. There was a change made to treat SEI recovery frames with a recovery interval of 0 as if they were IDRs, first available in 89.0.4363.0. Is the stream using SEI recovery? Does the issue still happen in Chrome Beta/Dev/Canary? |
I just checked in Chrome Canary(90.0.4411.0 (Build oficial) canary (x86_64)) and it works well. In Chrome stable it doesn't work. |
I have tried again with Chrome 97 and it no longer happens, since time has passed and the problem in chromium has been resolved, I close this issue. Thanks! |
Have you read the FAQ and checked for duplicate open issues? Yes
What version of Shaka Player are you using? master as of 2020-05-12
Can you reproduce the issue with our latest release version? No
Can you reproduce the issue with the latest code from master? Yes
Are you using the demo app or your own custom app? Both
If custom app, can you reproduce the issue using our demo app? Yes
What browser and OS are you using? Chrome 81 macOS 10.15.4
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
What are the manifest and license server URIs?
I have sent an email privately.
What did you do?
Load a Live DASH live stream
What did you expect to happen?
The playback is smooth
What actually happened?
After loading the frame freezes but time continues running. This in version 2.5.11 does not happen.
The text was updated successfully, but these errors were encountered: