[FFmpeg-trac] #2165(undetermined:new): h264 lossless encoding, decoding does not produce same video content

FFmpeg trac at avcodec.org
Tue Jan 22 00:51:01 CET 2013


#2165: h264 lossless encoding, decoding does not produce same video content
-------------------------------------+-------------------------------------
             Reporter:  silviob      |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
              Version:  unspecified  |  undetermined
             Keywords:  h264,        |               Resolution:
  lossless                           |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by cehoyos):

 On my Linux work-station with x264 0.128.x the following works as
 expected:
 {{{
 $ ffmpeg -i lossless_h264_encoding.avi -crf 0 out.h264 -f framecrc -
 ffmpeg version N-49127-ge4eebc2 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jan 21 2013 23:43:50 with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl --disable-indev=jack --enable-libx264
   libavutil      52. 15.100 / 52. 15.100
   libavcodec     54. 90.100 / 54. 90.100
   libavformat    54. 61.102 / 54. 61.102
   libavdevice    54.  3.102 / 54.  3.102
   libavfilter     3. 33.100 /  3. 33.100
   libswscale      2.  2.100 /  2.  2.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  2.100 / 52.  2.100
 Input #0, avi, from 'lossless_h264_encoding.avi':
   Duration: 00:00:00.07, start: 0.000000, bitrate: 148446 kb/s
     Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 640x480, 30
 tbr, 30 tbn, 30 tbc
 [libx264 @ 0x18094e0] using cpu capabilities: MMX2 SSE2Fast SSSE3
 FastShuffle SSE4.2 AVX
 [libx264 @ 0x18094e0] profile High 4:4:4 Predictive, level 3.0, 4:2:2
 8-bit
 #tb 0: 1/30
 Output #0, h264, to 'out.h264':
   Metadata:
     encoder         : Lavf54.61.102
     Stream #0:0: Video: h264, yuv422p, 640x480, q=-1--1, 90k tbn, 30 tbc
 Output #1, framecrc, to 'pipe:':
   Metadata:
     encoder         : Lavf54.61.102
     Stream #1:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 640x480,
 q=2-31, 200 kb/s, 30 tbn, 30 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo -> libx264)
   Stream #0:0 -> #1:0 (rawvideo -> rawvideo)
 Press [q] to stop, [?] for help
 0,          0,          0,        1,   614400, 0x319cc48e
 0,          1,          1,        1,   614400, 0xec4c279f
 frame=    2 fps=0.0 q=-1.0 Lq=0.0 size=     324kB time=00:00:00.06
 bitrate=39835.1kbits/s
 video:1524kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 -78.730824%
 [libx264 @ 0x18094e0] frame I:1     Avg QP: 0.00  size:169414
 [libx264 @ 0x18094e0] frame P:1     Avg QP: 0.00  size:162547
 [libx264 @ 0x18094e0] mb I  I16..4: 14.8% 10.2% 74.9%
 [libx264 @ 0x18094e0] mb P  I16..4:  6.8% 31.7% 32.4%  P16..4: 11.8%  9.5%
 7.5%  0.0%  0.0%    skip: 0.2%
 [libx264 @ 0x18094e0] 8x8 transform intra:24.5% inter:78.7%
 [libx264 @ 0x18094e0] coded y,uvDC,uvAC intra: 97.9% 99.1% 99.0% inter:
 97.0% 98.9% 98.3%
 [libx264 @ 0x18094e0] i16 v,h,dc,p: 41% 57%  2%  0%
 [libx264 @ 0x18094e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 67%  1%  0%  1%
 0%  0%  0%  0%
 [libx264 @ 0x18094e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 47%  3%  2%  5%
 3%  4%  2%  2%
 [libx264 @ 0x18094e0] i8c dc,h,v,p:  3% 46% 51%  0%
 [libx264 @ 0x18094e0] Weighted P-Frames: Y:0.0% UV:0.0%
 [libx264 @ 0x18094e0] kb/s:39835.32
 }}}
 {{{
 $ ffmpeg -i out.h264 -pix_fmt uyvy422 -f framecrc -
 ffmpeg version N-49127-ge4eebc2 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jan 21 2013 23:43:50 with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl --disable-indev=jack --enable-libx264
   libavutil      52. 15.100 / 52. 15.100
   libavcodec     54. 90.100 / 54. 90.100
   libavformat    54. 61.102 / 54. 61.102
   libavdevice    54.  3.102 / 54.  3.102
   libavfilter     3. 33.100 /  3. 33.100
   libswscale      2.  2.100 /  2.  2.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  2.100 / 52.  2.100
 [h264 @ 0x269df80] decoding for stream 0 failed
 [h264 @ 0x269df80] Estimating duration from bitrate, this may be
 inaccurate
 Input #0, h264, from 'out.h264':
   Duration: N/A, bitrate: N/A
     Stream #0:0: Video: h264 (High 4:4:4 Predictive), yuv422p, 640x480, 30
 tbr, 1200k tbn, 60 tbc
 #tb 0: 1/30
 Output #0, framecrc, to 'pipe:':
   Metadata:
     encoder         : Lavf54.61.102
     Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 640x480,
 q=2-31, 200 kb/s, 30 tbn, 30 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 -> rawvideo)
 Press [q] to stop, [?] for help
 0,          0,          0,        1,   614400, 0x319cc48e
 0,          1,          1,        1,   614400, 0xec4c279f
 frame=    2 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.06 bitrate=
 15.4kbits/s
 video:1200kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 -99.989583%
 }}}
 If I encode the original avi file with a Zeranoe build on Windows, the
 output file is different:
 {{{
 $ ffmpeg -i outwindows.h264 -pix_fmt uyvy422 -f framecrc -
 ffmpeg version N-49127-ge4eebc2 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Jan 21 2013 23:43:50 with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl --disable-indev=jack --enable-libx264
   libavutil      52. 15.100 / 52. 15.100
   libavcodec     54. 90.100 / 54. 90.100
   libavformat    54. 61.102 / 54. 61.102
   libavdevice    54.  3.102 / 54.  3.102
   libavfilter     3. 33.100 /  3. 33.100
   libswscale      2.  2.100 /  2.  2.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  2.100 / 52.  2.100
 [h264 @ 0x16a6f80] decoding for stream 0 failed
 [h264 @ 0x16a6f80] Estimating duration from bitrate, this may be
 inaccurate
 Input #0, h264, from 'outwindows.h264':
   Duration: N/A, bitrate: N/A
     Stream #0:0: Video: h264 (High 4:4:4 Predictive), yuv422p, 640x480, 30
 tbr, 1200k tbn, 60 tbc
 #tb 0: 1/30
 Output #0, framecrc, to 'pipe:':
   Metadata:
     encoder         : Lavf54.61.102
     Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 640x480,
 q=2-31, 200 kb/s, 30 tbn, 30 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 -> rawvideo)
 Press [q] to stop, [?] for help
 0,          0,          0,        1,   614400, 0x319cc48e
 0,          1,          1,        1,   614400, 0x92ee27a2
 frame=    2 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.06 bitrate=
 15.4kbits/s
 video:1200kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 -99.989583%
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2165#comment:1>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list