[FFmpeg-user] rgb8
Michael Koch
astroelectronic at t-online.de
Tue May 30 21:21:27 EEST 2023
Am 30.05.2023 um 14:13 schrieb Paul B Mahol:
>
> rgb8 is as obvious from ffmpeg output:
>
> IO... rgb8 3 8 2-3-3
>
> It means RED get 2 bits, GREEN get 3 bits and BLUE get 3 bits.
> It is using 1 byte, same like gray format.
I have a ASI178MM camera. This camera is normally used for astronomical
observations with special software. But there does also exist a
DirectShow driver.
I checked the options with this command:
ffmpeg -list_options 1 -f dshow -i video="ASI178MM Camera (ZWO Design)"
This is the output:
[dshow @ 00000203f5b315c0] pixel_format=rgb8 min s=3096x2080
fps=1.0842e-12 max s=3096x2080 fps=30
[dshow @ 00000203f5b315c0] pixel_format=rgb8 min s=1280x960
fps=1.0842e-12 max s=1280x960 fps=30
[dshow @ 00000203f5b315c0] pixel_format=rgb8 min s=1280x800
fps=1.0842e-12 max s=1280x800 fps=30
[dshow @ 00000203f5b315c0] pixel_format=rgb8 min s=1280x720
fps=1.0842e-12 max s=1280x720 fps=30
[dshow @ 00000203f5b315c0] pixel_format=rgb8 min s=1024x768
fps=1.0842e-12 max s=1024x768 fps=30
[dshow @ 00000203f5b315c0] pixel_format=rgb8 min s=1024x600
fps=1.0842e-12 max s=1024x600 fps=30
[dshow @ 00000203f5b315c0] pixel_format=rgb8 min s=960x960
fps=1.0842e-12 max s=960x960 fps=30
[dshow @ 00000203f5b315c0] pixel_format=rgb8 min s=800x800
fps=1.0842e-12 max s=800x800 fps=30
[dshow @ 00000203f5b315c0] pixel_format=rgb8 min s=800x600
fps=1.0842e-12 max s=800x600 fps=30
[dshow @ 00000203f5b315c0] pixel_format=rgb8 min s=800x480
fps=1.0842e-12 max s=800x480 fps=30
[dshow @ 00000203f5b315c0] pixel_format=rgb8 min s=768x576
fps=1.0842e-12 max s=768x576 fps=30
[dshow @ 00000203f5b315c0] pixel_format=rgb8 min s=720x480
fps=1.0842e-12 max s=720x480 fps=30
[dshow @ 00000203f5b315c0] pixel_format=rgb8 min s=640x480
fps=1.0842e-12 max s=640x480 fps=30
[dshow @ 00000203f5b315c0] pixel_format=rgb8 min s=480x320
fps=1.0842e-12 max s=480x320 fps=30
[dshow @ 00000203f5b315c0] pixel_format=rgb8 min s=320x240
fps=1.0842e-12 max s=320x240 fps=30
[dshow @ 00000203f5b315c0] pixel_format=rgb8 min s=320x200
fps=1.0842e-12 max s=320x200 fps=30
As you can see, the only available pixel format is rgb8. This is very
strange, because it's a monochrome camera. I think this is a bug in the
DirectShow driver, and the pixel format is in fact 8-bit gray.
To confirm this, I did write a raw frame from the camera to a file:
ffmpeg -f dshow -video_size 1280x800 -framerate 5 -pixel_format rgb8 -i
video="ASI178MM Camera (ZWO Design)" -f rawvideo -frames 1 -y test.raw
Then I did read this file, assuming that the pixel format is gray:
ffmpeg -s 1280x800 -pixel_format gray -f rawvideo -i test.raw -y gray.png
The result looks correct. Is it possible to do this in one command line?
I mean just tell FFmpeg that the pixel format isn't rgb8 but gray,
without making any modifications to the data?
Michael
More information about the ffmpeg-user
mailing list