<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div>I am encoding H.264 and then wrapping it with HLS (ts files) - video only, no audio. To be clear, I'm using the 'avcodec_send_frame'/'avcodec_receive_packet' variation of the API. </div><div><br></div><div>What I have noticed is that the HLSenc  is flooding the log with the warning message "<span class="ydpdd341a78pl-pds" style="color: rgb(3, 47, 98); font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; white-space: pre-wrap;">"</span><span style="color: rgb(3, 47, 98); font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; white-space: pre-wrap;">pkt->duration = 0, maybe the hls segment duration will not precise</span><span class="ydpdd341a78pl-pds" style="color: rgb(3, 47, 98); font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; white-space: pre-wrap;">"'. </span><span class="ydpdd341a78pl-pds" style="font-size: 12px; white-space: pre-wrap;">I've confirmed that the AVPacket received from the encoder has a duration of zero. Even though this is only a warning, I'd like to heed the warning.</span></div><div><span class="ydpdd341a78pl-pds" style="color: rgb(3, 47, 98); font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; white-space: pre-wrap;"><br></span></div><div> <span style="color: rgb(0, 0, 0); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 12px; white-space: pre-wrap;">The AVCodecContext has a time_base of 1/25 and the AVStream video index has a time_base of 1/90,000. If I set the AVPacket duration to 3,600, the warning disappears; however, I have concerns explicitly setting the duration of each AVPacket explicitly (especially if my life can be made easier by FFmpeg setting it).</span></div><div><span style="color: rgb(0, 0, 0); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 12px; white-space: pre-wrap;"><br></span></div><div><span style="font-size: 12px; white-space: pre-wrap;">1. Should the duration of AVPacket be populated automatically? (Note: The duration is currently _always_ zero). </span></div><div><span style="font-size: 12px; white-space: pre-wrap;">2. Am I expected to populate the duration myself?</span></div><div><span style="font-size: 12px; white-space: pre-wrap;">3. Is the fact that the duration is being set to zero a symptom of incorrect values in the original AVFrame as passed to the encoder?</span></div><div><span style="font-size: 12px; white-space: pre-wrap;"><br></span></div><div><span style="font-size: 12px; white-space: pre-wrap;">Gavin.</span></div><div><span style="font-size: 12px; white-space: pre-wrap;"><br></span></div></div></body></html>