[FFmpeg-trac] #9189(avfilter:new): unexpected rgb component order c=3 for -vf waveform

FFmpeg trac at avcodec.org
Wed Apr 14 23:11:37 EEST 2021


#9189: unexpected rgb component order c=3 for -vf waveform
-------------------------------------+-------------------------------------
             Reporter:  pdr0         |                     Type:
                                     |  enhancement
               Status:  new          |                 Priority:  minor
            Component:  avfilter     |                  Version:
                                     |  unspecified
             Keywords:  vf waveform  |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:

 c=1 red channel
 c=2 green channel
 *c=3 expect blue , but get a red,green stack instead
 c=4 blue channel


 How to reproduce:
 {{{
 ffmpeg -report -f lavfi -i rgbtestsrc=rate=24:duration=1:s=640x480 -vf
 format=rgb24,waveform=c=3 -frames:v 1 c3.png
 }}}




 {{{
 ffmpeg -report -f lavfi -i "rgbtestsrc=rate=24:duration=1:s=640x480" -vf
 "format=rgb24,waveform=c=3" -frames:v 1 c3.png -y
 ffmpeg version 2021-04-14-git-c5ca18fd1b-full_build-www.gyan.dev Copyright
 (c) 2000-2021 the FFmpeg developers
   built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
   configuration: --enable-gpl --enable-version3 --enable-static --disable-
 w32threads --disable-autodetect --enable-fontconfig --enable-iconv
 --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-
 libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh
 --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca
 --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e
 --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265
 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx
 --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi
 --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf
 --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec
 --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-
 libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-
 libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb
 --enable-libmp3lame --enable-libshine --  libavutil      56. 72.100 / 56.
 72.100
   libavcodec     58.136.101 / 58.136.101
   libavformat    58. 78.100 / 58. 78.100
   libavdevice    58. 14.100 / 58. 14.100
   libavfilter     7.111.100 /  7.111.100
   libswscale      5. 10.100 /  5. 10.100
   libswresample   3. 10.100 /  3. 10.100
   libpostproc    55. 10.100 / 55. 10.100
 Splitting the commandline.
 Reading option '-report' ... matched as option 'report' (generate a
 report) with argument '1'.
 Reading option '-f' ... matched as option 'f' (force format) with argument
 'lavfi'.
 Reading option '-i' ... matched as input url with argument
 'rgbtestsrc=rate=24:duration=1:s=640x480'.
 Reading option '-vf' ... matched as option 'vf' (set video filters) with
 argument 'format=rgb24,waveform=c=3'.
 Reading option '-frames:v' ... matched as option 'frames' (set the number
 of frames to output) with argument '1'.
 Reading option 'c3.png' ... matched as output url.
 Reading option '-y' ... matched as option 'y' (overwrite output files)
 with argument '1'.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option report (generate a report) with argument 1.
 Applying option y (overwrite output files) with argument 1.
 Successfully parsed a group of options.
 Parsing a group of options: input url
 rgbtestsrc=rate=24:duration=1:s=640x480.
 Applying option f (force format) with argument lavfi.
 Successfully parsed a group of options.
 Opening an input file: rgbtestsrc=rate=24:duration=1:s=640x480.
 detected 8 logical cores
 [Parsed_rgbtestsrc_0 @ 0000001b51775000] Setting 'rate' to value '24'
 [Parsed_rgbtestsrc_0 @ 0000001b51775000] Setting 'duration' to value '1'
 [Parsed_rgbtestsrc_0 @ 0000001b51775000] Setting 's' to value '640x480'
 [Parsed_rgbtestsrc_0 @ 0000001b51775000] size:640x480 rate:24/1
 duration:1.000000 sar:1/1
 [AVFilterGraph @ 0000001b51772040] query_formats: 2 queried, 1 merged, 0
 already done, 0 delayed
 [lavfi @ 0000001b51770c40] All info found
 Input #0, lavfi, from 'rgbtestsrc=rate=24:duration=1:s=640x480':
   Duration: N/A, start: 0.000000, bitrate: N/A
   Stream #0:0, 1, 1/24: Video: rawvideo (RGBA / 0x41424752), rgba, 640x480
 [SAR 1:1 DAR 4:3], 24 tbr, 24 tbn, 24 tbc
 Successfully opened the file.
 Parsing a group of options: output url c3.png.
 Applying option vf (set video filters) with argument
 format=rgb24,waveform=c=3.
 Applying option frames:v (set the number of frames to output) with
 argument 1.
 Successfully parsed a group of options.
 Opening an output file: c3.png.
 Successfully opened the file.
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo (native) -> png (native))
 Press [q] to stop, [?] for help
 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless
 if it occurs once at the start per stream)
 [rawvideo @ 0000001b5177d6c0] PACKET SIZE: 1228800, STRIDE: 2560
 [Parsed_format_0 @ 0000001b4f6e8a40] Setting 'pix_fmts' to value 'rgb24'
 [Parsed_waveform_1 @ 0000001b5178c540] Setting 'c' to value '3'
 [graph 0 input from stream 0:0 @ 0000001b5178c640] Setting 'video_size' to
 value '640x480'
 [graph 0 input from stream 0:0 @ 0000001b5178c640] Setting 'pix_fmt' to
 value '26'
 [graph 0 input from stream 0:0 @ 0000001b5178c640] Setting 'time_base' to
 value '1/24'
 [graph 0 input from stream 0:0 @ 0000001b5178c640] Setting 'pixel_aspect'
 to value '1/1'
 [graph 0 input from stream 0:0 @ 0000001b5178c640] Setting 'frame_rate' to
 value '24/1'
 [graph 0 input from stream 0:0 @ 0000001b5178c640] w:640 h:480 pixfmt:rgba
 tb:1/24 fr:24/1 sar:1/1
 [format @ 0000001b5178cb40] Setting 'pix_fmts' to value
 'rgb24|rgba|rgb48be|rgba64be|pal8|gray|ya8|gray16be|ya16be|monob'
 [auto_scaler_0 @ 0000001b5178bf40] Setting 'flags' to value 'bicubic'
 [auto_scaler_0 @ 0000001b5178bf40] w:iw h:ih flags:'bicubic' interl:0
 [Parsed_format_0 @ 0000001b4f6e8a40] auto-inserting filter 'auto_scaler_0'
 between the filter 'graph 0 input from stream 0:0' and the filter
 'Parsed_format_0'
 [auto_scaler_1 @ 0000001b5178d140] Setting 'flags' to value 'bicubic'
 [auto_scaler_1 @ 0000001b5178d140] w:iw h:ih flags:'bicubic' interl:0
 [Parsed_waveform_1 @ 0000001b5178c540] auto-inserting filter
 'auto_scaler_1' between the filter 'Parsed_format_0' and the filter
 'Parsed_waveform_1'
 [auto_scaler_2 @ 0000001b5178ce40] Setting 'flags' to value 'bicubic'
 [auto_scaler_2 @ 0000001b5178ce40] w:iw h:ih flags:'bicubic' interl:0
 [format @ 0000001b5178cb40] auto-inserting filter 'auto_scaler_2' between
 the filter 'Parsed_waveform_1' and the filter 'format'
 [AVFilterGraph @ 0000001b5177a940] query_formats: 5 queried, 1 merged, 3
 already done, 0 delayed
 [auto_scaler_1 @ 0000001b5178d140] picking gbrp out of 41 ref:rgb24
 alpha:0
 [Parsed_waveform_1 @ 0000001b5178c540] picking gbrp out of 2 ref:gbrp
 alpha:0
 [auto_scaler_2 @ 0000001b5178ce40] picking rgb24 out of 10 ref:gbrp
 alpha:0
 [swscaler @ 0000001b517950c0] Forcing full internal H chroma due to input
 having non subsampled chroma
 [auto_scaler_0 @ 0000001b5178bf40] w:640 h:480 fmt:rgba sar:1/1 -> w:640
 h:480 fmt:rgb24 sar:1/1 flags:0x4
 [swscaler @ 0000001b517ac300] Forcing full internal H chroma due to input
 having non subsampled chroma
 [auto_scaler_1 @ 0000001b5178d140] w:640 h:480 fmt:rgb24 sar:1/1 -> w:640
 h:480 fmt:gbrp sar:1/1 flags:0x4
 [swscaler @ 0000001b517d7fc0] Forcing full internal H chroma due to input
 having non subsampled chroma
 [auto_scaler_2 @ 0000001b5178ce40] w:640 h:512 fmt:gbrp sar:1/1 -> w:640
 h:512 fmt:rgb24 sar:1/1 flags:0x4
 Output #0, image2, to 'c3.png':
   Metadata:
     encoder         : Lavf58.78.100
   Stream #0:0, 0, 1/24: Video: png, rgb24(pc, progressive), 640x512 [SAR
 1:1 DAR 5:4], q=2-31, 200 kb/s, 24 fps, 24 tbn
     Metadata:
       encoder         : Lavc58.136.101 png
 Clipping frame in rate conversion by 0.000008
 frame=    1 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=
 0x
 No more output streams to write to, finishing.
 [image2 @ 0000001b5177db80] Opening 'c3.png' for writing
 [file @ 0000001b517f9180] Setting default whitelist 'file,crypto,data'
 [AVIOContext @ 0000001b517ec680] Statistics: 0 seeks, 1 writeouts
 frame=    1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A
 speed=0.781x
 video:2kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 Input file #0 (rgbtestsrc=rate=24:duration=1:s=640x480):
   Input stream #0:0 (video): 1 packets read (1228800 bytes); 1 frames
 decoded;
   Total: 1 packets (1228800 bytes) demuxed
 Output file #0 (c3.png):
   Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (2161
 bytes);
   Total: 1 packets (2161 bytes) muxed
 1 frames successfully decoded, 0 decoding errors
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/9189>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list