Browsed by
Category: Raspberry Pi

Generating DTMF with SoX

Generating DTMF with SoX

In this post I’ll show how SoX can generate DTMF, (Dual-tone multi-frequency signaling) which is commonly used in phone and security systems. These dual tone signals are the foundation from which digital communications are based. The technology around DTMF is not complex. Lets cover the history of DTMF. DTMF was developed by Bell Labs and put in production in the early 1960’s. It was mostly used to replace pulse dialing systems that had limits on how far a phone could…

Read More Read More

SoX Noise Generation

SoX Noise Generation

In my last post I suggested creating noise and using a band of it to fill in a band gap. SoX provides a way to generate noise. There are different types of noise that SoX will generate. Lets take a moment to look at these types and what applications noise generation is used for. There are 3 main types of noise that SoX will generate, they are white, pink, and brown. White noise is a random signal that has equal…

Read More Read More

Sox Band-Pass and Band-Reject Filtering

Sox Band-Pass and Band-Reject Filtering

SoX provides many filters to process audio data. In this post I’ll be covering how to apply pass or reject filtering of frequency bands, commonly referred to as band-pass or band-reject. This filter will take a frequency or a range of frequencies and either remove them from an audio file or remove all other frequencies while keeping only them. I’ll cover 5 filters available in SoX that do this type of audio processing. Here is some information about each of…

Read More Read More

SoX – An Introduction

SoX – An Introduction

SoX, short for Sound eXchange, is a command line utility that can convert audio data into other formats. It can also apply various effects, play, record, mix, and filter the audio data. Refer to the development website, http://sox.sourceforge.net/. In a previous post I used it to create a spectrogram of an audio file using this command. sox audio-in.wav -n spectrogram Lets start with basic play operation. SoX can play audio data through the command line using the play command, here…

Read More Read More

Spectrograms with FFMpeg

Spectrograms with FFMpeg

In this post I’ll be covering how to create image files that represent the sound levels and frequencies of a media file. These images are known as spectrograms. They provide a way to visually locate moments in time. This can be useful for a number of reasons. FFMpeg has a feature that lets us create spectrograms with the showspectrumpic filter. Details about this filter can be found here, https://ffmpeg.org/ffmpeg-filters.html#showspectrumpic. You can also get information about the filter by typing in…

Read More Read More

Creating Anaglyph Video with FFMpeg

Creating Anaglyph Video with FFMpeg

In this post, we’ll step through how to create anaglyphic stereoscopic videos using FFMpeg. To create anaglyph imaging, we’ll need to use two camera sources, one left, the other right. These sources will be merged into a single image with red cyan overlaying to create a three dimensional effect using red cyan glasses. I referenced these sites frequently. FFMpeg Documentation – https://ffmpeg.org/documentation.html FFMpeg Stereoscopic Details – https://trac.ffmpeg.org/wiki/Stereoscopic The source video I’ll be demonstrating was shot with two Innovv C1 dashboard…

Read More Read More

DeFish Effect with FFMpeg

DeFish Effect with FFMpeg

In this post, we’ll cover how to use FFMpeg to removed the radial effects of a fish eye lens. This distortion is a trade off of wide angle lenses. The wider view also included bends and bows to objects that are in nature straight. FFMpeg has a filter known as “lenscorrection” that will remove most of this distortion, lets begin. As always, split out a segment so you don’t waste time processing excessive amounts of data. ffmpeg -ss 00:00:39 -i…

Read More Read More

Color Thresholds and Masking with FFMpeg and ImageMagick

Color Thresholds and Masking with FFMpeg and ImageMagick

I’ve demonstrated how to take videos and convert them into images using FFMpeg in previous posts. In this post, I’ll be using that same process and ImageMagick to create a color threshold effect. The interesting aspect is that all of the processing can be done through the command line. When faces with editing numerous files, scripting is the way to go. The few hours of up front work getting the script right is worth it. You can get on with…

Read More Read More

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