gpt4 book ai didi

ffmpeg - HLS 不连续性卡在缓冲区中

转载 作者:行者123 更新时间:2023-12-04 22:52:58 27 4
gpt4 key购买 nike

我们正在使用 JWPlayer 8.9.0,我们正在尝试在我们的视频中插入广告。
我们正在使用 EXT-X-DISCONTINUITY但显然,当我们开始转换广告时,播放器停止显示缓冲状态。

这是我们播放列表的示例:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-TARGETDURATION:16
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:14.557178,
https://slave2.example.com/hls/output1/output_000.ts
#EXTINF:1.376467,
https://slave3.example.com/hls/output1/output_001.ts
#EXT-X-DISCONTINUITY
#EXTINF:8.050244,
https://slave2.example.com/hls/HLSad/output_000.ts
#EXTINF:4.880200,
https://slave2.example.com/hls/HLSad/output_001.ts
#EXTINF:7.090889,
https://slave2.example.com/hls/HLSad/output_002.ts
#EXTINF:5.881267,
https://slave2.example.com/hls/output1/output_002.ts
#EXTINF:5.672711,
https://slave3.example.com/hls/output1/output_003.ts
#EXT-X-DISCONTINUITY
#EXTINF:8.050244,
https://slave2.example.com/hls/HLSad/output_000.ts
#EXTINF:4.880200,
https://slave2.example.com/hls/HLSad/output_001.ts
#EXTINF:7.090889,
https://slave2.example.com/hls/HLSad/output_002.ts
#EXTINF:5.714422,
https://slave2.example.com/hls/output1/output_004.ts
#EXTINF:4.755067,
https://slave3.example.com/hls/output1/output_005.ts
[...]
#EXT-X-ENDLIST

这是 JS 控制台告诉我们的:
[log] > audio sampling rate : 48000
9512e6e5-eff6-4f75-806f-a367785315b7:1 [log] > manifest codec:undefined,ADTS data:type:2,sampleingIndex:3[48000Hz],channelConfig:2
9512e6e5-eff6-4f75-806f-a367785315b7:1 [log] > parsed codec:mp4a.40.5,rate:48000,nb channel:2
9512e6e5-eff6-4f75-806f-a367785315b7:1 [log] > audio sampling rate : 48000
9512e6e5-eff6-4f75-806f-a367785315b7:1 [log] > AVC:59 ms overlapping between fragments detected
9512e6e5-eff6-4f75-806f-a367785315b7:1 [log] > Video/PTS/DTS adjusted: 15958/15933,delta:-59 ms

虽然 Chrome 媒体控制台说:
1.414   kPlay   
{}

17.280 kBufferingStateChanged
{audio_buffering_state: {reason: "DEMUXER_UNDERFLOW", state: "BUFFERING_HAVE_NOTHING"}}

17.280 kBufferingStateChanged
{,…}
pipeline_buffering_state: {for_suspended_start: false, reason: "DEMUXER_UNDERFLOW", state: "BUFFERING_HAVE_NOTHING"}
for_suspended_start: false
reason: "DEMUXER_UNDERFLOW"
state: "BUFFERING_HAVE_NOTHING"


考虑到我们要在播放列表中“合并”的两个视频具有相同的音频/视频特性(编解码器、比特率、分辨率等),为什么这不起作用?
谢谢

最佳答案

我遇到了类似的问题,并通过这种方式解决了:
在播放列表文件中添加“#EXT-X-DISCONTINUITY-SEQUENCE”,如下所示:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-DISCONTINUITY-SEQUENCE:0
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-TARGETDURATION:16
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:14.557178,
https://slave2.example.com/hls/output1/output_000.ts
#EXTINF:1.376467,
https://slave3.example.com/hls/output1/output_001.ts
#EXT-X-DISCONTINUITY
#EXTINF:8.050244,
https://slave2.example.com/hls/HLSad/output_000.ts
#EXTINF:4.880200,
https://slave2.example.com/hls/HLSad/output_001.ts
无论您从播放列表文件中的何处删除“#EXT-X-DISCONTINUITY”,都将该字段的值增加 1。

关于ffmpeg - HLS 不连续性卡在缓冲区中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61214785/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com