<div dir="ltr"><div style>I have been trying to create a MPEG-TS file using the the ffmpeg examples.</div><div><br></div>I've been trying to specify a muxrate in the muxing.c example code:<div><a href="https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/muxing.c">https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/muxing.c</a><br>
</div><div><br></div><div style>When I do so by adding:</div><div style><div><br></div><div>AVDictionary *dict = NULL;</div><div>av_dict_set(&dict, "muxrate", "2000000", 0);</div><div style><br></div>
<div style>before</div><div><br></div><div>ret = avformat_write_header(oc, &dict);</div><div><br></div><div style>I get the following warning:</div><div style><br></div><div style>dts < pcr, TS is invalid.</div><div style>
<br></div><div style>The example code with my modifications is availiable here (line 471):</div><div style><a href="http://pastebin.com/SxjP62iA">http://pastebin.com/SxjP62iA</a><br></div><div style><br></div><div style>Am I going about setting the muxrate correctly? Why do I get the warning?</div>
</div></div>