Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#8319 closed defect (invalid)

Funny little stuff... (x264rgb `pix_fmt`)

Reported by: gdgsdg123 Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

C:\>ffmpeg -i "INPUT.mkv" -an -vframes 1 -c:v libx264rgb -preset ultrafast -qp 0 -x264-params "keyint=1" -pix_fmt gbrp -flags +bitexact -fflags +bitexact -map_metadata -1 "gbrp.avi"
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.1.1 (GCC) 20190807
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[matroska,webm @ 0000000000511fc0] decoding for stream 0 failed
Input #0, matroska,webm, from 'INPUT.mkv':
  Metadata:
    ENCODER         : Lavf58.26.101
  Duration: 00:01:27.30, start: 0.000000, bitrate: 563262 kb/s
    Stream #0:0: Video: h264 (High 4:4:4 Predictive), gbrp(tv, gbr/unknown/unknown, progressive), 5120x1440 [SAR 1:1 DAR 32:9], 30 fps, 30 tbr, 1k tbn, 60 tbc (default)
    Metadata:
      ENCODER         : Lavc58.47.106 libx264rgb
      DURATION        : 00:01:27.300000000
    Stream #0:1: Audio: flac, 48000 Hz, stereo, s16 (default)
    Metadata:
      ENCODER         : Lavc58.47.106 flac
      DURATION        : 00:01:27.300000000
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264rgb))
Press [q] to stop, [?] for help
Incompatible pixel format 'gbrp' for codec 'libx264rgb', auto-selecting format 'bgr24'
[libx264rgb @ 00000000037600c0] using SAR=1/1
[libx264rgb @ 00000000037600c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264rgb @ 00000000037600c0] profile High 4:4:4 Intra, level 5.1, 4:4:4, 8-bit
Output #0, avi, to 'gbrp.avi':
    Stream #0:0: Video: h264 (libx264rgb) (H264 / 0x34363248), bgr24, 5120x1440 [SAR 1:1 DAR 32:9], q=-1--1, 30 fps, 30 tbn, 30 tbc (default)
    Metadata:
      encoder         : Lavc libx264rgb
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame=    1 fps=0.0 q=0.0 Lsize=    6234kB time=00:00:00.03 bitrate=1532176.8kbits/s speed=0.0531x
video:6229kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.090181%
[libx264rgb @ 00000000037600c0] frame I:1     Avg QP: 0.00  size:6378254
[libx264rgb @ 00000000037600c0] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264rgb @ 00000000037600c0] coded y,u,v intra: 99.0% 98.3% 96.7%
[libx264rgb @ 00000000037600c0] i16 v,h,dc,p: 22% 37% 35%  6%
[libx264rgb @ 00000000037600c0] kb/s:1530780.88

C:\>ffprobe -hide_banner "gbrp.avi"
[avi @ 0000000000463700] Stream #0: not enough frames to estimate rate; consider increasing probesize
[avi @ 0000000000463700] decoding for stream 0 failed
Input #0, avi, from 'gbrp.avi':
  Duration: 00:00:00.03, start: 0.000000, bitrate: 1532176 kb/s
    Stream #0:0: Video: h264 (High 4:4:4 Intra) (H264 / 0x34363248), gbrp(tv, gbr/unknown/unknown, progressive), 5120x1440 [SAR 1:1 DAR 32:9], 30 fps, 30 tbr, 30 tbn, 60 tbc


Highlight:

Incompatible pixel format 'gbrp' for codec 'libx264rgb', auto-selecting format 'bgr24'
    Stream #0:0: Video: h264 (High 4:4:4 Intra) (H264 / 0x34363248), gbrp(tv, gbr/unknown/unknown, progressive), 5120x1440 [SAR 1:1 DAR 32:9], 30 fps, 30 tbr, 30 tbn, 60 tbc




Extra:
-pix_fmt bgr24 and -pix_fmt rgb24 can have bit-identical output... at least in the above case.

Change History (3)

comment:1 by Elon Musk, 5 years ago

Resolution: wontfix
Status: newclosed

libx264 encoder does not support planar rgb input.

comment:2 by Carl Eugen Hoyos, 5 years ago

Resolution: wontfixinvalid

comment:3 by Carl Eugen Hoyos, 5 years ago

Priority: minornormal
Type: enhancementdefect
Note: See TracTickets for help on using tickets.