Answers.Body: <p>There is a mistake in your ffmpeg command.</p>
  <p>The <code>-c</code> option either needs a codec (e.g. <code>-c:v libx264</code>) if you want to encode the video or the special value &quot;copy&quot; if it shouldn't be re-encoded (<code>-c copy</code>).</p>
  <p>Using <code>-ss</code> together with <code>-c copy</code> might not be accurate since ffmpeg is forced to only split on i-frames.
  But starting on an i-frame should fix the problem with artifacts.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-29T13:53:45.160Z
Answers.Text: Apologies, I was already using "-c copy new_name.mp4". I have updated the question to reflect that.
Answers.UserDisplayName: radumanolescu
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-21T11:23:25.727Z
Answers.LastActivityDate: 2023-07-21T11:23:25.727Z
Answers.UserDisplayName: drake7
Body: <p>I cut videos using the command below, and I sometimes find that the resulting video has imperfections at the beginning (square artifacts in the image). If I advance the start time parameter value (<code>START_AT_SECONDS</code>) by a few seconds (usually 1..3s), the artifacts go away.</p>
  <p>Is there a way to avoid the hit-and-miss, e.g. to know in advance that <code>START_AT_SECONDS=53</code> works but <code>START_AT_SECONDS=52</code> will give artifacts? Is there an option that means &quot;START_AT_SECONDS=52, or later as needed to make a good cut&quot;?</p>
  <pre><code>ffmpeg -ss START_AT_SECONDS -i &quot;some_file_name.mp4&quot; -t DURATION_SECONDS -c copy &quot;new_name.mp4&quot;
  </code></pre>
  
Tags: <ffmpeg>
Title: ffmpeg - Finding the right point to cut
UserDisplayName: radumanolescu
ThreadText: # ffmpeg - Finding the right point to cut
  
  (Asked by: username_0 on 2023-07-14)
  
  I cut videos using the command below, and I sometimes find that the resulting video has imperfections at the beginning (square artifacts in the image). If I advance the start time parameter value (`START_AT_SECONDS`) by a few seconds (usually 1..3s), the artifacts go away.
  
  Is there a way to avoid the hit-and-miss, e.g. to know in advance that `START_AT_SECONDS=53` works but `START_AT_SECONDS=52` will give artifacts? Is there an option that means "START\_AT\_SECONDS=52, or later as needed to make a good cut"?
  
  ```
  ffmpeg -ss START_AT_SECONDS -i "some_file_name.mp4" -t DURATION_SECONDS -c copy "new_name.mp4"
  
  ```
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-07-21. Score: 0
  
  There is a mistake in your ffmpeg command.
  
  The `-c` option either needs a codec (e.g. `-c:v libx264`) if you want to encode the video or the special value "copy" if it shouldn't be re-encoded (`-c copy`).
  
  Using `-ss` together with `-c copy` might not be accurate since ffmpeg is forced to only split on i-frames.
  But starting on an i-frame should fix the problem with artifacts.
  
  > **Comments:**
  > **username_0**: Apologies, I was already using "-c copy new_name.mp4". I have updated the question to reflect that.  
  
  ---
  
  