I wanted to figure out a way to quickly and easily combine an image file (jpg) and audio file (mp3) into a video file (mov) using the free media converter tool ffmpeg. This would allow me to upload my podcast episodes and songs to YouTube. After extensive googling and testing I found the combination that finally worked. And since I'm such a nice dude, I'll share it with you:
ffmpeg -loop 1 -i image-file.jpg -i audio-file.mp3 -shortest -acodec copy -f mov video-file.mov
Notes
* The above is on Ubuntu Server 12.04 LTS. Other ffmpeg versions may require tweaking of command options, hence the reason this took me extensive research and testing.
* Ffmpeg accepts a very wide range of file formats, so png, aif, wav, etc. can also be used.
UPDATE
* On Ubuntu at least, ffmpeg has been replaced by the avconv command; however, the exact same command format above works with avconv. Here it is again for copy/paste convenience:avconv -loop 1 -i image-file.jpg -i audio-file.mp3 -shortest -acodec copy -f mov video-file.mov
* Here's how to install avconv:apt-get install libav-tools
* Working fine on Ubuntu 14.04 LTS
Related Articles
Windows - How to Disable Start...
I hate it when a user's PC shuts down ungracefully, and they choose startup recovery at the next boot. The process (albeit "recommended") removes the PC from t...
Ubuntu 24.04 Nginx Build Outli...
I re-built my LEMP web-server fresh on Ubuntu 24.04 and learned some things along the way. This is my base build outline mostly created for my own notes. INS...
Nginx - How to Block or Redire...
I've been figuring out how to block or redirect web traffic in Nginx based on the country geoIP. NOTES* You need the package nginx-extras for this because this...
Roku - Blocking Hard-Coded DNS
The Roku media player has Google's free public DNS (8.8.8.8) hard-coded into it. This is great for DNS redundancy, but totally sucks if you use an unblock serv...