Reputation: 83
I am interested to see if I can use HTTP Live Streaming (Apple) to concatenate two DIFFERENT videos? For example, to be able to play a video playlist of, say, video 1 of a commercial and video 2 of a TV program, and use this protocol to enable gapless playback between them so there is no wait in between.
If this is possible, can somebody show me how to form the playlist .m3u8 correctly?
I have tried an example like the following:
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXTINF:10,
commercial-00001.ts
#EXTINF:10,
commercial-00002.ts
#EXTINF:9,
commercial-00003.ts
#EXTINF:7,
commercial-00004.ts
#EXTINF:10,
tv-00001.ts
#EXTINF:10,
tv-00002.ts
#EXTINF:10,
tv-00003.ts
#EXTINF:10,
tv-00004.ts
#EXTINF:10,
tv-00005.ts
#EXTINF:10,
tv-00006.ts
#EXTINF:7,
tv-00007.ts
#EXT-X-ENDLIST
However, the player on iOS just freezes after playing the first video (commercial). The buffer bar just shows that it has buffered to the end of the first video.
Note: My target is iOS, so flash is out of the question, unfortunately :(
Is there a proper way to perform this?
Upvotes: 3
Views: 1125
Reputation: 7645
Unless the segments are being prepared as a single stream, the decoder won't necessarily be able to seamlessly switch between them.
You should introduce a #EXT-X-DISCONTINUITY line before and after the inserted segment. This may lead to a noticeable (but not disruptive) transition in the client, because the video decoder will be reset.
Upvotes: 2