问题
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
回答1:
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.
回答2:
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
来源:https://stackoverflow.com/questions/8417752/http-live-streaming-mpeg-ts-segment