shaka-packager icon indicating copy to clipboard operation
shaka-packager copied to clipboard

double precision numbers rounding off in ad cues

Open reckless-sergio opened this issue 2 years ago • 2 comments

System info

Operating System: <Windows 11> Shaka Packager Version: <v2.6.1-634af65-release>

Issue and steps to reproduce the problem

Document says --adcues support double precison. But, when I am actually using double precision values,I can see that hls/dash manifest segments are not accurate. The durations in the manifest are rounded to the nearest integer.

am I missing anything here?

Packager Command: "in=2200k.mp4,stream=audio,init_segment=drm/mpd/audio/init.mp4,segment_template=drm/mpd/audio/$Number$.m4s,drm_label=gen" "in=650k.mp4,stream=video,init_segment=drm/mpd/650/init.mp4,segment_template=drm/mpd/650/$Number$.m4s,drm_label=gen" "in=800k.mp4,stream=video,init_segment=drm/mpd/800/init.mp4,segment_template=drm/mpd/800/$Number$.m4s,drm_label=gen" "in=1600k.mp4,stream=video,init_segment=drm/mpd/1600/init.mp4,segment_template=drm/mpd/1600/$Number$.m4s,drm_label=gen" "in=2200k.mp4,stream=video,init_segment=drm/mpd/2200/init.mp4,segment_template=drm/mpd/2200/$Number$.m4s,drm_label=gen" --clear--enable_raw_key_encryption --keys label=gen:key_id={some_key_id}:key={somekey}} --protection_systems Widevine,PlayReady --generate_static_live_mpd --mpd_output drm/mpd/h264.mpd --ad_cues 742.16;1131.50;1435.63;1840.56;2208.30

"in=2200k.mp4,stream=audio,segment_template=drm/fps/audio/$Number$.aac,playlist_name=drm/fps/audio/audio.m3u8,drm_label=gen" "in=650k.mp4,stream=video,segment_template=drm/fps/650/$Number$.ts,playlist_name=drm/fps/650/650.m3u8,drm_label=gen" "in=800k.mp4,stream=video,segment_template=drm/fps/800/$Number$.ts,playlist_name=drm/fps/800/800.m3u8,drm_label=gen" "in=1600k.mp4,stream=video,segment_template=drm/fps/1600/$Number$.ts,playlist_name=drm/fps/1600/1600.m3u8,drm_label=gen" "in=2200k.mp4,stream=video,segment_template=drm/fps/2200/$Number$.ts,playlist_name=drm/fps/2200/2200.m3u8,drm_label=gen" --keys label=gen:key_id={some_key_id}:key={somekey}:iv=58e2771cfd1b42a2a258c0b2e3634ebe --protection_systems FairPlay --hls_master_playlist_output drm/fps/master.m3u8 --hls_key_uri skd://{some_key_id} --ad_cues 742.16;1131.50;1435.63;1840.56;2208.30

What is the expected result? Periods in dash manifest should have duration on period more accurate

What happens instead? The decimal places are getting rounded off

#EXTINF:6.000, 188.ts #EXTINF:5.000, 189.ts #EXT-X-PLACEMENT-OPPORTUNITY #EXTINF:6.000, 190.ts #EXTINF:6.000, 191.ts

reckless-sergio avatar Oct 11 '22 19:10 reckless-sergio

hello sergio, can you upload your manifest h264.mpd

dradenvandewind avatar Nov 10 '22 11:11 dradenvandewind

@reckless-sergio, you mention issues with your MPD, but then show an example of a problem in your HLS playlist instead. Can you show us the issue in the MPD, as well?

Although the boundaries don't map to the ad times you put on the command line, what we can't see now is your segment size or GOP size. Segments can't be broken for ad placement except on key frames (GOP boundaries). This is controlled by how the content was encoded, so we can't do anything to change the GOP or segment boundaries during packaging.

Does this help? If not, can you share some details about how your content was encoded? (GOP size and framerate in particular)

joeyparrish avatar Nov 10 '22 16:11 joeyparrish

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.

github-actions[bot] avatar May 08 '24 19:05 github-actions[bot]