[FFmpeg-user] rgb8

Michael Koch astroelectronic at t-online.de
Wed Jun 7 20:36:09 EEST 2023


Am 31.05.2023 um 09:36 schrieb Reindl Harald:
>
>
> Am 31.05.23 um 09:28 schrieb Michael Koch:
>>>> Couldn't this be simplified with a new filter "set_pixel_format" 
>>>> which tells FFmpeg to interpret the data as a different pixel 
>>>> format, without making any modifications to the data?
>>>> In my case the data is already correct. It's only labeled incorrectly.
>>>
>>> "-pixel_format rgb8" as input parm tells ffmpeg exactly that
>>
>> yes, but I can't use "-pixel_format gray" because the DirectShow 
>> driver accepts only those pixel formats that are listed with "ffmpeg 
>> -list_options 1 -f dshow -i video="ASI178MM Camera (ZWO Design)"
>> There is only one pixel format listed and that's "rgb8"
> for a FFMPEG INPUT PARAM it's irrelevant what the driver supports - it 
> don't tell the source driver anything but tells ffmpeg to ignore it's 
> auto-detection
>
> it's the same with "-f" as input param when the source has some weird 
> wrong header

I think the problem is that the input option "-pixel_format" is used for 
two things. It does 1. tell the directshow driver which pixel format it 
shall use, and 2. it does also tell the following ffmpeg filters what's 
the pixel format of the input. Unfortunately for 1. only those pixel 
formats are allowed that are supported by the directshow driver.

Michael



More information about the ffmpeg-user mailing list