I tried using FFMPEG to convert a single 640x480 image (in my case, an 8bpp PNG image, though I'll likely have to do this with other image types and qualities) to a 10second XVID AVI file with no audio track. I'm running this on an older, special purpose video looper that requires the XVID AVI. It claims to have 16bpp color depth on its VGA (640 x 480) display. Yeah, we're not talking high or new tech. This is a "oh, you know about computers?" project for a friend.

I'm no FFMPEG expert or even regular user. I break it out every 6-9 months to attack some oddball problem like this that comes my way.

Ideally, I'm creating a video slideshow. But the various attempts I've tried result in AVI files that either are "blocky" on playback, or end up with "blinking" sections where some small section changes color as the video plays.

I've tried converting to 1 fps output files, and I've tried creating 10 copies of the input file with sequential names and creating a 1 fps (and trying 3 to 5 fps as an experiment) from the list of sequential files.

I've tried increasing the video data rate -b:v 1000K and that helps. I've tried -b:v 2000k and that helps some, but not a lot.

I try restricting the output framerate because once the image is shown, it really shouldn't change much. If I let FFMPEG use its defaults, I get a 25 fps video that's pretty large, and honestly the quality isn't much better - I still get the "blinking" sections.

I tried one-pass and two-pass encodings based on some examples I found via Google and this site. Two-pass seems slightly better, but it's subjective.

Is there some way to get FFMPEG to make a very high quality copy of the input image initially and then sort of "coast" because it doesn't change?

Per request for command lines tried:

To convert a 640x480 73KB JPG image (per Irfanview, 24bpp, 34849 unique colors)

ffmpeg.exe -f image2 -loop 1 -t 10 -i lion3.jpg -s 640x480 -aspect 4:3 -r 1 -vcodec libxvid -b:v 1000k  lion3_jpg_dr1000k_r01.avi

Quality is pretty good at this, and file size ends up at 100KB.

If I save the file as a GIF (8bpp, 254 unique colors, 214 KB file size) and only a single frame, I tried the following conversion:

ffmpeg.exe -r 1/10 -i lion3.gif -s 640x480 -aspect 4:3 -r 1  -vcodec libxvid -b:v 1000k -vsync cfr lion3_gif_dr1000k_r01.avi

The JPG command didn't work on the GIF (I guess that's not a surprise), and the parameters in the above were pieced together from a number of examples found online.

The resulting AVI of the GIF conversion has a bunch of "twinkling" blocks in parts of the background - there are obvious changes going on during the 10 seconds the video shows on the screen.

I then found examples of putting multiple images together to create a video, so I made ten copies of the image, with 01 to 10 added, and ran this

ffmpeg.exe -f image2 -framerate 1 -i image_%02d.png -c:v libxvid -vtag xvid -bf 0 -pix_fmt yuv420p -vf "fps=1" -b:v 2000K image_img_fps01_2000k_yuv420p_img2_bf0.avi

Result in this was some areas that were initally very blocky and they sort of resolved a bit over time. But in the original image, the same area is a set of small black and dary gray areas, maybe 2x2 pixels. The resulting AVI has blocks looking like 8x8 or bigger.

Hope that helps with understanding of what I was trying.

  • Share full command.
    – Gyan
    Commented Oct 9, 2018 at 4:54
  • 1
    Updated original post with some sample commands that I tried, with description of results. Commented Oct 9, 2018 at 18:01


You must log in to answer this question.

Browse other questions tagged .