Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5221 closed defect (worksforme)

libx264 drops 2 starting frames

Reported by: Tomas Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Transcoding from mp4 (and proRes) 24fps file to h264 mov file.
Resulting video drops 2 starting frames, as if original video started from frame 2.

Summary of the bug:
How to reproduce:

% ffmpeg -i INPUT -an -sn -vcodec libx264 -crf 18 -pix_fmt yuv420p OUTPUT.MOV
ffmpeg version N-78512-g4c573f8-tessus
tested on MacOSX 10.10.5

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Here's a log

Tomass-iMac:~ renderTom$ /ffmpeg -i /Volumes/renderTom\ HD/\!_Projects/Other\ projects/\!_Prior/17\ Misconduct/1\ Incoming/Video/Misconduct_trailer_23_976_HD_FilmBridge_ProRes.mov -an -sn -vcodec libx264 -crf 18 -pix_fmt yuv420p /Volumes/renderTom\ HD/\!_Projects/Other\ projects/\!_Prior/17\ Misconduct/1\ Incoming/Video/Misconduct_trailer_23_976_HD_FilmBridge_ProRes__5h.mov 
ffmpeg version N-78512-g4c573f8-tessus Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --as=yasm --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-version3 --disable-ffplay --disable-indev=qtkit --disable-indev=x11grab_xcb
  libavutil      55. 17.100 / 55. 17.100
  libavcodec     57. 24.101 / 57. 24.101
  libavformat    57. 24.100 / 57. 24.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 28.100 /  6. 28.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fd9b9800000] ignoring 'frma' atom of 'in24', stream format is 'in24'
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/renderTom HD/!_Projects/Other projects/!_Prior/17 Misconduct/1 Incoming/Video/Misconduct_trailer_23_976_HD_FilmBridge_ProRes.mov':
  Metadata:
    creation_time   : 2015-12-16 15:32:45
    com.apple.finalcutstudio.media.uuid: 1F42CDAC-EB42-4222-9CE5-576512959623
    timecode        : 01:00:00:00
  Duration: 00:29:05.79, start: 0.000000, bitrate: 15430 kb/s
    Stream #0:0(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48048 Hz, 10 channels, s32 (24 bit), 11531 kb/s (default)
    Metadata:
      creation_time   : 2015-12-16 15:32:45
      handler_name    : Apple Alias Data Handler
    Stream #0:1(eng): Video: prores (apch / 0x68637061), yuv422p10le(bt709), 1920x1080, 157862 kb/s, SAR 1:1 DAR 16:9, 24 fps, 24 tbr, 2400 tbn, 2400 tbc (default)
    Metadata:
      creation_time   : 2016-01-19 16:31:33
      handler_name    : Apple Alias Data Handler
      encoder         : Apple ProRes 422 (HQ)
    Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time   : 2016-01-19 16:31:33
      handler_name    : Apple Alias Data Handler
      reel_name       : Unnamed
      timecode        : 01:00:00:00
[libx264 @ 0x7fd9ba042600] using SAR=1/1
[libx264 @ 0x7fd9ba042600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x7fd9ba042600] profile High, level 4.0
[libx264 @ 0x7fd9ba042600] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - 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=24 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=18.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mov, to '/Volumes/renderTom HD/!_Projects/Other projects/!_Prior/17 Misconduct/1 Incoming/Video/Misconduct_trailer_23_976_HD_FilmBridge_ProRes__5h.mov':
  Metadata:
    timecode        : 01:00:00:00
    com.apple.finalcutstudio.media.uuid: 1F42CDAC-EB42-4222-9CE5-576512959623
    encoder         : Lavf57.24.100
    Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 24 fps, 12288 tbn, 24 tbc (default)
    Metadata:
      creation_time   : 2016-01-19 16:31:33
      handler_name    : Apple Alias Data Handler
      encoder         : Lavc57.24.101 libx264
    Side data:
      unknown side data type 10 (24 bytes)
Stream mapping:
  Stream #0:1 -> #0:0 (prores (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame=   36 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=

---

frame= 3744 fps= 14 q=23.0 size=  160981kB time=00:02:33.58 bitrate=8586.6kbits/frame= 3761 fps= 14 q=23.0 size=  161027kB time=00:02:34.29 bitrate=8549.6kbits/frame= 3781 fps= 14 q=23.0 size=  161107kB time=00:02:35.12 bitrate=8507.9kbits/frame= 3799 fps= 14 q=23.0 size=  161167kB time=00:02:35.87 bitrate=8470.1kbits/frame= 3809 fps= 14 q=-1.0 Lsize=  161245kB time=00:02:38.62 bitrate=8327.3kbits/s speed=0.586x    
video:161211kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.021007%
[libx264 @ 0x7fd9ba042600] frame I:85    Avg QP:13.31  size:172097
[libx264 @ 0x7fd9ba042600] frame P:2728  Avg QP:17.80  size: 47041
[libx264 @ 0x7fd9ba042600] frame B:996   Avg QP:18.71  size: 22214
[libx264 @ 0x7fd9ba042600] consecutive B-frames: 52.1% 38.1%  2.6%  7.1%
[libx264 @ 0x7fd9ba042600] mb I  I16..4: 35.0% 51.7% 13.4%
[libx264 @ 0x7fd9ba042600] mb P  I16..4:  2.3%  7.0%  0.6%  P16..4: 32.3% 14.1%  9.3%  0.0%  0.0%    skip:34.4%
[libx264 @ 0x7fd9ba042600] mb B  I16..4:  0.4%  1.0%  0.0%  B16..8: 32.4%  5.0%  1.2%  direct: 3.5%  skip:56.4%  L0:46.7% L1:48.5% BI: 4.7%
[libx264 @ 0x7fd9ba042600] 8x8 transform intra:66.3% inter:67.7%
[libx264 @ 0x7fd9ba042600] coded y,uvDC,uvAC intra: 70.6% 69.6% 50.6% inter: 24.5% 25.3% 2.1%
[libx264 @ 0x7fd9ba042600] i16 v,h,dc,p: 49% 13% 16% 23%
[libx264 @ 0x7fd9ba042600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 11% 43%  5%  6%  6%  6%  5%  6%
[libx264 @ 0x7fd9ba042600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 14% 27%  7%  8%  7%  7%  6%  5%
[libx264 @ 0x7fd9ba042600] i8c dc,h,v,p: 61% 17% 17%  5%
[libx264 @ 0x7fd9ba042600] Weighted P-Frames: Y:14.4% UV:13.1%
[libx264 @ 0x7fd9ba042600] ref P L0: 59.7%  8.8% 21.3%  9.9%  0.3%
[libx264 @ 0x7fd9ba042600] ref B L0: 74.5% 24.6%  0.9%
[libx264 @ 0x7fd9ba042600] ref B L1: 98.3%  1.7%
[libx264 @ 0x7fd9ba042600] kb/s:8321.16
Tomass-iMac:~ renderTom$ 

Attachments (1)

test file.mov (898.1 KB ) - added by Tomas 8 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Carl Eugen Hoyos, 8 years ago

Component: ffmpegundetermined
Priority: criticalnormal

Please provide your input file.

by Tomas, 8 years ago

Attachment: test file.mov added

comment:2 by Tomas, 8 years ago

Just did a test, and results are weird.
Both QT7 player and Final Cut show original file and transcoded to be the same length, all is good.
But once those two files are imported to After Effects, the transcoded one is 2 frames shorter then original one.

comment:3 by Carl Eugen Hoyos, 8 years ago

Resolution: worksforme
Status: newclosed

The sample you uploaded contains 68 frames and I get an output file of 68 frames here.

comment:4 by Tomas, 8 years ago

Yes, I am very sorry about this.
I just check it once again and indeed frame count is identical. After Effects CC2015 simply plays tricks again.
I am sorry to bother you,

Thank you.

Note: See TracTickets for help on using tickets.