HTTP 直播 MPEG TS 段
我正在使用 FFMPEG 和免费分段器(Carson Mcdonald's)来生成我的 ts 片段,然后将其保存到网络服务器并通过播放 .m3u8 来使用 Quicktime 进行播放(
如果我有片段 1,2,3,4 和另一个流)段 1,2,3,4 并且想将它们交错,我该怎么办。如果我执行以下操作: 1,2,其他流的 3, 4 它工作正常。但是,如果我想执行以下操作:1,2,其他流的 4, 4 它不起作用。
换句话说,要添加的段必须与我要替换的段具有相同的编号。这是为什么?和PCR有关系吗?我希望能够在任何地方交错任何片段。我该怎么做?
谢谢,
M3U8 文件是
#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
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否修改了 .M3U8 播放列表(索引)文件以指向两个 4 文件?我假设它们位于服务器上的不同位置。
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.
这是SO中许多人面临的常见问题之一。
请在此处查看我的答案:MPEG-TS 分段 HTTP 直播
要检查的事项:
o PCR(时间戳)不连续
o 匹配帧速率
o 文件格式
o 轨道数量和类型
o 编码参数
o 编码序列
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