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.96k stars 506 forks source link

Video is not getting played in Safari #1059

Closed KVPasupuleti closed 4 months ago

KVPasupuleti commented 2 years ago

System info

Operating System: macOS Big Sur, mac M1 Shaka Packager Version: 3fd538a587-release

Issue and steps to reproduce the problem

We have generated a HLS manifest using Shaka packager. It played fine in Chrome, but is behaving weirdly in Mac Safari.

These are the player specific behaviours:

These are the data points I observed.

  1. The master manifest is fetched twice where the second fetch is getting failed.
  2. The video manifest is fetched fine.
  3. The audio manifest is not getting fetched.
  4. Unlike in Chrome, the video segments are requested in multiple Byte-sized requests with the Range header added to the segment requests.
  5. Some video segments are getting failed and retried twice or thrice.

Packager Command:

packager \
 'in=/home/ib-developer/Desktop/repositories/LearningPlatform/personalization_video_generation_utils/shaka/long_break/part_1.mp4,stream=audio,segment_template=/home/ib-developer/Desktop/repositories/LearningPlatform/personalization_video_generation_utils/shaka/v13_input/long_break/part_1/video128kbps_aac_$Number%09d$.ts,playlist_name=/home/ib-developer/Desktop/repositories/LearningPlatform/personalization_video_generation_utils/shaka/v13_input/long_break/part_1/video128kbps_aac.m3u8,hls_group_id=audio,hls_name=ENGLISH' \
 'in=/home/ib-developer/Desktop/repositories/LearningPlatform/personalization_video_generation_utils/shaka/long_break/part_1.mp4,stream=video,segment_template=/home/ib-developer/Desktop/repositories/LearningPlatform/personalization_video_generation_utils/shaka/v13_input/long_break/part_1/video720_cmaf_$Number%09d$.ts,playlist_name=/home/ib-developer/Desktop/repositories/LearningPlatform/personalization_video_generation_utils/shaka/v13_input/long_break/part_1/video720_cmaf.m3u8,iframe_playlist_name=/home/ib-developer/Desktop/repositories/LearningPlatform/personalization_video_generation_utils/shaka/v13_input/long_break/part_1/video720_iframe.m3u8' \
--hls_master_playlist_output /home/ib-developer/Desktop/repositories/LearningPlatform/personalization_video_generation_utils/shaka/v13_input/long_break/part_1/video.m3u8 --segment_duration 3 --fragment_duration 3 --segment_template_constant_duration

Extra steps to reproduce the problem? (1) For testing in Bitmovin player - Open this link (2) For testing in Shaka player - Open this link

What is the expected result?

The video should play fine along with audio without any additional buffering.

What happens instead?

In Safari,

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

Attachment sent in mail from pasupuletikrishnavamsi@gmail.com
KVPasupuleti commented 2 years ago

I think I have figured it out. I have added discontinuities with a different codec string.

If I use the segments with the same codec strings, it's working fine.

cosmin commented 4 months ago

There seems to be some command line parsing issue because the master playlist contains the following

URI="iframe.m3u8 --segment_template_constant_duration"
cosmin commented 4 months ago

I cannot reproduce the m3u8 file contents with the command line you supplied.

github-actions[bot] commented 4 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.