I have an bayer image .bmp
I would like to debayer with FFMpeg, I thought that possibly FFMpeg knows to debayer it by default so I tried to use such a very simple query
ffmpeg -i input.bmp output.png
but output.png
looks gray, so ffmpeg doesn't apply debayer automatically. I tried to figure out if is it possible with ffmpeg, but there is almost nothing about it on google.
Image example (it is too large to upload it here): https://drive.google.com/file/d/1V8HwOuIo9PBX3ix0eKFQFGimskU_H0mN/view?usp=sharing
How to do it?
UPD
this is what I tried to do
ffmpeg -y -i D:\Buffer\Bayer\Time0000000_img.bmp -pix_fmt gray D:\Buffer\Bayer\bmp\test11.y -hide_banner
ffmpeg -y -pixel_format bayer_rggb8 -video_size 4104x3006 -i D:\Buffer\Bayer\bmp\test11.y D:\Buffer\Bayer\bmp\result1.png -hide_banner
and there is an error I get
Input #0, image2, from 'D:\Buffer\Bayer\bmp\test11.y':
Duration: 00:00:00.04, start: 0.000000, bitrate: 1013196 kb/s
Stream #0:0: Video: rawvideo ([186]RG[8] / 0x84752BA), bayer_rggb8, 4104x3006, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> png (native))
Press [q] to stop, [?] for help
[rawvideo @ 0000027da39d3f80] Invalid buffer size, packet size 5065984 < expected frame_size 12336624
Error while decoding stream #0:0: Invalid argument
Output #0, image2, to 'D:\Buffer\Bayer\bmp\result1.png':
Metadata:
encoder : Lavf58.29.100
Stream #0:0: Video: png, rgb24, 4104x3006, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc58.54.100 png
frame= 0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
Conversion failed!
if I change the resolution to 1920x1080
like this
ffmpeg -y -pixel_format bayer_rggb8 -video_size 1920x1080 -i D:\Buffer\Bayer\bmp\test11.y D:\Buffer\Bayer\bmp\result1.png -hide_banner
I don't get an error, but the output is wrong