[MEncoder-users] mix a pic with mp3 file

Peter pscientist at inbox.com
Wed Oct 6 05:33:08 CEST 2010


On 2010-10-02 5:54 AM, adel essafi wrote:
> ello
> I have an mp3 file and only one image
>
> I want to generate a video file that containt that file mixed with the
> sound.

Ello.

I think you can do it with FFmpeg, will that be OK? There is a site here that 
describes making a slideshow; you only need the first step because you only have 
one 'slide'.
http://sites.google.com/site/andycivil/making-a-video-slideshow-with-ffmpeg

Make a copy of your JPG. Like this:
copy picture-0.jpg picture-1.jpg

Then use FFmpeg to make a movie with no sound yet, e.g.
c:\ffmpeg\ffmpeg -r 0.001 -f image2 -i picture-%%01d.jpg -qscale 2 -g 1000 -r 25 
-vframes 167 -y picture.mpg
(Check that page to see what the numbers are; you need the 0.001 small enough 
and the 1000 big enough, and 167 has to be the right number of frames at 25 
frames/sec to fit the mp3.)

Then encode again to add the sound, e.g.
c:\ffmpeg\ffmpeg -i picture.mpg -i sound.mp3 -vcodec copy -map 0:0 -map 1:0 
-acodec copy -y picture-sound.mpg

Hope this works for you.

-- 
Peter

____________________________________________________________
Share photos & screenshots in seconds...
TRY FREE IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if1
Works in all emails, instant messengers, blogs, forums and social networks.


More information about the MEncoder-users mailing list