| YaK:: How to crop with ffmpeg | [Changes] [Calendar] [Search] [Index] [PhotoTags] |
#!/bin/bash
# incase anyone ever has this insane use case again
input_video="input.mp4"
prefix="v8"
width=1366
height=768
segments=10
for ((i=1; i<=segments; i++)); do
x_offset=$(((i - 1) * width))
output_file="${prefix}-${i}.mp4"
ffmpeg -i "$input_video" -vf "crop=$width:$height:$x_offset:0" -c:a copy "$output_file"
done
echo "Splitting complete!"
| (last modified 2025-03-01) [Login] |