[FFmpeg-trac] #1460(undetermined:new): x264 artefacts in quicktime player in sequences without motion/still images

FFmpeg trac at avcodec.org
Mon Jun 18 08:36:42 CEST 2012


#1460: x264 artefacts in quicktime player in sequences without motion/still images
-------------------------------------+-------------------------------------
             Reporter:  tbart        |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  0.11.1
  undetermined                       |               Blocked By:
             Keywords:  artifacts    |  Reproduced by developer:  0
  still motion quicktime qt player   |
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 Certain options (I am unsure which ones really are the problematic ones)
 lead to problems in Quicktime player in scenes without motion and
 (possibly?) large solid color areas.. Other players play the video without
 any artefacts whatsoever.
 I think this is a bug in Quicktime Player, but it should be checked and
 possibly noted somewhere so others can avoid this pitfall.

 How to reproduce:

 tbart at blackknight /mnt/scratch $ ffmpeg -i
 artifacts_in_quicktime_player_src.mov -vcodec libx264 -preset slow -crf 25
 -an artifacts_in_quicktime_player_dst.mov
 ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
   built on Jun 15 2012 13:46:42 with gcc 4.5.3
   configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc
 --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-O2
 -march=core2 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-
 size=64 --param l2-cache-size=6144 -fomit-frame-pointer -pipe' --extra-
 cflags='-O2 -march=core2 -msse4.1 --param l1-cache-size=32 --param l1
 -cache-line-size=64 --param l2-cache-size=6144 -fomit-frame-pointer -pipe'
 --extra-cxxflags='-O2 -march=core2 -msse4.1 --param l1-cache-size=32
 --param l1-cache-line-size=64 --param l2-cache-size=6144 -fomit-frame-
 pointer -pipe' --disable-static --enable-gpl --enable-version3 --enable-
 postproc --enable-avfilter --disable-stripping --disable-debug --disable-
 doc --disable-network --disable-vaapi --enable-libmp3lame --enable-libvo-
 aacenc --enable-libtheora --enable-libx264 --enable-libxvid --enable-
 libaacplus --enable-nonfree --enable-libfaac --enable-nonfree --enable-
 libdc1394 --enable-openal   libavutil      51. 54.100 / 51. 54.100
   libavcodec     54. 23.100 / 54. 23.100
   libavformat    54.  6.100 / 54.  6.100
   libavdevice    54.  0.100 / 54.  0.100
   libavfilter     2. 77.100 /  2. 77.100
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0. 15.100 /  0. 15.100
   libpostproc    52.  0.100 / 52.  0.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
 'artifacts_in_quicktime_player_src.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 512
     compatible_brands: qt
     encoder         : Lavf54.6.100
   Duration: 00:00:22.00, start: 0.000000, bitrate: 25 kb/s
     Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
 550x400 [SAR 16:15 DAR 22:15], 23 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
     Metadata:
       handler_name    : DataHandler
 [buffer @ 0x934f40] w:550 h:400 pixfmt:yuv420p tb:1/25 sar:16/15
 sws_param:flags=2
 [buffersink @ 0x935220] No opaque field provided
 [libx264 @ 0x91ddc0] using SAR=16/15
 [libx264 @ 0x91ddc0] using cpu capabilities: MMX2 SSE2Fast SSSE3
 FastShuffle SSE4.1 Cache64
 [libx264 @ 0x91ddc0] profile High, level 3.0
 [libx264 @ 0x91ddc0] 264 - core 120 - H.264/MPEG-4 AVC codec - Copyleft
 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=5
 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 psy=1 psy_rd=1.00:0.00
 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0
 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 sliced_threads=0
 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3
 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2
 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50
 rc=crf mbtree=1 crf=25.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4
 ip_ratio=1.40 aq=1:1.00
 Output #0, mov, to 'artifacts_in_quicktime_player_dst.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 512
     compatible_brands: qt
     encoder         : Lavf54.6.100
     Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p, 550x400
 [SAR 16:15 DAR 22:15], q=-1--1, 25 tbn, 25 tbc
     Metadata:
       handler_name    : DataHandler
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 -> libx264)
 Press [q] to stop, [?] for help
 DTS -1, next:-40000 st:0 invalid dropping
 frame=  550 fps=131 q=-1.0 Lsize=      89kB time=00:00:21.92 bitrate=
 33.4kbits/s
 video:86kB audio:0kB global headers:0kB muxing overhead 4.031690%
 [libx264 @ 0x91ddc0] frame I:3     Avg QP:13.75  size:  8800
 [libx264 @ 0x91ddc0] frame P:506   Avg QP:28.92  size:   109
 [libx264 @ 0x91ddc0] frame B:41    Avg QP:29.23  size:   138
 [libx264 @ 0x91ddc0] consecutive B-frames: 89.5%  1.5%  1.1%  8.0%
 [libx264 @ 0x91ddc0] mb I  I16..4: 63.6% 19.2% 17.2%
 [libx264 @ 0x91ddc0] mb P  I16..4:  0.7%  0.2%  0.0%  P16..4:  1.0%  0.2%
 0.1%  0.0%  0.0%    skip:97.8%
 [libx264 @ 0x91ddc0] mb B  I16..4:  0.1%  0.0%  0.0%  B16..8: 10.9%  0.3%
 0.0%  direct: 0.1%  skip:88.6%  L0:31.1% L1:64.1% BI: 4.8%
 [libx264 @ 0x91ddc0] 8x8 transform intra:22.9% inter:73.7%
 [libx264 @ 0x91ddc0] direct mvs  spatial:92.7% temporal:7.3%
 [libx264 @ 0x91ddc0] coded y,uvDC,uvAC intra: 17.8% 26.0% 8.6% inter: 0.5%
 0.5% 0.0%
 [libx264 @ 0x91ddc0] i16 v,h,dc,p: 46% 41%  8%  5%
 [libx264 @ 0x91ddc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 28% 23%  5%  6%
 6%  7%  5%  8%
 [libx264 @ 0x91ddc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 23% 18%  5%  7%
 7%  8%  6%  8%
 [libx264 @ 0x91ddc0] i8c dc,h,v,p: 54% 33% 11%  2%
 [libx264 @ 0x91ddc0] Weighted P-Frames: Y:2.4% UV:1.6%
 [libx264 @ 0x91ddc0] ref P L0: 64.1% 21.8% 12.2%  0.9%  0.8%  0.3%  0.0%
 [libx264 @ 0x91ddc0] ref B L0: 76.3% 16.7%  4.3%  2.7%
 [libx264 @ 0x91ddc0] ref B L1: 94.1%  5.9%
 [libx264 @ 0x91ddc0] kb/s:31.74

 The resulting file shows massive artifacts in every Quicktime Player
 version I have tested from around 00:00:10 on.
 adding rc_lookahead=30 as in

 ffmpeg -i artifacts_in_quicktime_player_src.mov -vcodec libx264 -preset
 slow -crf 25 -x264opts rc_lookahead=30 -an no_artifacts.mov

 solves the problem (but I am not sure this is really the culprit..)

 This also happens with directly encoding with x264 and muxing with mp4box
 so I *think* the problem lies within x264 encoding and not muxing - or
 both ffmpeg and mp4box do the same (bad) thing.

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


More information about the FFmpeg-trac mailing list