title: How to increase video encoding speed in ffmpeg?
body: <p>I am recording video clips and then joining all the clips in a final video.
  Everything goes fine but the joining process takes too long.</p>
  
  <p>Tried to using some ffmpeg filters from here:
  <a href="https://trac.ffmpeg.org/wiki/Encode/H.264" rel="nofollow noreferrer">https://trac.ffmpeg.org/wiki/Encode/H.264</a></p>
  
  <p>And here is my ffmpeg command that I am using to increase the speed (which seems to be wrong):</p>
  
  <pre><code>command = new String[]{"-y",
                  "-f",
                  "concat",
                  "-safe",
                  "0",
                  "-i",
                  "/storage/emulated/0/DCIM/my_file.txt",
                  "-c:v",
                  "-preset",
                  "fast",
                  "-crf",
                  "22",
                  "copy",
                  "-flags",
                  "+global_header",
                  "/storage/emulated/0/DCIM/SampleApp/" + videoOutputPath
          };
  </code></pre>
  
  <p>Please help! Thanks much.</p>