user5886: I'm using ffmpeg to trim a Zoom video recording (format: ISO Media, MP4 v2 [ISO 14496-14]) via this command:
ffmpeg \
  -ss 00:11:42 \
  -to 01:11:22 \
  -i input-original.mp4 \
  -c copy \
  output-trimmed.mp4

The input file looks great, but the output has a few dropped frames at the beginning, so for the first few seconds it looks like this:

A few seconds later, it goes back to normal and it doesn't have any other issues. I'm wondering if there is a way to fix this problem.
EDIT: Actually, this seems to be a VLC-specific problem. Once I upload it to Vimeo, the weird frames go away. Still, I'd like to know if there is a way to prevent this.

user26779: You can achieve the desired video without any broken or black frames by decoding and re-encoding the video. Although you need to know video codec and bit-rate in order to achieve so
ffmpeg -i input-original.mp4 -ss 00:11:42 -strict -2 -to 01:11:22 -codec:v h264 -b:v 100k;

Note: If this does not work, try to change -to switch to -t and specify the duration.
Hope this helps.

user19853: Try to place the -ss and -to after the input: 
ffmpeg \
  -i input-original.mp4 \
  -ss 00:11:42 \
  -to 01:11:22 \
  -c copy \
  output-trimmed.mp4

According to @Gyan (https://stackoverflow.com/questions/45004159/ffmpeg-ss-and-t-for-cutting-mp3)

When -ss and -t are placed before the input, ffmpeg resorts to fast
  seek which relies on the index of the input to allow ffmpeg to start
  and stop seeking. MP3s don't have indices, so ffmpeg estimates
  duration via bitrate. This can be inaccurate.
When -ss and -t are placed after the input, ffmpeg counts demuxed
  packets. This will be accurate.

If it doesn't work you can also try to convert your video to intra-frame format (try ffvhuff), trim it and then convert it back to mp4 but this will slightly decrease the quality of the trimmed output. Keep in mind that ffvhuff will create huge file in size so make sure you have enough free space if you want to go this way. 

5886: <p>I'm using ffmpeg to trim a Zoom video recording (format: ISO Media, MP4 v2 [ISO 14496-14]) via this command:</p>
<pre><code>ffmpeg \
  -ss 00:11:42 \
  -to 01:11:22 \
  -i input-original.mp4 \
  -c copy \
  output-trimmed.mp4
</code></pre>
<p>The input file looks great, but the output has a few dropped frames at the beginning, so for the first few seconds it looks like this:</p>
<p><a href="https://i.stack.imgur.com/fot19.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fot19.png" alt="enter image description here" /></a></p>
<p>A few seconds later, it goes back to normal and it doesn't have any other issues. I'm wondering if there is a way to fix this problem.</p>
<p>EDIT: Actually, this seems to be a VLC-specific problem. Once I upload it to Vimeo, the weird frames go away. Still, I'd like to know if there is a way to prevent this.</p>
 26779: <p>You can achieve the desired video without any broken or black frames by decoding and re-encoding the video. Although you need to know video codec and bit-rate in order to achieve so</p>

<pre><code>ffmpeg -i input-original.mp4 -ss 00:11:42 -strict -2 -to 01:11:22 -codec:v h264 -b:v 100k;
</code></pre>

<p><em>Note:</em> If this does not work, try to change <code>-to</code> switch to <code>-t</code> and specify the duration.<br>
Hope this helps.</p>
 19853: <p>Try to place the <code>-ss</code> and <code>-to</code> after the input: </p>

<pre><code>ffmpeg \
  -i input-original.mp4 \
  -ss 00:11:42 \
  -to 01:11:22 \
  -c copy \
  output-trimmed.mp4
</code></pre>

<p>According to @Gyan (<a href="https://stackoverflow.com/questions/45004159/ffmpeg-ss-and-t-for-cutting-mp3">https://stackoverflow.com/questions/45004159/ffmpeg-ss-and-t-for-cutting-mp3</a>)</p>

<blockquote>
  <p>When -ss and -t are placed before the input, ffmpeg resorts to fast
  seek which relies on the index of the input to allow ffmpeg to start
  and stop seeking. MP3s don't have indices, so ffmpeg estimates
  duration via bitrate. This can be inaccurate.</p>
  
  <p>When -ss and -t are placed after the input, ffmpeg counts demuxed
  packets. This will be accurate.</p>
</blockquote>

<p>If it doesn't work you can also try to convert your video to intra-frame format (try <code>ffvhuff</code>), trim it and then convert it back to mp4 but this will slightly decrease the quality of the trimmed output. Keep in mind that <code>ffvhuff</code> will create huge file in size so make sure you have enough free space if you want to go this way. </p>
