shaka-project / shaka-player-embedded

Shaka Player in a C++ Framework
Apache License 2.0
239 stars 62 forks source link

Player freezes when playing specific content #210

Closed yukihiro-m-play closed 3 years ago

yukihiro-m-play commented 3 years ago

Playing our client’s content on the ShakaPlayer Embedded freezes after 10 seconds. The following log appears only for problematic contents.

Log Message:

[Log]: “Stall detected at 10.301999999999927 for 1.1729998588562012 seconds.”
[Log]: “Seeking forward 0.1 seconds to break stall.”
[Log]: “(all): seeked: buffered seek: presentationTime=10.401999999999926”

And we tried and confirmed the following:

yukihiro-m-play commented 3 years ago

We investigated the cause of the log.

[Log]: “Stall detected at 10.301999999999927 for 1.1729998588562012 seconds.”
[Log]: “Seeking forward 0.1 seconds to break stall.”
[Log]: “(all): seeked: buffered seek: presentationTime=10.401999999999926”

We checked the shaka-player.compiled.js, and player judged as "stall" and output log because the this.mediaElement.currentTime has not update on playing. We checked an error event from mediaElement when issue occurred, but event did not occurred. Also, mediaElement_.paused was false after occurred issue too.

What is the cause of the behavior of mediaElement_ as described above?

yukihiro-m-play commented 3 years ago

We will give you the encoded pre-packaged MP4 and the packaged Widevine content.

Content: the encoded pre-packaged MP4 the packaged Widevine content

This Widevine content can be played on CDM v14 player, but Shaka Player Embedded freezes in 10 seconds. We Execute packaging command always the following, but some content is problematic and some is not. Therefore, We guess that there is a problem with the encoded MP4.

Packaging command:

edashpackager input=${track_src},stream=${track_type},output=${output} --profile ${profile}  --fragment_duration 1 --segment_duration 1 --enable_fixed_key_encryption --key_id ${key_id} --key ${key} --pssh ${pssh} --generate_dash_if_iop_compliant_mpd --mpd_output ${mpd}

Packager Version: 74951e3

Is there any problem with the MP4?

yukihiro-m-play commented 3 years ago

Is there any missing information in the issue description? This issue occurs with particular service’s all of the content and client will not be able to provide the service, so please check immediately.

Also, can this issue fix by the player's change?

yukihiro-m-play commented 3 years ago

Could you tell us about the status of issue's inspection?

TheModMaker commented 3 years ago

Sorry, I'm not really working on this project right now as other projects have a higher priority. Also, today is a company day off. I'll look into it on Monday. If you use the "dev" CDM, what logs are you seeing? Do you see any CDM logs for missing keys? Stalling after 10 seconds seems like that is after the clear lead. Can you try your content on the v2.5.16 Shaka demo? Does it work on the latest Shaka demo?

yukihiro-m-play commented 3 years ago

Thank you for your answer. We will check log ande demo and answer your question.

yukihiro-m-play commented 3 years ago

If you use the "dev" CDM, what logs are you seeing? Do you see any CDM logs for missing keys?

Below is the log when playing using "dev" CDM in the ShakaPlayer Embedded sample project. We couldn't see any logs about missing keys.

sample_project_dev_CDM.log

TheModMaker commented 3 years ago

Were you able to test on the Shaka Player demo? Could you also provide a license server URL? The segments seem fine, but not being able to play makes it hard to debug.

yukihiro-m-play commented 3 years ago

We confirmed it on the Shaka Player demo page.

When We played the above mpd with the latest Shaka demo, the following error occurred at 10 seconds. A similar error occurred in v2.5.16 Shaka demo.

Shaka Error MEDIA.VIDEO_ERROR (3,,PIPELINE_ERROR_DECODE: Failed to send audio packet for decoding: {timestamp=10026666 duration=21333 size=267 is_key_frame=1 encrypted=0})

mpd URL:

https://tsg01.uliza.jp/ulizahtml5/content/issue210/dcod.mpd

license server URL:

https://tsg02.p.uliza.jp/ulizasp/dash_api/customer01/rights_issuer_test.php?pssh=AAAAW3Bzc2gAAAAA7e%2BLqXnWSs6jyCfc1R0h7QAAADsIARIQQNDa0Kz7m%2BknpQMkJ9yUwBoMc2tpbGx1cHZpZGVvIg5zYW1wbGVfZXBpc29kZSoFU0RfSEQyAA%3D%3D&streamid=sample_episode&
joeyparrish commented 3 years ago

If it fails at the same position in both browsers and native, it sounds to me like this is likely to be an issue with the encoding of the content. It does not appear to be specific to this project.

yukihiro-m-play commented 3 years ago

I'm sorry. The result on the Shaka Player demo page was incorrect because I incorrect the license proxy server's setting.

With the correct settings, both latest and v2.5.16 played fine. The ShakaPlayer Embedded app will freeze in 10 seconds still.

yukihiro-m-play commented 3 years ago

Please investigate as there may be a problem specific to the project because the playback result of the Shaka Player demo page changed.

yukihiro-m-play commented 3 years ago

I recognize that v1.1 is the release of Q2 (April-June 2021). Is my understanding correct? In that case, we may not be able to provide the service. This is because support for CDM Player v14.4 invalidate in June, so even if you release it in June, We can not be supported in time. Could you fix this issue as soon as possible?

TheModMaker commented 3 years ago

I don't have a timeline for v1.1. I've figured out the problem and it is with the CDM adapter. I'm working on the fix.

yukihiro-m-play commented 3 years ago

Thank you for your rapid response. We look forward to your fix.

TheModMaker commented 3 years ago

I just pushed an update to the prebuilt_cdm repo; please try again with the latest master from there (note it is still the same CDM version, just an adapter change).

yukihiro-m-play commented 3 years ago

Thank you for your fix.

We confirmed that the issue fixed. After updating prebuilt_cdm and rebuilding the ShakaPlayer Embedded, player was able to play the issue's content without any problems.