-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add support for single file TS for HLS (#934)
This is based on comments at #891. The muxer is deciding whether to write to a single file or a segment file based on the configuration. Example: ``` ../packager 'in=TOS.ts,stream=video,output=tos_video.ts,playlist_name=tos_video.m3u8' \ 'in=TOS.ts,stream=audio,output=tos_audio.ts,playlist_name=tos_audio.m3u8' \ --hls_master_playlist_output tos.m3u8 ``` Tested the content using Exoplayer. --------- Co-authored-by: Cosmin Stejerean <[email protected]>
- Loading branch information
Showing
13 changed files
with
186 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packager/app/test/testdata/hls-single-segment-ts/bear-640x360-audio.m3u8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#EXTM3U | ||
#EXT-X-VERSION:6 | ||
## Generated with https://github.com/shaka-project/shaka-packager version <tag>-<hash>-<test> | ||
#EXT-X-TARGETDURATION:2 | ||
#EXT-X-PLAYLIST-TYPE:VOD | ||
#EXTINF:0.975, | ||
#EXT-X-BYTERANGE:23312@0 | ||
bear-640x360-audio.ts | ||
#EXTINF:0.998, | ||
#EXT-X-BYTERANGE:24252 | ||
bear-640x360-audio.ts | ||
#EXTINF:0.789, | ||
#EXT-X-BYTERANGE:17296 | ||
bear-640x360-audio.ts | ||
#EXT-X-ENDLIST |
Binary file added
BIN
+63.3 KB
packager/app/test/testdata/hls-single-segment-ts/bear-640x360-audio.ts
Binary file not shown.
16 changes: 16 additions & 0 deletions
16
packager/app/test/testdata/hls-single-segment-ts/bear-640x360-video-iframe.m3u8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#EXTM3U | ||
#EXT-X-VERSION:6 | ||
## Generated with https://github.com/shaka-project/shaka-packager version <tag>-<hash>-<test> | ||
#EXT-X-TARGETDURATION:2 | ||
#EXT-X-PLAYLIST-TYPE:VOD | ||
#EXT-X-I-FRAMES-ONLY | ||
#EXTINF:1.001, | ||
#EXT-X-BYTERANGE:15604@376 | ||
bear-640x360-video.ts | ||
#EXTINF:1.001, | ||
#EXT-X-BYTERANGE:18236@105656 | ||
bear-640x360-video.ts | ||
#EXTINF:0.734, | ||
#EXT-X-BYTERANGE:19928@233684 | ||
bear-640x360-video.ts | ||
#EXT-X-ENDLIST |
15 changes: 15 additions & 0 deletions
15
packager/app/test/testdata/hls-single-segment-ts/bear-640x360-video.m3u8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#EXTM3U | ||
#EXT-X-VERSION:6 | ||
## Generated with https://github.com/shaka-project/shaka-packager version <tag>-<hash>-<test> | ||
#EXT-X-TARGETDURATION:2 | ||
#EXT-X-PLAYLIST-TYPE:VOD | ||
#EXTINF:1.001, | ||
#EXT-X-BYTERANGE:105280@0 | ||
bear-640x360-video.ts | ||
#EXTINF:1.001, | ||
#EXT-X-BYTERANGE:128028 | ||
bear-640x360-video.ts | ||
#EXTINF:0.734, | ||
#EXT-X-BYTERANGE:84600 | ||
bear-640x360-video.ts | ||
#EXT-X-ENDLIST |
Binary file added
BIN
+310 KB
packager/app/test/testdata/hls-single-segment-ts/bear-640x360-video.ts
Binary file not shown.
11 changes: 11 additions & 0 deletions
11
packager/app/test/testdata/hls-single-segment-ts/output.m3u8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#EXTM3U | ||
## Generated with https://github.com/shaka-project/shaka-packager version <tag>-<hash>-<test> | ||
|
||
#EXT-X-INDEPENDENT-SEGMENTS | ||
|
||
#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" | ||
|
||
#EXT-X-STREAM-INF:BANDWIDTH=1217520,AVERAGE-BANDWIDTH=1117320,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE | ||
bear-640x360-video.m3u8 | ||
|
||
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=217180,AVERAGE-BANDWIDTH=157213,CODECS="avc1.64001e",RESOLUTION=640x360,CLOSED-CAPTIONS=NONE,URI="bear-640x360-video-iframe.m3u8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.