Here are a collection of bash commands and then a final script that I used this week to convert a video to frames. Edit those frames a bit, and then convert the edited frames back to video
This was for my rmbg
tool, which I discussed in this weeks newsletter.
The script at the end actually uses rembg
which is the tool that inspired my rust port!
Disclaimer: It turns out this is NOT the "state of the art" background removal for videos! Keep your eyes peeled for a future TIL covering RobustVideoMatting
But the ffmpeg
scripts for converting to frames are still useful!
input_video=
# Make PNGS from video
# Remove background from all frames
# Make video from pngs
# Add back in the audio track
My weekly newsletter tailored at developers who are eager to grow with me!
Every week will be unique, but expect topics focusing around Web Development and Rust