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

Package DASH and HLS subtitles. #997

Closed elialgranti closed 5 months ago

elialgranti commented 3 years ago

System info

Operating System: Ubuntu 20.04 Shaka Packager Version: v2.6.0-5181ea1-release

Issue and steps to reproduce the problem

Packager Command:

packager \
'in=SUBTITLES_el.vtt,stream=text,segment_template=subtitles_el/segment_$Number$.vtt,playlist_name=subtitles_el/playlist.m3u8,hls_group_id=text,hls_name=Ελληνικά,language=el,hls_only=1' \
'in=SUBTITLES_el.vtt,stream=text,output=subtitles_el/subtitle.vtt,language=el,dash_only=1' \
--hls_master_playlist_output subtitle.m3u8 --preserved_segments_outside_live_window 0 --hls_playlist_type VOD \
--mpd_output subtitle.mpd --generate_static_live_mpd

Note the dash_only=1 and hls_only=1 flags

What is the expected result? Packager generates subtitles for both DASH and HLS

What happens instead? Packager errors with:

[1015/134147:ERROR:packager_main.cc(549)] Failed to initialize packager: 3 (INVALID_ARGUMENT): Inconsistent stream descriptor specification: segment_template should be specified for none or all stream descriptors.

This is related to closed issue #722

sr1990 commented 2 years ago

Hi @elialgranti, check out the tutorial page at https://google.github.io/shaka-packager/html/tutorials/dash.html : section Output DASH + HLS with dash_only and hls_only options.

Try out the following change: 'in=SUBTITLES_el.vtt,stream=text,init_segment=subtitle_el/init.mp4,segment_template=subtitles_el/segment_$Number$.m4s,language=el,dash_only=1' \

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