Skip to content
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

Shaka Packager failing with Negative presentation timestamp (-129) is not supported error #1265

Open
Bharanidharan-C opened this issue Sep 19, 2023 · 4 comments
Assignees

Comments

@Bharanidharan-C
Copy link

Bharanidharan-C commented Sep 19, 2023

Hi Team,

We are seeing following error when we try to package the media to mpeg-dash. any suggestions how to fix this in shaka packager command?

[0912/202000:ERROR:demuxer.cc(356)] Failed to process sample 512 11 (MUXER_FAILURE): Unsupported negative pts when there is an offset between pts and dts.
[0912/202000:ERROR:mp4_muxer.cc(351)] Negative presentation timestamp (-129) is not supported when there is an offset between presentation timestamp and decoding timestamp (-1600).”

@xavierlaffargue
Copy link

xavierlaffargue commented Sep 19, 2023 via email

@Bharanidharan-C
Copy link
Author

Bharanidharan-C commented Sep 19, 2023

@xavierlaffargue

Thanks for your reply. Following is the sample command we are running.
More details about the media is .

  1. we are encoding the media to 8 different bitrates
  2. and passing it to shaka (version: 2.5.0) with widevine encryption using following command and get the error mentioned from https://github.com/shaka-project/shaka-packager/blob/main/packager/media/formats/mp4/mp4_muxer.cc#L363

I am not able to share the media due to some restrictions. But below is the media details while analyzing the success vs failed media from ffprobe.
The failed media in shaka packager has different pts and dts but success media has same pts and dts in media info.

When checked with encoder, looks like this difference is pts and dts offset is expected. is there anyway we can handle this in shaka packager command?

image

Shaka Packager command:

E:\packager-win.exe in=E:\Cache\SAMPLE-105-VID-WO-DRM_192845893526_mp4_video_1920x1080_5000000_primary_audio_eng_7.mp4,stream=audio,init_segment=e:\Working\wuttvrer.dho\out_audio_init.mp4,segment_template=e:\Working\wuttvrer.dho\out_audio_$Number$.m4s in=E:\Cache\SAMPLE-105-VID-WO-DRM_192845893526_mp4_video_1920x1080_5000000_primary_audio_eng_7.mp4,stream=video,init_segment=e:\Working\wuttvrer.dho\out_video_0_init.mp4,segment_template=e:\Working\wuttvrer.dho\out_video_0_$Number$.m4s in=E:\Cache\SAMPLE-105-VID-WO-DRM_192845893520_mp4_video_416x234_168000_primary_audio_eng_1.mp4,stream=video,init_segment=e:\Working\wuttvrer.dho\out_video_1_init.mp4,segment_template=e:\Working\wuttvrer.dho\out_video_1_$Number$.m4s in=E:\Cache\SAMPLE-105-VID-WO-DRM_192845893525_mp4_video_1280x720_2432000_primary_audio_eng_6.mp4,stream=video,init_segment=e:\Working\wuttvrer.dho\out_video_2_init.mp4,segment_template=e:\Working\wuttvrer.dho\out_video_2_$Number$.m4s in=E:\Cache\SAMPLE-105-VID-WO-DRM_192845893524_mp4_video_1280x720_1800000_primary_audio_eng_5.mp4,stream=video,init_segment=e:\Working\wuttvrer.dho\out_video_4_init.mp4,segment_template=e:\Working\wuttvrer.dho\out_video_4_$Number$.m4s in=E:\Cache\SAMPLE-105-VID-WO-DRM_192845893523_mp4_video_960x540_1200000_primary_audio_eng_4.mp4,stream=video,init_segment=e:\Working\wuttvrer.dho\out_video_5_init.mp4,segment_template=e:\Working\wuttvrer.dho\out_video_5_$Number$.m4s in=E:\Cache\SAMPLE-105-VID-WO-DRM_192845893527_mp4_video_1920x1080_8000000_primary_audio_eng_8.mp4,stream=video,init_segment=e:\Working\wuttvrer.dho\out_video_6_init.mp4,segment_template=e:\Working\wuttvrer.dho\out_video_6_$Number$.m4s in=E:\Cache\SAMPLE-105-VID-WO-DRM_192845893522_mp4_video_640x360_568000_primary_audio_eng_3.mp4,stream=video,init_segment=e:\Working\wuttvrer.dho\out_video_7_init.mp4,segment_template=e:\Working\wuttvrer.dho\out_video_7_$Number$.m4s in=E:\Cache\SAMPLE-105-VID-WO-DRM_192845893521_mp4_video_480x270_400000_primary_audio_eng_2.mp4,stream=video,init_segment=e:\Working\wuttvrer.dho\out_video_8_init.mp4,segment_template=e:\Working\wuttvrer.dho\out_video_8_$Number$.m4s in=E:\Cache\SAMPLE-105-VID-WO-DRM_192845893530_vtt_eng_10.vtt,stream=text,language=en,init_segment=e:\Working\wuttvrer.dho\out_text_init.mp4,segment_template=e:\Working\wuttvrer.dho\out_text_3_$Number$.m4s --enable_widevine_encryption --key_server_url https://xx/yy --content_id xx --signer cwtv --aes_signing_key xx --aes_signing_iv xx --protection_systems Widevine --ad_cues 507;911;1588;2011;2405 --generate_static_live_mpd --mpd_output e:\Working\wuttvrer.dho\123-shaka-wv-VTT-drm.mpd`

@samraj-carton
Copy link

Packager command is added with the parameter --transport_stream_timestamp_offset_ms 129 --mp4_reset_initial_composition_offset_to_zero and it seems to be not resolving this.

@cosmin
Copy link
Collaborator

cosmin commented May 9, 2024

@Bharanidharan-C can you reproduce this with latest version 3.1.0?

@cosmin cosmin self-assigned this May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants