[FFmpeg-trac] #8371(undetermined:closed): ffmpeg’s output section and ffprobe’s input section: Display the same pixel format

FFmpeg trac at avcodec.org
Thu Nov 7 19:35:29 EET 2019


#8371: ffmpeg’s output section and ffprobe’s input section: Display the same pixel
format
-------------------------------------+-------------------------------------
             Reporter:  Kdmeizk      |                    Owner:
                 Type:  defect       |                   Status:  closed
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  git-master   |               Resolution:  invalid
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by Kdmeizk):

 Replying to [comment:3 gdgsdg123]:
 > [https://trac.ffmpeg.org/ticket/8319 Similar Case]
 >
 > Is it possible for `-pix_fmt nv12` and `-pix_fmt yuv420p` to have bit-
 identical output in your case?..
 Yes, but there is no problem. If I am right, here is why:
 {{{
 x264-r2969-d4099dd.exe --fullhelp
 […]
       --input-csp <string>    Specify input colorspace format for raw
 input
                               - valid csps for `raw' demuxer:
                                 i400, i420, yv12, nv12, nv21, i422, yv16,
 nv16,
                                 yuyv, uyvy, i444, yv24, bgr, bgra, rgb
                               - valid csps for `lavf' demuxer:
                                 yuv420p, yuyv422, rgb24, bgr24, yuv422p,
                                 yuv444p, yuv410p, yuv411p, gray, monow,
 monob,
                                 pal8, yuvj420p, yuvj422p, yuvj444p,
 uyvy422,
                                 uyyvyy411, bgr8, bgr4, bgr4_byte, rgb8,
 rgb4,
                                 rgb4_byte, nv12, nv21, argb, rgba, abgr,
 bgra,
                                 gray16be, gray16le, yuv440p, yuvj440p,
                                 yuva420p, rgb48be, rgb48le, rgb565be,
 rgb565le,
                                 rgb555be, rgb555le, bgr565be, bgr565le,
                                 bgr555be, bgr555le, vaapi_moco,
 vaapi_idct,
                                 vaapi_vld, yuv420p16le, yuv420p16be,
                                 yuv422p16le, yuv422p16be, yuv444p16le,
                                 yuv444p16be, dxva2_vld, rgb444le,
 rgb444be,
                                 bgr444le, bgr444be, ya8, bgr48be, bgr48le,
                                 yuv420p9be, yuv420p9le, yuv420p10be,
                                 yuv420p10le, yuv422p10be, yuv422p10le,
                                 yuv444p9be, yuv444p9le, yuv444p10be,
                                 yuv444p10le, yuv422p9be, yuv422p9le, gbrp,
                                 gbrp9be, gbrp9le, gbrp10be, gbrp10le,
 gbrp16be,
                                 gbrp16le, yuva422p, yuva444p, yuva420p9be,
                                 yuva420p9le, yuva422p9be, yuva422p9le,
                                 yuva444p9be, yuva444p9le, yuva420p10be,
                                 yuva420p10le, yuva422p10be, yuva422p10le,
                                 yuva444p10be, yuva444p10le, yuva420p16be,
                                 yuva420p16le, yuva422p16be, yuva422p16le,
                                 yuva444p16be, yuva444p16le, vdpau,
 xyz12le,
                                 xyz12be, nv16, nv20le, nv20be, rgba64be,
                                 rgba64le, bgra64be, bgra64le, yvyu422,
 ya16be,
                                 ya16le, gbrap, gbrap16be, gbrap16le, qsv,
 mmal,
                                 d3d11va_vld, cuda, 0rgb, rgb0, 0bgr, bgr0,
                                 yuv420p12be, yuv420p12le, yuv420p14be,
                                 yuv420p14le, yuv422p12be, yuv422p12le,
                                 yuv422p14be, yuv422p14le, yuv444p12be,
                                 yuv444p12le, yuv444p14be, yuv444p14le,
                                 gbrp12be, gbrp12le, gbrp14be, gbrp14le,
                                 yuvj411p, bayer_bggr8, bayer_rggb8,
                                 bayer_gbrg8, bayer_grbg8, bayer_bggr16le,
                                 bayer_bggr16be, bayer_rggb16le,
 bayer_rggb16be,
                                 bayer_gbrg16le, bayer_gbrg16be,
 bayer_grbg16le,
                                 bayer_grbg16be, xvmc, yuv440p10le,
 yuv440p10be,
                                 yuv440p12le, yuv440p12be, ayuv64le,
 ayuv64be,
                                 videotoolbox_vld, p010le, p010be,
 gbrap12be,
                                 gbrap12le, gbrap10be, gbrap10le,
 mediacodec,
                                 gray12be, gray12le, gray10be, gray10le,
 p016le,
                                 p016be, d3d11, gray9be, gray9le,
 gbrpf32be,
                                 gbrpf32le, gbrapf32be, gbrapf32le,
 drm_prime,
                                 opencl, gray14be, gray14le, grayf32be,
                                 grayf32le, yuva422p12be, yuva422p12le,
                                 yuva444p12be, yuva444p12le
       --output-csp <string>   Specify output colorspace ["i420"]
                                   - i400, i420, i422, i444, rgb
 }}}
 [https://trac.ffmpeg.org/ticket/8364#comment:3 ffmpeg uses the library],
 so to simplify set “-pix_fmt” to “nv12” means set “--input-csp” to “nv12”.
 Then “--output-csp” has not the choice “nv12”, so “i420” is set because
 the main difference is the [https://wiki.videolan.org/YUV/ “planar
 organization” where “nv12” = “semi-planar” and “i420” = “planar”]–there is
 no loss between “i420” and “nv12”.
 In the case of “yuv420p”, “-pix_fmt yuv420p” means “--input-csp yuv420p”
 and “--output-csp i420”. So the output files are identical.

 For your ticket:
 * “gbrp” is “planar” and “bgr24”/“rgb24” is “packed”;
 * the main difference between “bgr24” and “rgb24” is the order of RGB;
 * there is no loss between “gbrp” and “bgr24” and “rgb24”.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8371#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list