<div dir="ltr">Hi All,<div><br></div><div>I want to embed .srt file to my MP4 output file using code, <b>not CLI</b>, I didn't find any good example for that, the only example I have is the remuxing.c demo.</div><div><br></div><div>What is the best way to do it? </div><div>1) In the remuxing demo, I see that using libformat I can write chunks of the subtitles file ( using av_interleaved_write_frame function see line 169  <a href="https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/remuxing.c">https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/remuxing.c</a>).</div><div>2) Can I use avcodec_encode_subtitle from libavcodec to do it?</div><div>3) using complex filters?</div><div><br></div><div>Thanks in advance</div><div>Asaf</div></div>