title: ffmpeg livestream from static image and audio
body: <p>I'm trying to livestream by ffmpeg using static image and audio file. The ffmpeg command like this</p>
  
  <blockquote>
    <p>ffmpeg -re -loop 1 -f image2 -i '/tmp/11.jpg' -f lavfi -i amovie=/tmp/5117.mp3:loop=999 -video_size 600x480 -c:v libx264 -x264-params keyint=60 -bufsize 500k -c:a aac -ar 44100 -b:a 128k -r 30 -g 60 -pix_fmt yuv420p -f flv "rtmp://"</p>
  </blockquote>
  
  <p>/tmp/11.jpg was generated by another process and keep updated twice per second. The ffmpeg command doesn't look right, first, it show status like this</p>
  
  <blockquote>
    <p>frame=   85 fps=9.4 q=29.0 size=    2261kB time=00:02:24.19 bitrate= 128.4kbits/s speed=  16x</p>
  </blockquote>
  
  <p>As you see, <strong>16x</strong> is not good, 1x is the right value for livestream. Then, after a while, it show many warning log like this</p>
  
  <blockquote>
    <p>[flv @ 0x322bd60] Non-monotonous DTS in output stream 0:1; previous: 335993, current: 297752; changing to 335993. This may result in incorrect timestamps in the output file.</p>
  </blockquote>
  
  <p>Please help to fix it.</p>