Opened 23 months ago
Last modified 21 months ago
#11222 new enhancement
Suboptimal auto-format selection for filter-chain
| Reported by: | MasterQuestionable | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avfilter |
| Version: | git-master | Keywords: | format yuv420p |
| Cc: | MasterQuestionable | Blocked By: | |
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
͏ Debug output:
[graph -1 input from stream 0:0] w:725 h:725 pixfmt:argb tb:1/25 fr:25/1 sar:0/1 csp:unknown range:unknown
[format] Setting 'pix_fmts' to value 'bgra|yuv420p|yuva420p'
[format] Setting 'color_ranges' to value 'tv'
[auto_scale_0] w:iw h:ih flags:'͏' interl:0
[Parsed_nlmeans_0] auto-inserting filter 'auto_scale_0' between the filter 'graph -1 input from stream 0:0' and the filter 'Parsed_nlmeans_0'
[AVFilterGraph] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
[auto_scale_0] w:725 h:725 fmt:argb csp:gbr range:pc sar:0/1 -> w:725 h:725 fmt:yuv420p csp:unknown range:tv sar:0/1 flags:0x00000004
͏ "yuv420p" selected for RGB input..?
͏ E.g. commmand:
͏ ffmpeg -v debug -hide_banner -nostdin -nostats -f lavfi -i "testsrc" -vframes 1 -vf "nlmeans=1" -c:v libwebp -lossless 1 -q 100 -compression_level 6 -f null -
͏ .
͏ Original input is WebP Lossless.
͏ Workaround is adding "-pix_fmt rgb24" alike.



͏ It appears alike malapropos YUV 4:2:0 assertion might be quite prevalent:
͏ https://trac.ffmpeg.org/ticket/10989
͏ .
͏ https://trac.ffmpeg.org/wiki/Capture/Desktop?action=diff&version=25
͏ https://github.com/FFmpeg/FFmpeg/commit/7ca71b79f2b3256a0eef1a099b857ac9e4017e36
͏ https://trac.ffmpeg.org/ticket/9374#comment:12
͏ https://trac.ffmpeg.org/ticket/9167