<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></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="">Sorry, still lost.</div><div class=""><br class=""></div><div class=""><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">I’m trying to tackle this problem because I’m experiencing it. I know that depending on the computer specs and other factors, the rendering engine is producing less frames than the desired because I have a frame rate counter.</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><br class=""></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">Please take into account that while Im referring to specific lines of muxing.c I have already a program based on muxing.c that is receiving the produced frames and muxing them. I’ve based myself on the muxing.c example and the modifications were very little.</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><br class=""></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">This is the first time I’m actually trying to change pts value.</div></div><div class=""><br class=""></div><div class="">My modifications were on the equivalent to line 331 -> <a href="https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/muxing.c#L331" class="">https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/muxing.c#L331</a></div><div class=""><br class=""></div><div class="">However, there is also a rescale at line 107 -> <a href="https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/muxing.c#L107" class="">https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/muxing.c#L107</a></div><div class=""><br class=""></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">I’m not assigning dts myself. </span></div><div class=""><br class=""></div><div class="">Does anyone know an example that shows how to tackle this problem?</div><div class=""><br class=""></div><div class="">Thanks!</div><div class=""><br class=""></div><div class="">Nuno</div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On 2 Sep 2021, at 18:18, 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 class="">Nuno, <br class=""><br class="">1. When you are muxing a stream you already have some options -- either the pts is correct for packets or timestamp is being sent in some way, thus the formula.<br class="">2. The crash is because you did not set DTS properly, assign it the same value))<br class="">3. DTS already contains something and more to say, you are using the muxing.c example. What makes you think fps is going to produce the wrong playing speed? Have you tested the output? Maybe everything works without pts changing? (Asking 'coz you are very likely to modify the example for the purpose)</div><div class="">4. For the file to be correct you are very likely supposed to shift PTS so that it starts from zero. Don't remember if you extract it or set the start. Experiment with AVStream->start_time and pts/dts so that the resulting file plays and navigates (!! check it) correctly in VLC or MPC HC.<br class=""><br class="">Regards, Alex</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>