Opened 2 months ago

Last modified 2 months ago

#10993 new defect

"-sws_flags" ignored in "-lavfi" ("-filter_complex")

Reported by: MasterQuestionable Owned by:
Priority: important Component: avfilter
Version: git-master Keywords: sws_flags lavfi filter_complex
Cc: MasterQuestionable Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by MasterQuestionable)

͏    E.g.
("-lavfi" vs. "-vf")
͏    ffmpeg -v debug -hide_banner -nostdin -nostats -i "W020170309545700291313.jpg" -lavfi "scale=iw/2:-2" -sws_flags gauss+accurate_rnd+print_info -compression_level 1 -pred none "scale.lavfi.png"
͏    ffmpeg -v debug -hide_banner -nostdin -nostats -i "W020170309545700291313.jpg" -vf "scale=iw/2:-2" -sws_flags gauss+accurate_rnd+print_info -compression_level 1 -pred none "scale.vf.png"


͏    See also:

Change History (2)

comment:1 by Gyan, 2 months ago

For complex filtergraphs, add sws_flags=args; right at the beginning of the graph, e.g.


comment:2 by MasterQuestionable, 2 months ago

Description: modified (diff)

͏    Thanks for mentioning.

͏    ----

͏    Matters most:
͏    ffmpeg -v debug -hide_banner -nostdin -nostats -i "W020170309545700135684.jpg" -i "W020170309545700291313.jpg" -lavfi "hstack,format=rgb24" -sws_flags gauss+accurate_rnd+print_info -lossless 1 -q 100 -compression_level 6 "gauss-full_chroma_int.webp"

͏    Per the doc "format" doesn't support "flags":

͏    Hacky workaround required:
͏    ffmpeg -v debug -hide_banner -nostdin -nostats -i "W020170309545700135684.jpg" -i "W020170309545700291313.jpg" -lavfi "sws_flags=gauss+accurate_rnd+print_info; hstack,format=rgb24" -lossless 1 -q 100 -compression_level 6 "gauss-full_chroma_int.webp"
͏    (per [ ])

͏    And there seems to be no solution for "-sws_dither", "-param0", "-param1": which may matter at times.

Last edited 2 months ago by MasterQuestionable (previous) (diff)
Note: See TracTickets for help on using tickets.