Pages

Apr 12, 2012

Create a video from an image and mp3 using ffmpeg

If you want to create a video with a static image and a background music (face it, you want to upload a song to youtube!), here's a very easy way using ffmpeg.

ffmpeg -loop 1 -t 242 -i the_image.jpg -i the_song.mp3 target_video.mpg

-t: duration in seconds
-loop 1: puts the image on all frames
-i: input files - the image and the mp3

PS: this is possibly not the best way because for a 242 seconds video I got video:6351kB audio:3782kB wich is.. stupid! I need to find a way to use key-frames so I can drastically reduce the video size! I tried using the -g <int> argument but got the same filesize :\

No comments:

Post a Comment