LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Making a video with 1 jpeg plus audio with mencoder (https://www.linuxquestions.org/questions/linux-software-2/making-a-video-with-1-jpeg-plus-audio-with-mencoder-656201/)

slothpuck 07-16-2008 03:17 PM

Making a video with 1 jpeg plus audio with mencoder
 
Hello all,

Does anyone know how to make a video file (Flash video) using mencoder, but only using *one* jpeg file (so only one picture in the entire video) but at the same time being able to use an mp3 or wav file for audio? All my attempts follow the video (one jpeg) and produce only 1 frame, so mencoder needs to follow the audio and have the video repeat for encoding (since it's only 1 jpeg). Can anyone help?

Thanks

SP

hpfeil 08-01-2013 11:57 AM

I was searching for a way to make a movie of one image when I came across this no-reply thread. For future reference:

=-=-=-=
https://ffmpeg.org/trac/ffmpeg/wiki/"Create a video slideshow from images"

If you want to create a video out of just one image, this will do (output video duration is set to 30 seconds with -t 30):

ffmpeg -loop 1 -f image2 -i img.jpg -c:v libx264 -t 30 out.mp4

If you want to add audio (e.g. audio.wav) to one "poster" image, you need -shortest to tell it to stop after the audio stream is finished. We use the internal AAC encoder, but you can use any other AAC encoder as well:

ffmpeg -loop 1 -f image2 -i img.jpg -i audio.wav -c:v libx264 -c:a aac -strict experimental -b:a 192k -shortest out.mp4
-=-=-=-

You'll need plenty of disk space. The frame rate translates into that many copies of your image for each second.
Lots of info links - "Community Contributed Documentation" at https://ffmpeg.org/trac/ffmpeg/wiki


All times are GMT -5. The time now is 03:59 PM.