<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Alex,<div class=""><br class=""></div><div class="">Thanks for your reply.</div><div class=""><br class=""></div><div class="">This means that if I have a recording elapsed timer, I could pass the timestamp at the current recording time to make this? Or do you seen any other better way of doing it?</div><div class=""><br class=""></div><div class="">Right now, the pts is being defined as:</div><div class=""><br class=""></div><div class="">
<pre style="margin-top: 0px; margin-bottom: 0px;" class=""><!--StartFragment-->ost->frame->pts<span style="color: rgb(79, 79, 79);" class=""> </span><span style="color: rgb(106, 106, 106);" class="">=</span><span style="color: rgb(79, 79, 79);" class=""> </span>ost->next_pts<span style="color: rgb(106, 106, 106);" class="">++</span>;<!--EndFragment--></pre><div class=""><br class=""></div></div><div class="">Has per muxing.c example</div><div class=""><br class=""></div><div class="">Regards,</div><div class=""><br class=""></div><div class="">Nuno</div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 2 Sep 2021, at 13:43, Alexandr Kasyan <<a href="mailto:a.kasyan@ntechlab.com" class="">a.kasyan@ntechlab.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class="">Hi, Nuno!<br class=""><br class="">Well, one of the possible approaches is -- set the proper pts for AVPacket-s you're muxing. <br class="">The basic formula is: <br class="">uint64_t pts = av_rescale_q(timestamp_ms, AVRational{1, 1000}, time_base);</div><div dir="ltr" class=""><br class=""></div><div dir="ltr" class="">It's usually time or PTS that's specified for packets (and frame's time is usually derived from that), so most of the players take that into account when feeding frames for display. <br class="">You can check if your muxing is played at the wrong speed in the first place, then adjust PTS in code if needed.<br clear="all" class=""><div class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class="">__________________________________________</div><div dir="ltr" class=""><br class=""></div><div dir="ltr" class="">Regards, Alex</div></div></div></div></div></div></div>
_______________________________________________<br class="">Libav-user mailing list<br class=""><a href="mailto:Libav-user@ffmpeg.org" class="">Libav-user@ffmpeg.org</a><br class="">https://ffmpeg.org/mailman/listinfo/libav-user<br class=""><br class="">To unsubscribe, visit link above, or email<br class="">libav-user-request@ffmpeg.org with subject "unsubscribe".<br class=""></div></blockquote></div><br class=""></div></body></html>