MPEG TS HTTP Streaming Segment

I use FFMPEG and the free segment (Carson Mcdonald's) to create ts segments, which I later save to the web server and play with Quicktime playing .m3u8

If I have segments 1,2,3,4 and another stream with segments 1,2,3,4 and would like to alternate them, what should I do. If I do the following: 1,2, another thread 3, 4 It works fine. However, if I want to do the following: 1,2, another thread 4, 4 it does not work.

In other words, the segment to be added must have the same number as the one I am replacing. Why is this? Is it related to PCR? I would like to be able to interleave any segment anywhere. How can i do this?

Thanks,

M3U8 File

#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 
+4
source share
2 answers

Have you changed the playlist file (index) .M3U8 to point to two 4 files? I assume they are in different places on the server.

0
source

This is one of the common problems that many people face in SO.

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

all you need to check:

o PCR interruption (timestamp)
o Appropriate frame rate
o file format
o number and type of tracks
o encoding parameters
o coding sequence

0
source

Source: https://habr.com/ru/post/1385136/


All Articles