

-pix_fmt yuv420p Set the pixel format to yuv420p.-b:a 192k Encode the audio at a bit-rate of 192k.-c:a aac Encode the audio for the MP4 using aac.-c:v libx264 Encode the video for the MP4 using x264.wav, but an MP3 is just fine for our purposes. -i path/to/audio.mp3 Declare the second input, in this case audio.(In the case of our daily weather microcast, I use a basic 720x720 JPEG of the show's cover art.) -i path/to/image.jpg Declare the first input.This is of course optional, but you'll find it very useful when first testing this out and running the same command over and over again. -loop Infinitely loop over the same image to create the video.Fortunately, the Swiss Army knife that is ffmpeg makes that process relatively easy.Īfter a lot of trial and error (and some SuperUser), I came up with this one-liner: The first step is to combine your audio and a JPEG into a short, single-frame MP4 video (basically, a one-frame slideshow). So how do you do that? And how can you automate this process? (Though you can tweet out audio recorded through the Twitter interface, with voice tweets.) But MP3s can be displayed as "video" (with a single, static image). There's no native audio player in Twitter, so you can't just attach an MP3 to a tweet. You obviously want to get that audio out to as many people as possible. Suppose, like WBUR, you're creating more and more short, spoken-word audio. (Robin Lubbock/WBUR) This article is more than 2 years old.

You can convert short audio into single-frame videos that can be tweeted.
