[FFmpeg-trac] #5251(undetermined:new): Unwanted frames after encoding

FFmpeg trac at avcodec.org
Fri Feb 19 17:57:13 CET 2016


#5251: Unwanted frames after encoding
-------------------------------------+-------------------------------------
             Reporter:  Atarikid     |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 After encoding a source file (MP4 container with h264 video codec and AAC
 audio codec) with ffmpeg, the encoded file has some unwanted frames at the
 start.
 I tried everything to get this fixed but it keeps failing. Using Apples
 Compressor it works fine.


 FFmpeg output:

 Pete-MacBook-Pro:~ Pete $ /Users/Pete/Desktop/ffmpeg -i
 /Users/Pete/Desktop/test.mp4 -c:a aac -ab 224k -strict -2 -c:v libx264 -y
 /Users/Pete/Movies/test.mp4
 ffmpeg version 3.0 Copyright (c) 2000-2016 the FFmpeg developers
   built with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
   configuration: --prefix=/Volumes/tempdisk/sw --as=yasm --enable-gpl
 --enable-version3 --enable-pthreads --disable-ffplay --disable-ffserver
 --disable-shared --enable-static --enable-libvpx --disable-decoder=libvpx
 --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis
 --enable-libx264 --enable-libx265 --enable-libxvid --enable-zlib --enable-
 avfilter --enable-fontconfig --enable-libfreetype --enable-libass
 --enable-libutvideo --enable-libvidstab --enable-filters --enable-postproc
 --enable-runtime-cpudetect --disable-indev=qtkit --disable-
 indev=x11grab_xcb
   libavutil      55. 17.103 / 55. 17.103
   libavcodec     57. 24.102 / 57. 24.102
   libavformat    57. 25.100 / 57. 25.100
   libavdevice    57.  0.101 / 57.  0.101
   libavfilter     6. 31.100 /  6. 31.100
   libswscale      4.  0.100 /  4.  0.100
   libswresample   2.  0.101 /  2.  0.101
   libpostproc    54.  0.100 / 54.  0.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/Pete/Desktop/test.mp4':
   Metadata:
     major_brand     : mp42
     minor_version   : 1
     compatible_brands: mp42mp41
     creation_time   : 2016-02-19 16:02:48
   Duration: 00:00:01.00, start: 0.260000, bitrate: 37872 kb/s
     Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv,
 smpte170m/smpte170m/bt709), 720x576 [SAR 12:11 DAR 15:11], 29862 kb/s, 50
 fps, 50 tbr, 50k tbn, 100 tbc (default)
     Metadata:
       creation_time   : 2016-02-19 16:02:48
       handler_name    : Module de gestion vid?o
     Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
 stereo, fltp, 224 kb/s (default)
     Metadata:
       creation_time   : 2016-02-19 16:02:48
       handler_name    : Module de gestion sonore
 [libx264 @ 0x7fe45a217400] using SAR=12/11
 [libx264 @ 0x7fe45a217400] using cpu capabilities: MMX2 SSE2Fast SSSE3
 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
 [libx264 @ 0x7fe45a217400] profile High, level 3.1
 [libx264 @ 0x7fe45a217400] 264 - core 148 r2665M a01e339 - H.264/MPEG-4
 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html -
 options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7
 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=12
 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0
 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
 Output #0, mp4, to '/Users/Pete/Movies/test.mp4':
   Metadata:
     major_brand     : mp42
     minor_version   : 1
     compatible_brands: mp42mp41
     encoder         : Lavf57.25.100
     Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021),
 yuv420p, 720x576 [SAR 12:11 DAR 15:11], q=-1--1, 50 fps, 12800 tbn, 50 tbc
 (default)
     Metadata:
       creation_time   : 2016-02-19 16:02:48
       handler_name    : Module de gestion vid?o
       encoder         : Lavc57.24.102 libx264
     Side data:
       unknown side data type 10 (24 bytes)
     Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz,
 stereo, fltp, 224 kb/s (default)
     Metadata:
       creation_time   : 2016-02-19 16:02:48
       handler_name    : Module de gestion sonore
       encoder         : Lavc57.24.102 aac
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
   Stream #0:1 -> #0:1 (aac (native) -> aac (native))
 Press [q] to stop, [?] for help
 frame=   76 fps=0.0 q=-1.0 Lsize=     491kB time=00:00:01.48
 bitrate=2715.8kbits/s dup=13 drop=0 speed=2.37x
 video:460kB audio:28kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.589220%
 [libx264 @ 0x7fe45a217400] frame I:2     Avg QP:26.22  size: 42660
 [libx264 @ 0x7fe45a217400] frame P:34    Avg QP:27.36  size:  8364
 [libx264 @ 0x7fe45a217400] frame B:40    Avg QP:32.41  size:  2519
 [libx264 @ 0x7fe45a217400] consecutive B-frames:  2.6% 81.6%  0.0% 15.8%
 [libx264 @ 0x7fe45a217400] mb I  I16..4: 15.3% 44.2% 40.5%
 [libx264 @ 0x7fe45a217400] mb P  I16..4:  2.5%  1.3%  0.2%  P16..4: 47.1%
 13.0% 10.2%  0.0%  0.0%    skip:25.8%
 [libx264 @ 0x7fe45a217400] mb B  I16..4:  0.1%  0.1%  0.0%  B16..8: 35.6%
 4.5%  0.8%  direct: 2.9%  skip:56.0%  L0:53.2% L1:42.3% BI: 4.5%
 [libx264 @ 0x7fe45a217400] 8x8 transform intra:39.6% inter:59.4%
 [libx264 @ 0x7fe45a217400] coded y,uvDC,uvAC intra: 57.4% 64.4% 4.3%
 inter: 18.1% 26.2% 0.0%
 [libx264 @ 0x7fe45a217400] i16 v,h,dc,p: 35% 30% 21% 15%
 [libx264 @ 0x7fe45a217400] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 18% 33%  4%
 6%  6%  5%  6%  5%
 [libx264 @ 0x7fe45a217400] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 22% 12%  5%
 7%  8%  5%  7%  5%
 [libx264 @ 0x7fe45a217400] i8c dc,h,v,p: 46% 27% 20%  7%
 [libx264 @ 0x7fe45a217400] Weighted P-Frames: Y:2.9% UV:0.0%
 [libx264 @ 0x7fe45a217400] ref P L0: 54.1% 12.4% 21.3% 12.2%  0.0%
 [libx264 @ 0x7fe45a217400] ref B L0: 72.2% 27.8%
 [libx264 @ 0x7fe45a217400] ref B L1: 100.0%  0.0%
 [libx264 @ 0x7fe45a217400] kb/s:2476.24
 [aac @ 0x7fe45a218800] Qavg: 222.495


 If you play the encoded movie you will notice it shows the trees (forrest)
 at the start. When you play the original file, those frames (with trees)
 are not shown.


 Is there a solution for this?

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


More information about the FFmpeg-trac mailing list