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

Only First Captions Appear in HLS Player #1069

Closed mazz closed 2 years ago

mazz commented 2 years ago

System info

mac os montery shaka-packager version v2.6.1-634af65-release

Issue and steps to reproduce the problem

Packager Command:

~/bin/packager-osx-x64 \
  'in=input-360.mp4,stream=audio,segment_template=audio/$Number$.aac,playlist_name=audio/main.m3u8,hls_group_id=audio,hls_name=ENGLISH' \
  'in=en.vtt,stream=text,segment_template=text/$Number$.en.vtt,playlist_name=text/en.m3u8,hls_group_id=text,hls_name=ENGLISH' \
  'in=ru.vtt,stream=text,segment_template=text/$Number$.ru.vtt,playlist_name=text/ru.m3u8,hls_group_id=text,hls_name=RUSSIAN' \
  'in=input-360.mp4,stream=video,segment_template=h264_360p/$Number$.ts,playlist_name=h264_360p/main.m3u8,iframe_playlist_name=h264_360p/iframe.m3u8' \
  'in=input-1080.mp4,stream=video,segment_template=h264_1080p/$Number$.ts,playlist_name=h264_1080p/main.m3u8,iframe_playlist_name=h264_1080p/iframe.m3u8' \
  --hls_master_playlist_output h264_master.m3u8

Confirm that en and ru segmented vtt files are generated.

Confirm that ENGLISH and RUSSIAN are generated in master m3u8 file:

...

#EXT-X-MEDIA:TYPE=SUBTITLES,URI="text/ru.m3u8",GROUP-ID="text",NAME="RUSSIAN",AUTOSELECT=YES
#EXT-X-MEDIA:TYPE=SUBTITLES,URI="text/en.m3u8",GROUP-ID="text",NAME="ENGLISH"

...

Extra steps to reproduce the problem? I create a second entry for ru but "RUSSIAN" does not appear in Chrome HLS playback plug-in

(When ENGLISH subtitles/caption are selection, they appear as expected)

What is the expected result?

Both ENGLISH and RUSSIAN appear in caption list

What happens instead?

Just ENGLISH appears.

joeyparrish commented 2 years ago

Do both language options appear in Shaka Player? https://shaka-player-demo.appspot.com/demo/#panel=CUSTOM%20CONTENT

mazz commented 2 years ago

it shows one, and calls it "undetermined" when I choose it, it will show the ru captions. So I must be misconfiguring things, do you have any suggestions?

Screen Shot 2022-06-28 at 6 48 15 PM

When I choose English(the base language) the English captions do not appear.

Screen Shot 2022-06-28 at 6 50 42 PM
mazz commented 2 years ago

I found a fix, I needed to insert language=<isolang> for each row. Thanks @joeyparrish for directing to me the online shaka player.

This issue helped me: https://github.com/shaka-project/shaka-packager/issues/473

~/bin/packager-osx-x64 \
  'in=input-360.mp4,stream=audio,segment_template=audio/$Number$.aac,playlist_name=audio/main.m3u8,hls_group_id=audio,hls_name=ENGLISH' \
  'in=en.vtt,stream=text,segment_template=text/$Number$.en.vtt,playlist_name=text/en.m3u8,hls_group_id=text,language=en,hls_name=ENGLISH' \
  'in=es.vtt,stream=text,segment_template=text/$Number$.es.vtt,playlist_name=text/es.m3u8,hls_group_id=text,language=es,hls_name=SPANISH' \
  'in=input-360.mp4,stream=video,segment_template=h264_360p/$Number$.ts,playlist_name=h264_360p/main.m3u8,iframe_playlist_name=h264_360p/iframe.m3u8' \
  'in=input-720.mp4,stream=video,segment_template=h264_720p/$Number$.ts,playlist_name=h264_720p/main.m3u8,iframe_playlist_name=h264_720p/iframe.m3u8' \
  --hls_master_playlist_output h264_master.m3u8