Answers.Body: <p>Reset timestamps after the trim, and disable audio.</p>
  <p><code>ffmpeg -y -i x.mp4 -c:v libx264 -filter_complex 'trim=start=1.32:duration=0.4,setpts=PTS-STARTPTS,crop=500:500:1200:300,split=2[f][ri];[ri]reverse[r];[f][r]concat' -an x1.mp4</code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-10T04:11:10.783Z
Answers.LastActivityDate: 2022-07-10T04:11:10.783Z
Answers.UserDisplayName: Gyan
Body: <p>I'm trying to use ffmpeg to create a cropped &quot;boomerang&quot; video. Where it would take in a video, take a small segment, crop it and then play that little piece forward and then play it backwards.</p>
  <p><code>ffmpeg -y -i x.mp4 -c:v libx264 -filter_complex 'trim=start=1.32:duration=0.4,crop=500:500:1200:300,split=2[f][ri];[ri]reverse[r];[f][r]concat'  x1.mp4</code></p>
  <p>The end result, however, is <code>00:00:02.34</code> long, almost the exact same as the original <code>00:00:02.46</code>. What am I doing wrong?</p>
  
Tags: <ffmpeg>
Title: Crop and boomerang at the same time using ffmpeg?
UserDisplayName: chx
ThreadText: # Crop and boomerang at the same time using ffmpeg?
  
  (Asked by: username_0 on 2022-07-09)
  
  I'm trying to use ffmpeg to create a cropped "boomerang" video. Where it would take in a video, take a small segment, crop it and then play that little piece forward and then play it backwards.
  
  `ffmpeg -y -i x.mp4 -c:v libx264 -filter_complex 'trim=start=1.32:duration=0.4,crop=500:500:1200:300,split=2[f][ri];[ri]reverse[r];[f][r]concat' x1.mp4`
  
  The end result, however, is `00:00:02.34` long, almost the exact same as the original `00:00:02.46`. What am I doing wrong?
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-07-10. Score: 1 | Accepted answer
  
  Reset timestamps after the trim, and disable audio.
  
  `ffmpeg -y -i x.mp4 -c:v libx264 -filter_complex 'trim=start=1.32:duration=0.4,setpts=PTS-STARTPTS,crop=500:500:1200:300,split=2[f][ri];[ri]reverse[r];[f][r]concat' -an x1.mp4`
  
  
  ---
  
  