HTTP Live Streaming MPEG TS segment

2019-06-24 23:59发布

I'm using FFMPEG and a free segmenter (Carson Mcdonald's) to produce my ts segments which i later save to a web server and play with Quicktime by playing the .m3u8

If I have segments 1,2,3,4 and another stream with segments 1,2,3,4 and would like to interleave them what should I do. If i do as follows: 1,2, other stream's 3, 4 It works fine. However, If i want to do as follows: 1,2, other stream's 4, 4 it doesn't work.

In other words the segment to be added must have the same number as the one I'm replacing. Why is that? Does it have to do with PCR? I would like to be able to interleave any segment anywhere.. How can I do that?

Thank you,

The M3U8 file is

#EXTM3U 
#EXT-X-TARGETDURATION:10 
#EXT-X-MEDIA-SEQUENCE:21 
#EXTINF:10, sample_ep_386k-00021.ts 
#EXTINF:10, media_2.ts 
#EXTINF:10, sample_ep_386k-00023.ts

2条回答
萌系小妹纸
2楼-- · 2019-06-25 00:30

Have you modified the .M3U8 playlist (index) file to point to the two 4 files? I assume they are at distinct locations on the server.

查看更多
甜甜的少女心
3楼-- · 2019-06-25 00:42

This is one of the common problem faced by many in SO.

See my answer here: MPEG-TS Segments HTTP Live Streaming

things to check out :

o PCR (timestamp) discontinuity
o Matching framerate
o file format
o number and type of tracks
o encoding parameters
o encoding sequence

查看更多
登录 后发表回答