[FFmpeg-user] Question about -noauto_conversion_filters

Gyan Doshi ffmpeg at gyani.pro
Mon Sep 14 14:24:33 EEST 2020

On 14-09-2020 03:41 pm, Michael Koch wrote:
> Am 14.09.2020 um 11:26 schrieb Gyan Doshi:
>> On 14-09-2020 02:47 pm, Michael Koch wrote:
>>> ffmpeg -v verbose -f lavfi -i testsrc2=s=svga:d=5,format=yuv422p10le 
>>> -vf format=rgb48le,lut3d="VLog_to_V709.cube",format=yuv422p10le 
>>> -noauto_conversion_filters -pix_fmt yuv422p10le -c:v h264 -y out.mov 
>> Format conversion is carried out by libswscale and auto conversion 
>> inserts the scale filter.
>> So,
>>     ffmpeg -v verbose -f lavfi -i 
>> testsrc2=s=svga:d=5,format=yuv422p10le -vf 
>> scale,format=rgb48le,lut3d="VLog_to_V709.cube",scale 
>> -noauto_conversion_filters -pix_fmt yuv422p10le -c:v h264 -y out.mov
>> The final format filter is redundant with -pix_fmt, so I removed one 
>> of them.
> Thank you, with "scale" it works fine. Although it's hard to 
> understand what "scale" (without any options) is actually doing.
> I have another question. Is this the correct and easiest way to make a 
> 10-bit test video?
> -f lavfi -i testsrc2=s=svga:d=5,format=yuv422p10le
> In the documentation is written
> "The |testsrc2|source is similar to testsrc, but supports more pixel 
> formats instead of just |rgb24|. This allows using it as an input for 
> other tests without requiring a format conversion."
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> But in my above command, I think "format=yuv422p10le" is a format 
> conversion.

Each filter presents a list of input formats they can work with and a 
list of output formats they can directly generate. The framework 
inspects adjacent filters and sets a compatible common format for the 
outputs and inputs when possible. If not, it sets one of the available 
output formats for the preceding filter and one from input formats for 
the following filter and inserts a scale filter to convert  between 
those. This process is format negotiation. The format filter doesn't 
carry out the conversion itself - it inserts scale which in turn invokes 
libswscale. scale without any args defaults to the source W and H. But 
for pixel formats, its output format is constrained by the following 
format filter. That triggers a format conversion by libswscale.



More information about the ffmpeg-user mailing list