<p>Give this a try:</p>

<pre><code>ffmpeg -i audio.m4a -loop 1 -r 2 -i image.jpg -c:a copy -c:v libx264 -preset ultrafast -shortest out.mp4
</code></pre>

<p><code>-r 2</code> sets the frame rate to 2 fps (some players seem to have problems with 1 fps).</p>

CC BY-SA 3.0
2012-12-26T19:25:21.850Z
2012-12-26T21:51:59.140Z
2012-12-26T21:51:59.140Z
paulgrav
<p>I'm making mp4 (libx264 + aac) videos that have just one static image throughout the whole video. It's basically a narrated text with a nice background.</p>

<p>The question I've is how could I speed up encoding of such videos? Currently the videos are encoding at 50fps which is very, very slow. I can only encode 2000 videos on a single computer in one day.</p>

<p>Any particular settings I could specify to ffmpeg or lib264 library to suggest that there is no motion, and it's just a single image that has to b</p>

<p>For comparison, I was doing .avi (divx + mp3) videos before I moved to mp4, and I was able to encode 6000 - 8000 videos per day.</p>

CC BY-SA 3.0
2013-01-18T22:44:59.263Z
First, ideally this question should have the command and the ffmpeg output; second, divx is a much simpler codec than h264, all other things being equal you will inevitably get longer encode times with h264 (but smaller and/or better-quality output files).
evilsoup
<video><ffmpeg><encoding>
How do I speedup encoding of a video that has just 1 static frame with ffmpeg and lib264 library?
bodacydo
# How do I speedup encoding of a video that has just 1 static frame with ffmpeg and lib264 library?

(Asked by: username_0 on 2012-10-07)

I'm making mp4 (libx264 + aac) videos that have just one static image throughout the whole video. It's basically a narrated text with a nice background.

The question I've is how could I speed up encoding of such videos? Currently the videos are encoding at 50fps which is very, very slow. I can only encode 2000 videos on a single computer in one day.

Any particular settings I could specify to ffmpeg or lib264 library to suggest that there is no motion, and it's just a single image that has to b

For comparison, I was doing .avi (divx + mp3) videos before I moved to mp4, and I was able to encode 6000 - 8000 videos per day.

**Tags:** video, ffmpeg, encoding

> **Comments:**
> **username_1**: First, ideally this question should have the command and the ffmpeg output; second, divx is a much simpler codec than h264, all other things being equal you will inevitably get longer encode times with h264 (but smaller and/or better-quality output files).  

---

## 1 answers

### Answer by username_2 on 2012-12-26. Score: 1

Give this a try:
ffmpeg -i audio.m4a -loop 1 -r 2 -i image.jpg -c:a copy -c:v libx264 -preset ultrafast -shortest out.mp4

-r 2 sets the frame rate to 2 fps (some players seem to have problems with 1 fps).


---

