<div dir="ltr"><div>Nuno, <br><br>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>2. The crash is because you did not set DTS properly, assign it the same value))<br>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>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><br>Regards, Alex</div></div>