Answers.Body: <p>Use</p>
  
  <pre><code> ffmpeg -i IN.MOV
          -filter_complex "[0]split=2[full][crop];
                           [crop]crop=W:H:X:Y,transpose=cclock[crop];
                           [full][crop]overlay='X+h/2-w/2':'Y+w/2-h/2'"   out.mp4
  </code></pre>
  
  <p>The video is split with one copy getting cropped and rotated. The other full copy remains full-sized. Then the edited portion is overlaid on the full portion.</p>
  
  <p>The variables in capital letters should be replaced with your numerical values.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-15T08:25:46.130Z
Answers.LastActivityDate: 2018-12-15T08:25:46.130Z
Answers.UserDisplayName: Gyan
Body: <p>I tried to solve this for quite some time now and could not find the solution. I would like to select a certain "subarea" of a video and rotate/flip only that "subarea". Like a combination of these two one liners:</p>
  
  <pre><code>ffmpeg -i IN.mov -filter:v "hflip,vflip" -c:a copy out.mov
  ffmpeg -i IN.MOV -filter:v "crop=out_w:out_h:x:y" out.mp4
  </code></pre>
  
  <p>Thank you for any help. </p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-12-13T13:24:34.290Z
Comments.Text: Do you want to discard the rest of the image?
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-12-13T15:39:41.337Z
Comments.Text: No, I want to keep it.
Comments.UserDisplayName: digit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-12-13T15:53:15.990Z
Comments.Text: What should appear in the background after the area is rotated?
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-12-15T07:44:38.947Z
Comments.Text: Yes, select an area rotate it and paste it back into the same vid rotated. Background stays the same. Thanks
Comments.UserDisplayName: digit
Tags: <ffmpeg>
Title: Rotate only a certain part of a frame
UserDisplayName: digit
ThreadText: # Rotate only a certain part of a frame
  
  (Asked by: username_0 on 2018-12-13)
  
  I tried to solve this for quite some time now and could not find the solution. I would like to select a certain "subarea" of a video and rotate/flip only that "subarea". Like a combination of these two one liners:
  
  ```
  ffmpeg -i IN.mov -filter:v "hflip,vflip" -c:a copy out.mov
  ffmpeg -i IN.MOV -filter:v "crop=out_w:out_h:x:y" out.mp4
  
  ```
  
  Thank you for any help.
  
  **Tags:** ffmpeg
  
  > **Comments:**
  > **username_1**: Do you want to discard the rest of the image?  
  > **username_0**: No, I want to keep it.  
  > **username_1**: What should appear in the background after the area is rotated?  
  > **username_0**: Yes, select an area rotate it and paste it back into the same vid rotated. Background stays the same. Thanks  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-12-15. Score: 1 | Accepted answer
  
  Use
  
  ```
   ffmpeg -i IN.MOV
          -filter_complex "[0]split=2[full][crop];
                           [crop]crop=W:H:X:Y,transpose=cclock[crop];
                           [full][crop]overlay='X+h/2-w/2':'Y+w/2-h/2'"   out.mp4
  
  ```
  
  The video is split with one copy getting cropped and rotated. The other full copy remains full-sized. Then the edited portion is overlaid on the full portion.
  
  The variables in capital letters should be replaced with your numerical values.
  
  
  ---
  
  