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

Playback issue with cbcs encrypted content in some Samsung smart TVs #1252

Closed ashiskumarsahu closed 6 months ago

ashiskumarsahu commented 1 year ago

System info

Operating System: Tizen OS 6.5 Shaka Packager Version: Latest

Issue and steps to reproduce the problem

I have packed a cmaf content for multi DRM using cbcs mode. However my samsung tv does not support cbcs mode of encryption. I tried to chnage the command and packed with CENC but the output fails in apple systems. I want multi DRM(widevine/playready/fairplay) with cmaf format(to reduce the output size). Packager Command: CBCS version shakapackager \ in=audio.mp4,stream=audio,init_segment=output/audio/aac/init.mp4,playlist_name=output/audio/aac/steam.m3u8,segment_template='output/audio/aac/$Number$.m4s',hls_group_id=audio,hls_name='ENGLISH',drm_label=AUDIO \ in=240out.mp4,stream=video,init_segment=output/video/240/init.mp4,playlist_name=output/video/240/stream.m3u8,iframe_playlist_name=output/video/240/iframe.m3u8,segmenttemplate='output/video/240/segment$Number$.m4s',drm_label=SD \ in=360out.mp4,stream=video,init_segment=output/video/360/init.mp4,playlist_name=output/video/360/stream.m3u8,iframe_playlist_name=output/video/360/iframe.m3u8,segmenttemplate='output/video/360/segment$Number$.m4s',drm_label=SD \ --segment_duration 10 \ --protection_systems Widevine,PlayReady,FairPlay \ --protection_scheme cbcs --enable_raw_key_encryption \ --keys label=AUDIO:key_id=da1be96c458fb76a801418a8546b0ba6:key=af499eb4a2984d1aac09bc7e89c3ee18:iv=93b0a4dabcf667d2695ceaa512ce124f,label=SD:key_id=da1be96c458fb76a801418a8546b0ba6:key=af499eb4a2984d1aac09bc7e89c3ee18:iv=93b0a4dabcf667d2695ceaa512ce124f --hls_key_uri skd://demo_token \ --generate_static_live_mpd --mpd_output output/stream.mpd --hls_master_playlist_output output/master.m3u8

CENC version shakapackager \ in=audio.mp4,stream=audio,init_segment=output/audio/aac/init.mp4,playlist_name=output/audio/aac/steam.m3u8,segment_template='output/audio/aac/$Number$.m4s',hls_group_id=audio,hls_name='ENGLISH',drm_label=AUDIO \ in=240out.mp4,stream=video,init_segment=output/video/240/init.mp4,playlist_name=output/video/240/stream.m3u8,iframe_playlist_name=output/video/240/iframe.m3u8,segmenttemplate='output/video/240/segment$Number$.m4s',drm_label=SD \ in=360out.mp4,stream=video,init_segment=output/video/360/init.mp4,playlist_name=output/video/360/stream.m3u8,iframe_playlist_name=output/video/360/iframe.m3u8,segmenttemplate='output/video/360/segment$Number$.m4s',drm_label=SD \ --segment_duration 10 \ --protection_systems Widevine,PlayReady,FairPlay \ --protection_scheme cbcs --enable_raw_key_encryption \ --keys label=AUDIO:key_id=da1be96c458fb76a801418a8546b0ba6:key=af499eb4a2984d1aac09bc7e89c3ee18:iv=93b0a4dabcf667d2695ceaa512ce124f,label=SD:key_id=da1be96c458fb76a801418a8546b0ba6:key=af499eb4a2984d1aac09bc7e89c3ee18:iv=93b0a4dabcf667d2695ceaa512ce124f --hls_key_uri skd://demo_token \ --generate_static_live_mpd --mpd_output output/stream.mpd --hls_master_playlist_output output/master.m3u8

Extra steps to reproduce the problem? (1) Samsung UA43AUE65AKXXL - 2022 Model (CS Tv) - Here the video is flickering. CBCS not supported. CENC playing fine. (2) Samsung UA43BU8000KLXL - 22TV_BASIC1 model group - Tizen 6.5 (Top Wall Tv of Platform) - Here video is playing fine. Both CBCS and CENC playing fine.

What is the expected result? The CMAF output should play in all devices with widevine, playready and fairplay licenses. Please share any alternative encryption scheme that is supported in all devices even in legacy devices.

What happens instead? If I am using CBCS its not playing in samsung tv but playing fine in all other platform and devices. If I use CENC it playing fine in widevine and playrady based systems but failing with fairplay.

<Please attach the input files or email to shaka-packager-issues@google.com.>

cosmin commented 6 months ago

There is no encryption scheme that is supported in all devices. Newer Samsung devices (2022+) ought to support CBCS, but on older devices it will require CENC for compatibility. If you really need to support all devices you'll need to provide both CBCS and CENC streams at the moment, or drop support for legacy devices if you can only provide one.