Le quintidi 25 messidor, an CCXXIII, Carl Eugen Hoyos a écrit :
> I can confirm that there may be an issue 
> but it is not overlay-related:
> $ ffmpeg -i input -vf 
> "split[x][z];[x]format=gray[x1];[x1]nullsink" 
> -strict -2 -vcodec jpeg2000 -ss 1 out1.avi
> 
> $ ffmpeg -ss 1 -i input -vf 
> "split[x][z];[x]format=gray[x1];[x1]nullsink" 
> -strict -2 -vcodec jpeg2000 out2.avi

If the issue is that the output is converted to gray too, then this is the
expected behaviour.

Let me explain. I suspect users easily assume that "format=foo" means
"convert to pixel format foo", but it does not; it really means "make sure
the frames are in pixel format foo here". It usually involves converting at
some point before, but not necessarily right before, and not necessarily a
plain convert.

The idea is that libavfilter tries to minimize the number of conversions.
For example, assume the filter graph is "frobnicate,foobarify,format=foo",
frobnicate supports many output formats including foo, and foobarify
supports many formats provided it is the same at input and output (a lot of
filters are like that). Then libavfilter will not convert at all, it will
just select foo as the pixel format for all the frobnicate-foobarify-format
branch.

If there are no filter capable of outputting in pixel format foo, then
libavfilter will have to convert, and it does so by inserting the scale
filter somewhere. The exact place where it is inserted depends on the
particulars of the filter graph. Usually, it does not matter.

For the rare cases where it does matter, for example to be sure to
deinterlace before converting, you need to insert the scale filter
explicitly at the point you want the format conversion.

In this particular case, my guess is that libavfilter decided to insert the
scale filter before split. Insert explicitly after split and it should work
as expected.

I realize the documentation for the format filter is misleading.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

Reply via email to