Relative Content

Tag Archive for ffmpeg

How to resize a video with FFMPEG so that it has a max size, horizontal or vertical, without losing aspect ratio?

There are lots of questions on SO about resizing video but they all seem to assume orientation. Let’s say that I am ingesting user videos and sometimes they are horizontal and sometimes vertical. I’d like to downscale them to at most 1920×1080 or 1080×1920, depending on orientation, but never upscale. I can’t examine videos ahead of time so I am looking for a filter command that will do all this logic in one go. Anyone have anything like this handy?

FFmpeg leaves green pixels in a simple video

I use this command to remove the green screen and overlay another video as background. However, green screen removal leaves green pixels all around a stick figure carton character. My video is a cartoon so there are no lighting issues. Is there a way to improve this behavior?

FFmpeg leaves green pixels in a simple video

I use this command to remove the green screen and overlay another video as background. However, green screen removal leaves green pixels all around a stick figure carton character. My video is a cartoon so there are no lighting issues. Is there a way to improve this behavior?