Browsed by
Category: Computer Vision

Image to Video to Image using FFMpeg

Image to Video to Image using FFMpeg

In this post, I’ll demonstrate how to take a series of images and convert them into a video. I’ll also demonstrate how to convert a video into a series of images, were we can do some interesting things. Lets start with image to video conversion. For this example I’ll be using images that have been scrapped from the web for the past year. I run a script that downloads a new image every 5 minutes. As it downloads them, the…

Read More Read More

FFMpeg Time Lapse and Slow Motion

FFMpeg Time Lapse and Slow Motion

Interpolation doesn’t just slow down, speed up, or increases FPS for better overall appearance. It fills in the gaps between frames by mathematically guessing were pixels belong between each frame. Here is a source clip that I’ll be processing. This command increases a 18 second segment from 30 FPS to 120 FPS ffmpeg -ss 00:47:08 -i 201207140948.MOV -t 00:00:18 -c copy 201207140948_Seg.MOV ffmpeg -i 201207140948_Seg.MOV -vf minterpolate=fps=120 201207140948_Seg_120fps.MOV The results look the same at first glance, but when viewed intently,…

Read More Read More

Picture in Picture Video with FFMPeg

Picture in Picture Video with FFMPeg

Creating a video with a smaller thumbnail video inside is known as a picture in picture effect. I’ve used other video editors in the past to merge various camera views together to give a more complete experience. In this post I’ll cover how to use FFMpeg to do the same thing. It expands the idea of tiled video, were multiple cameras share equal amounts of screen space. Thumbnails offer flavoring for the main camera view. I’m going to step by…

Read More Read More

Pan, Tilt, and Zoom with FFMpeg

Pan, Tilt, and Zoom with FFMpeg

There are times when the content in an image or video is lost in the surrounding details. Live security camera systems have a feature known as PTZ, short for Pan, Tilt, and Zoom. This allows the live cameras a hardware and software way to focus more on an object of interest. With FFMpeg, we can do something similar. In this post I’ll cover the basics of PTZ. Unlike live security cameras were you might notice a transition from the wide…

Read More Read More

FFMpeg Night Enhancement Processing

FFMpeg Night Enhancement Processing

In this post I’ll be covering how to process footage that was shot at night. By default, it is difficult to see what was captured with the camera. I do know the length of the video as well as other aspects of it. The clip I’ll be using is 5 minutes long and has a resolution of 1280×720 at 30fps using the H.264 / AVC codec. The audio is a single channel (mono) 16-bit PCM at 32000Hz. I like that…

Read More Read More

FFMpeg Side by Side and Tiling Video

FFMpeg Side by Side and Tiling Video

FFMpeg has an interesting ability to join multiple video feeds together. In the past, I had use other video editors to do this. They were limited to 2 camera views. In addition, the second camera screen was scaled down and much smaller than the first video. With FFMpeg, we can join more than 2 camera feeds without resizing. I’ll be quick and to the point in this post so try not to blink. In this example I have 4 cameras…

Read More Read More

FFMpeg Video Sharpening

FFMpeg Video Sharpening

It can seem magical when blurry and low detail video is refocused. Unsharpen masks are the wizard behind the curtain and FFMpeg has this feature. In this post I’ll give some examples of the unsharpen mask. I won’t go into the details or mechanics of how the filter works. This will merely be a quick how to. I’m going to be working with a 30 second clip of video that was shot during the 2012 STP bicycle classic. It was…

Read More Read More

FFMpeg Video Splitting and Splicing

FFMpeg Video Splitting and Splicing

In the last post I mentioned that I used a 5 second clip from a larger video. More often that not, large videos will contain fluff that will need to be trimmed before they are published. There are several media editor that will do this. I’ve used OpenShot Video Editor on my system with good results. However, if you had tens if not hundreds of these trim functions to do, using a GUI like OpenShot would be time consuming. Fortunately,…

Read More Read More

FFMpeg Video Stabilization

FFMpeg Video Stabilization

FFMpeg is a command line video processing tool that has granular, if not sub atomic controls to process audio and video data. It will do a high degree of processing and since it uses the CLI, this allows its use in the background for bulk jobs. This ability puts FFMpeg out front of other processing tools. I’ve used GUI tools like vReveal, VirtualDub, and ProDAD. vReveal was an impressive tool that allowed me to leverage CUDA which used GPUs from…

Read More Read More

Bicycle Helmet Embedded Electronics

Bicycle Helmet Embedded Electronics

Several years ago I purchased a small video camera that was shaped like a flashlight for $50.  It had VGA 640 x 480 30 fps video quality and would record up to 2 hours on a single charge.  I used it to record several bike rides around the county on numerous bike trails.  The videos provided a way to recall the conditions and experiences which I used to plan future trips. A couple of years later I purchased some 808…

Read More Read More