shaka-project / shaka-packager

A media packaging and development framework for VOD and Live DASH and HLS applications, supporting Common Encryption for Widevine and other DRM Systems.
https://shaka-project.github.io/shaka-packager/
Other
1.97k stars 507 forks source link

DRM protected (Widevine) live stream freezes briefly when switching between different video bitrates #1136

Closed hariszukanovic closed 5 months ago

hariszukanovic commented 1 year ago

System info

Operating System: Debian 11.5 Shaka Packager Version: v2.6.1-634af65-release

Issue and steps to reproduce the problem

Packager Command: shaka-packager \ "input=udp://239.100.100.53:6000?reuse=1&interface=0.0.0.0&timeout=5000000,stream=video,stream_selector=0,bandwidth=500000,init_segment=variants/dash/cenc/v_r360p/init_v_r360p.m4s,segment_template=variants/dash/cenc/v_r360p/chunk_vr360p\$Number\$.m4s,output_format=mp4" \ "input=udp://239.100.100.53:6000?reuse=1&interface=0.0.0.0&timeout=5000000,stream=video,stream_selector=1,bandwidth=1800000,init_segment=variants/dash/cenc/v_r720p1/init_v_r720p1.m4s,segment_template=variants/dash/cenc/v_r720p1/chunk_vr720p1\$Number\$.m4s,output_format=mp4" \ "input=udp://239.100.100.53:6000?reuse=1&interface=0.0.0.0&timeout=5000000,stream=video,stream_selector=2,bandwidth=3800000,init_segment=variants/dash/cenc/v_r720p2/init_v_r720p2.m4s,segment_template=variants/dash/cenc/v_r720p2/chunk_vr720p2\$Number\$.m4s,output_format=mp4" \ "input=udp://239.100.100.53:6000?reuse=1&interface=0.0.0.0&timeout=5000000,stream=video,stream_selector=3,bandwidth=5000000,init_segment=variants/dash/cenc/v_r1080p/init_v_r1080p.m4s,segment_template=variants/dash/cenc/v_r1080p/chunk_vr1080p\$Number\$.m4s,output_format=mp4" \ "input=udp://239.100.100.53:6000?reuse=1&interface=0.0.0.0&timeout=5000000,stream=audio,language=eng,stream_selector=4,bandwidth=64000,init_segment=variants/dash/cenc/a_eng/init_a_eng.m4s,segment_template=variants/dash/cenc/a_eng/chunk_aeng\$Number\$.m4s,output_format=mp4" \ --single_segment=false \ --enable_raw_key_encryption \ --keys label=AUDIO:key_id=my_key_id:key=my_key,label=SD:key_id=my_key_id:key=my_key,label=HD:key_id=my_key_id:key=my_key,label=UHD:key_id=my_key_id:key=my_key \ --protection_systems Widevine,Playready \ --crypto_period_duration 0 \ --clear_lead 0 \ --segment_duration 10 \ --generate_dash_if_iop_compliant_mpd=1 \ --minimum_update_period 10 \ --time_shift_buffer_depth 60 \ --mpd_output cenc_manifest.mpd \ --profile live

What is the expected result? DRM protected (Widevine) live stream should play well using ExoPlayer

What happens instead?

The stream works but freezes briefly when switching between different video bitrates. The freeze seems to last as long as the chunk length, in this case, 10 seconds. The problem is 100% reproducible and present only when the stream is DRM protected! The clear stream does not have this problem. Tested with different Exo Player versions (2.9.6, 2.13, 2.18.1)...

Also, tested exactly the same scenario with shaka packager 1.6.1 (which we also use in some production environments) does not have this problem.

hariszukanovic commented 1 year ago

anyone?

cosmin commented 5 months ago

can you compare the output of 1.6.1 vs latest release in this case and see what might be different. Otherwise we'd probably need an input to reproduce this.

github-actions[bot] commented 5 months ago

Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen in a comment.