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
Joomla - Checklist for Moving ...
* Remove web directory protection entries * Rsync files to the new location * Change Apache root folder settings * Redo web directory protection entries * U...
KVM - Enable Direct PCI Pass-T...
This example was done on Ubuntu server.* Enable VM direct I/O in the BIOS.* Open /etc/default/grub using an editor like nano or something.* Find GRUB_CMDLINE_LI...
How To Build an Ubuntu Web Ser...
The following is a task outline for building an Ubuntu-based web-server to run Joomla and JomSocial. I created this for my own notes, so apologies if it's...
Linux - Specify From Address W...
I struggled a bit with figuring out how to specify the from email address when sending mail on the Linux command line. In short, you need to use the -r option....