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

generation of independent segements in HLS #564

Closed Jagansivam28 closed 4 years ago

Jagansivam28 commented 5 years ago

System info

Operating System: Ubuntu 18.04> Shaka Packager Version: v2.3.0-5bf8ad5-release

Issue and steps to reproduce the problem

hello , i am new to shaka packager ..i need to generate independent segments In HLS using #EXT-X-INDEPENDENT-SEGMENTS tag (https://tools.ietf.org/html/rfc8216#page-35)(4.3.5.1) .is there anyway to insert these hls tags in shaka packager . thank you !

kqyang commented 5 years ago

Shaka Packager does not insert this tag right now, but it should. We'll look into it.

Jagansivam28 commented 5 years ago

ok thank you

Jagansivam28 commented 5 years ago

can you tell me where to modify the code to use these tag ( #EXT-X-INDEPENDENT-SEGMENTS) in shaka packager ?

kqyang commented 5 years ago

@Jagansivam28 Sure. A quick and dirty solution is to append the tag before this line https://github.com/google/shaka-packager/blob/master/packager/hls/base/master_playlist.cc#L444.

A cleaner solution I think is to add a new argument to MasterPlaylist constructor to indicate whether the streams having independent segments, which can be passed down from earlier pipeline.

Jagansivam28 commented 5 years ago

thank you ! i tried what you said . i modify the code . now i am able to insert the tag in master playlist.but still the segments are dependent. can u help me ?

kqyang commented 5 years ago

@Jagansivam28 Shaka Packager segments at key frame by default, i.e. in https://google.github.io/shaka-packager/html/documentation.html#chunking-options, --segment_sap_aligned and --fragment_sap_aligned are enabled by default. For a closed-GOP stream, the generated segments are independent.

Can you clarify why you think the segments are dependent?

Jagansivam28 commented 5 years ago

well ...i want to replace one of the .ts files ( hls segments) with my own generated .ts file. so the segments should be independent to play the video without any interruptions .if the segments are dependent it won't work. this is my need can you help me ?

Jagansivam28 commented 5 years ago

it is possible to replace the .ts files ?

kqyang commented 5 years ago

So you generate the segments yourself and want to use Shaka Packager to generate HLS playlists only? No, we do not support this use case right now. You can try to integrate Shaka Packager library and use https://github.com/google/shaka-packager/blob/master/packager/hls/base/simple_hls_notifier.h directly to generate the playlists.

the segments should be independent to play the video without any interruptions .if the segments are dependent it won't work. this is my need can you help me ?

The segments generated by Shaka Packager should be independent. Let's know if it is not. We will look into it if that is the case.

cbrown30309 commented 5 years ago

Has the #EXT-X-INDEPENDENT-SEGMENTS issue been resolved?

kqyang commented 5 years ago

@cbrown30309 Not yet. It should be safe to just insert the tag as Shaka Packager generates independent segments by default.

JanSunavec commented 4 years ago

There is no support for independent segmentations. Only when you use ts files. For m4s shaka packager use ext-x-map and it's not possible combine it with independent segmentation tag.