![]() |
FFmpeg >
-
2020-08-28 – The ffmpeg instructions don’t work any more..
Table of Contents [hide]
Method 1 ∞
-
make your image (I use KolourPaint):
kolourpaint ~/kolourpaint1.png
-
Control-eand change the canvas size to 640×360.
See Determining mp3 duration if you want to have some handy code to automatically translate mm:ss into seconds.
# in seconds. DURATION=210 FPS=25 SETTINGS="-y -ac 2 -ar 44100 -r $FPS -sameq" LENGTH=$(($FPS * $DURATION)) ffmpeg $SETTINGS -loop_input -vframes $LENGTH -i ~/kolourpaint1.png -f s16le -i <(dd if=/dev/zero bs=19200 count=1) ~/kolourpaint2.avi
Want to merge audio at the same time? Try:
ffmpeg $SETTINGS -loop_input -vframes $LENGTH -i movie.png -i combined.mp3 -map 0:0 -map 1:0 movie.avi
Using libav (avconv) ∞
The process is different using Libav.
\avconv \ -loop 1 \ -i "$_image_filename" \ -i "$_audio_filename" \ -shortest \ -acodec copy \ "$_output_filename"
Notes:
- I make it an avi because the flv it makes will crash Avidemux when appended.
-
I cannot take this avi and convert it to an FLV and then try to re-load that FLV into Avidemux. It explodes. =(
Method 2 ∞
Including an mp3
DURATION=210 FPS=25 LENGTH=$(($FPS * $DURATION)) SETTINGS="-y -r $FPS" ffmpeg $SETTINGS -loop_input -vframes $LENGTH -i movie.png -i combined.mp3 -map 0:0 -map 1:0 movie.avi

