user4938058
user4938058

Reputation:

FFMPEG | Rearrange crop

I need to "Encrypt" video with FFMPEG.

I did a lot of research and I did not find a solution to my problem :(

Is it possible to do that?

What I need:

enter image description here

Upvotes: 0

Views: 191

Answers (1)

llogan
llogan

Reputation: 134313

enter image description hereenter image description here
Before and after image examples.

Use crop, hstack, and vstack filters:

ffmpeg -i input -filter_complex \
"[0:v]crop=iw/2:ih/2:0:0[lt]; \
 [0:v]crop=iw/2:ih/2:ow:0[rt]; \
 [0:v]crop=iw/2:ih/2:0:oh[lb]; \
 [0:v]crop=iw/2:ih/2:ow:oh[rb]; \
 [lb][lt]hstack[top]; \
 [rt][rb]hstack[bottom]; \
 [top][bottom]vstack" \
-c:a copy output

Upvotes: 2

Related Questions