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 a new stream to m3u8 #254

Open
PyRo1509 opened this issue Jul 23, 2017 · 2 comments
Open

Adding a new stream to m3u8 #254

PyRo1509 opened this issue Jul 23, 2017 · 2 comments
Labels
type: enhancement New feature or request
Milestone

Comments

@PyRo1509
Copy link

When making multiple resolutions serially the m3u8 has to be updated manually.

case: 1080p, 720p, 480p videos are going to be encoded serially
First the 480p and audio is available.
Create TS and m3u8's.

Once the 720P or 1080P version is complete a separate master m3u8 needs to be created and then manually merged.

Adding the same master playlist file to packager should update it rather than overwrite.


Current Behavior:

packager 'input=Audio.mp4,stream=audio,segment_template=audio_$Number%04d$.ts,playlist_name=audio_playlist.m3u8' \
'input=480p.mp4,stream=video,segment_template=480_Video_$Number%04d$.ts,playlist_name=480_playlist.m3u8' \
--hls_master_playlist_output="master_playlist.m3u8"

packager 'input=240p.mp4,stream=video,segment_template=240_Video_$Number%04d$.ts,playlist_name=240_playlist.m3u8' \
--hls_master_playlist_output="master_playlist.m3u8"

master_playlist.m3u8:

#EXTM3U
## Generated with https://github.com/google/shaka-packager version a4c227f-release
#EXT-X-STREAM-INF:BANDWIDTH=768856,CODECS="avc1.640015",RESOLUTION=576x240
240_playlist.m3u8

Requested Result:
master_playlist.m3u8:

#EXTM3U
## Generated with https://github.com/google/shaka-packager version a4c227f-release
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="stream_2",LANGUAGE="en",URI="audio_playlist.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=3087383,CODECS="avc1.64001f,mp4a.40.2",RESOLUTION=1152x480,AUDIO="audio"
480_playlist.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=969977,CODECS="avc1.640015,mp4a.40.2",RESOLUTION=576x240,AUDIO="audio"
240_playlist.m3u8
@kqyang
Copy link
Contributor

kqyang commented Jul 24, 2017

That is an interesting use case. Any reason that you don't do packaging after all streams ready?

@PyRo1509
Copy link
Author

@kqyang It's just a matter of resources available (both CPU & HD). I encode each resolution serially to have something available as soon as possible (Much like youtube). Sometimes it might be a while between new resolutions. This is going to be much more of a problem as I'm starting to add VP9 content.

It requires that the input resolution files be kept around (wasted space on HD). So each new resolution I get I'd have to reprocess the past ones as well.

Currently I just have a script add the new resolutions.

it'd be nice if packager took care of it. Maybe:

packager 'input=240p.mp4,stream=video,segment_template=240_Video_$Number%04d$.ts,playlist_name=240_playlist.m3u8' --add-stream  "master_playlist.m3u8"

@kqyang kqyang added the type: enhancement New feature or request label Jul 24, 2017
@vaage vaage added this to the Backlog milestone Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants