Hacker News new | ask | show | jobs
by caryme 2055 days ago
I've been using ffmpeg's xgrid filter (similar to hstack and vstack, but allows for arbitrary grids) to produce virtual choir videos for my church choir during covid. Here's an example: https://www.youtube.com/watch?v=Oeg9w8X6hrA.

A lot of people are producing virtual choir videos right now, but I suspect few use a process similar to mine. I use Audacity to edit the audio separately, then crop the input videos using a face-aware cropping script (which uses https://github.com/ageitgey/face_recognition), then generate a video grid using ffmpeg + xgrid.

1 comments

I would be interested in seeing your script if you don’t mind sharing
Sure!

Here's the face-aware crop script (somewhat quick and dirty - I haven't moved the output dimensions to CLI arguments yet): https://gist.github.com/carylee/62dbe19579ed9fa1714a3635ff0b...

Here's an example script for stitching the output video: https://gist.github.com/carylee/a13ae1a1ecb2f81c6536476f6dfb...

And here's the resulting video (text was added later by a different editor): https://www.youtube.com/watch?v=f7Pm4nLPslY

Nice, this was super timely as I was literally building the same thing. And I had just reached the part where I was annoyed that all the submitted videos had different shapes and sizes which as you know would be tedious to correct manually.

You for sure saved me some time!