Why is ffmpeg producing a background? I am a chemist and since a few weeks I am making short videos with ffmpeg by combining images, I am using the command below (for some reason without profile:v high, powerpoint crashes when I would import a video).
ffmpeg [...] -r 24 -preset slow -profile:v high -level:v 4.0 -pix_fmt yuv420p -c:v libx264 -crf 8 output.mp4

The images are from a raytracer and their background is perfectly white (I checked), however the output movies have a slight background (some kind of beige). Why ? Is it from one of my parameters ? I would like if possible to have a perfect white background while keeping high quality,

I already tried to delete the background of the images with ImageMagick, it is working but it lower the quality.
Thanks
Its impossible to say for sure, Because you dont say what your input format is, But there is most likely a color space/range conversion occurring.
You may may need to set the those values. you may need to specificity the agues to use for the conversion as well.
This post should explain it.
https://mux.com/blog/your-browser-and-my-browser-see-different-colors/
I don't cover color range in that post. But you most likely want to use full range.