[FFmpeg-trac] #8359(undetermined:closed): FFmpeg’s nv12 libx264: ffmpeg encodes in “yuv420p” instead of “nv12”

FFmpeg trac at avcodec.org
Tue Nov 5 03:41:30 EET 2019


#8359: FFmpeg’s nv12 libx264: ffmpeg encodes in “yuv420p” instead of “nv12”
-------------------------------------+-------------------------------------
             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:1 heleppkes]:
 > The h264 bitstream carries chroma always in the same way. How a decoder
 chooses to represent it is up to the implementation, and the ffmpeg h264
 decoder choose yuv420p to do it.
 The following output files are byte-to-byte identical:
 {{{
 ffmpeg-20191101-53c21c2-win64-static\bin\ffmpeg.exe -i 00006.m2ts -to
 00:00:05 -c:v libx264 -pix_fmt yuv420p -crf 0 -an output_yuv420p.nut
 ffmpeg-20191101-53c21c2-win64-static\bin\ffmpeg.exe -i 00006.m2ts -to
 00:00:05 -c:v libx264 -pix_fmt nv12 -crf 0 -an output_nv12.nut
 }}}
 But it is not normal.
 From “https://wiki.videolan.org/YUV/”:
 > For a single I420 pixel: YYYYYYYY UU VV
 > […]
 > For 1 NV12 pixel: YYYYYYYY UVUV
 So ffmpeg encodes in “yuv420p” instead of “nv12”, otherwise the files
 should not be byte-to-byte identical.

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


More information about the FFmpeg-trac mailing list