0

I'm using the following to build a preview filmstrip image by grabbing every Nth frame and tiling them into a grid:

ffmpeg -i "$file" -frames 1 -vf "select=not(mod(n\,$N)),tile=${COLS}x${ROWS}" -y strip.jpg

However the input video has black bars so I'd like to crop them out before grabbing those frames using something like:

-filter:v "crop=1440:1080"

Adding that has no effect on the tiled output image. I have also tried incorporating that filter into the -vf option to no effect. Is there any way to accomplish this without a second pass that renders the whole video (temporarily) cropped? Thanks!

1 Answer 1

0

Simply insert crop after the select filter.

-vf "select=not(mod(n\,$N)),crop=1440:1080,tile=${COLS}x${ROWS}"
1
  • Thanks - I had tried that but my mistake was apparently that I was adding ":0:0" for the offset. For some reason if I do that the crop does not apply in this context. Jun 23, 2022 at 23:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.