[FFmpeg-user] rgb8

Michael Koch astroelectronic at t-online.de
Tue May 30 21:31:49 EEST 2023


Am 30.05.2023 um 20:28 schrieb Reindl Harald:
>
>
> Am 30.05.23 um 20:21 schrieb Michael Koch:
>> 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?
>
> parameters before the input file are *input params*
>
> so why don't you change "-pixel_format rgb8" to "-pixel_format gray" 
> in the first command line when you say it works in the second one?

When reading from the camera, the pixel format must be rgb8 because this 
is the only format supported by the DirectShow driver. All other pixel 
formats give error message.

Michael



More information about the ffmpeg-user mailing list