I want to create with ffmpeg a pure white video to use it as background. I mean a video that, played in a computer, you see as white. (In the examples I will pipe the output to ffplay so you don't need to delete the video later.)
To create a 3s 640x480 video (25 fps by default):
ffmpeg -f lavfi -i color=white:640x480:d=3 -f matroska - | ffplay -autoexit -
This is a small rectangle of the output against superuser page (which in my browser shows as white).
Looking for an answer, I came to this question. The explanation is provided by Mulvya:
The padding is RGB 235, which is the upper limit in conventional video. So, a video player will expand 235 to show white. – Mulvya Oct 23 '15 at 17:44
But I found no player that show it as white. I tried with ffplay, MPC-HC and VLC both piping and creating an intermediate file.
With images as in the question, the solution seems to be adding the -format rgb32
option. But I get the same result with
ffmpeg -f lavfi -i color=white:640x480:d=3 -format rgb32 -f matroska - | ffplay -autoexit -
The -pixel_format
option doesn't work either.
So... how do you create a pure white background video with ffmpeg?
-color_range 1
just before-f matroska
. Also, upgrade your ffmpeg, in case you're using an old version.ffplay -f lavfi -i color=white:640x480:d=3