title: FFMPEG How to apply subtitles [ass] on a live video stream
body: <p>I am going to develop a camera recording application. </p>
  
  <p>One of the feature is to apply subtitles while recording. Users can key in subtitles on the camera preview screen when the camera is recording.</p>
  
  <p>I know I can apply the subtitles after the record is finished by running:</p>
  
  <pre><code>ffmpeg -i ./file.mp4 -c:v libx264 -c:a copy -vf "ass=t.ass" out.mp4
  </code></pre>
  
  <p>but which takes a very long time. So it will be better to do it on the fly (while recording a video).</p>
  
  <p>Notice: the subtitle itself is also a live-stream.</p>
  
  <p>Any one help?</p>