【FFmpeg】警告:[hls] pkt.duration = 0, maybe the hls segment duration will not precise
生活随笔
收集整理的這篇文章主要介紹了
【FFmpeg】警告:[hls] pkt.duration = 0, maybe the hls segment duration will not precise
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1、問題描述
在使用ffmpeg編程生成m3u8文件時,報警告
[hls @ 0x7f26b4181840] pkt->duration = 0, maybe the hls segment duration will not precise
2、原因分析
根據警告提示信息, AVPacket.duration的值設為了0,可能會導致hls在分段時時間不精確。
根據警告信息搜索源碼,在FFmpeg-n4.2.2/libavformat/hlsenc.c文件的hls_write_packet函數中有
if (pkt->duration) {vs->duration += (double)(pkt->duration
總結
以上是生活随笔為你收集整理的【FFmpeg】警告:[hls] pkt.duration = 0, maybe the hls segment duration will not precise的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [Go]在vscode中添加对模板文件t
- 下一篇: 【FFmpeg】警告:[mpegts]