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

Adding alternate video renditions HLS #1259

Open
krzemienski opened this issue Aug 23, 2023 · 0 comments
Open

Adding alternate video renditions HLS #1259

krzemienski opened this issue Aug 23, 2023 · 0 comments
Labels
component: HLS The issue involves HLS output flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this

Comments

@krzemienski
Copy link

Is it possible to package alt video renditions?
context -
https://developer.apple.com/documentation/http-live-streaming/adding-alternate-media-to-a-playlist
https://datatracker.ietf.org/doc/html/rfc8216#section-8.7

hls master example

#EXTM3U
#EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="200kbs",NAME="Angle1",AUTOSELECT=YES,DEFAULT=YES
#EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="200kbs",NAME="Angle2",AUTOSELECT=YES,DEFAULT=NO, URI="Angle2/200kbs/prog_index.m3u8"
#EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="200kbs",NAME="Angle3",AUTOSELECT=YES,DEFAULT=NO, URI="Angle3/200kbs/prog_index.m3u8"


#EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="500kbs",NAME="Angle1",AUTOSELECT=YES,DEFAULT=YES
#EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="500kbs",NAME="Angle2",AUTOSELECT=YES,DEFAULT=NO, URI="Angle2/500kbs/prog_index.m3u8"
#EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="500kbs",NAME="Angle3",AUTOSELECT=YES,DEFAULT=NO, URI="Angle3/500kbs/prog_index.m3u8"


#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",LANGUAGE="en",NAME="English",AUTOSELECT=YES, DEFAULT=YES,URI="eng/prog_index.m3u8"


#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=300000,CODECS="mp4a.40.2,avc1.4d401e", VIDEO="200kbs",AUDIO="aac"
Angle1/200kbs/prog_index.m3u


#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=754857,CODECS="mp4a.40.2,avc1.4d401e", VIDEO="500kbs",AUDIO="aac"
Angle1/500kbs/prog_index.m3u8

given the above should I do something along the lines of? Or would I need to make some modifcations/tweaks to accomplish numerous video renditions

packager \
# 'in=udp://127.0.0.1:40005,stream=audio,init_segment=audio_init.mp4,segment_template=audio_$Time$.m4s,hls_group_id=aac,hls_name=ENGLISH'\
'in=udp://127.0.0.1:60001,stream=video,init_segment=h264_200kbs_init.mp4,segment_template=h264_200kbs_$Time$.m4s,playlist_name=h264_200kbs.m3u8,hls_group_id=,hls_name=Angle1' \
'in=udp://127.0.0.1:60000,stream=video,init_segment=h264_500kbps_init.mp4,segment_template=h264_500kbps_$Time$.m4s,playlist_name=h264_500kbps.m3u8,hls_group_id=500kbps,hls_name=Angle1' \
#   'in=udp://127.0.0.1:50007?,stream=video,init_segment=h264_hls_500kbps_init.mp4,segment_template=h264_hls_500kbps_$Time$.m4s,playlist_name=h264_hls_500kbps.m3u8,hls_group_id=500kbps,hls_name=Angle2' \
#   'in=udp://127.0.0.1:50008?,stream=video,init_segment=h264_hls_200kbs_init.mp4,segment_template=h264_hls_200kbs_$Time$.m4s,playlist_name=h264_hls_200kbs.m3u8,hls_group_id=200kbs,hls_name=Angle2' \
#   'in=udp://127.0.0.1:50009?,stream=video,init_segment=h264_hls_2_500kbps_init.mp4,segment_template=h264_hls_2_500kbps_$Time$.m4s,playlist_name=h264_hls_2_500kbps.m3u8,hls_group_id=500kbps,hls_name=Angle3' \
#  'in=udp://127.0.0.1:51000,stream=video,init_segment=h264_hls_2_200kbs_init.mp4,segment_template=h264_hls_2_200kbs_$Time$.m4s,playlist_name=h264_hls_2_200kbs.m3u8,hls_group_id=200kbs,hls_name=Angle3' \
#   --hls_master_playlist_output master.m3u8 \
#   --fragment_duration 4 \
#   --segment_duration 4 \
#   --time_shift_buffer_depth 30 \
#   --hls_playlist_type LIVE &
@krzemienski krzemienski changed the title Adding alternate video renditions Adding alternate video renditions HLS Aug 23, 2023
@cosmin cosmin added flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this component: HLS The issue involves HLS output labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: HLS The issue involves HLS output flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this
Projects
None yet
Development

No branches or pull requests

2 participants