title: how to trim video in h264 format using ffmpeg while preserving quality?
body: <p>I'm new to ffmpeg,</p>
  <p>I'm trimming a small clip from a bluray H264 video by providing start and end duration.</p>
  <p>I tried:</p>
  <pre><code>ffmpeg -ss 00:01:00 -i input.mp4 -to 00:02:00 -c copy output.mp4
  </code></pre>
  <p>but this results in stuttering issues in start of the video. The audio and video also don't match.</p>
  <p>I tried using <code>-c libx264</code>  but this is taking too long and the output video has much lower bit rate.</p>
  <p>My goal is to trim as fast as possible while preserving quality. I don't care about the frame accuracy of the trim. I plan on uploading the output to youtube.</p>
  <p>what flags should I use?</p>