Why do the colors change from BMP to FFmpeg?

Why do the colors change from BMP to FFmpeg?

When I encode a particular sequence of BMP image files to AVC/H.264, the colors get shifted. Why does this happen? But if I convert the BMPs to PNGs before running ffmpeg, the video conversion appears correct.

How to convert RGB images to YUV420p?

I am trying to convert RGB frames to YUV420P format in ffmpeg/libav. Following is the code for conversion and also the images before and after conversion. The converted image loses all color information and also the scale changes significantly. Does anybody have idea how to handle this?

What happens when you convert an image to YUV?

Following is the code for conversion and also the images before and after conversion. The converted image loses all color information and also the scale changes significantly. Does anybody have idea how to handle this? I am completely new to ffmpeg/libav! I’m also not sure why you are calling swscale twice! YUV is a planar format.

Can you use a PNG version of a FFmpeg file?

However, using a PNG version of the same input image works great: ffmpeg -i 000.png -pix_fmt yuv420p -vcodec libx264 -profile:v main -crf 16 fourth.mp4 I am using the latest FFmpeg Windows x86-64 build (2016-11-22 Git d316b21):

Is there a way to shift the color of a video?

When I open the output video in different viewers (vlc, windows media player), the resulting color are shifted and appears more green. I have played with pix_fmt and the format filter with no result.

Can a PNG file be captured with ffmpeg?

The video data contains a lot of darker shades of grey. When I capture a single PNG file, everything is fine. Capturing with ffmpeg/avconf using x264 truncates my color space to 16..235. I tried to define -color_range 2 but it didn’t have any effect.

How to reduce the color range in avconv?

Capturing with ffmpeg/avconf using x264 truncates my color space to 16..235. I tried to define -color_range 2 but it didn’t have any effect. I also played with the different pixel formats (yuv444p, yuv420, ..) –without success. This is the command line which produces the reduce color range video: