[FFmpeg-user] frame rate change is too slow

Elliott Balsley elliottbalsley at gmail.com
Wed Apr 2 10:03:30 CEST 2014


I have a video shot at 96fps with a 23.98 timebase (so it's in slow
motion).  I want to make it play at normal speed, by dropping 3 out of
every 4 frames.  I would expect this to encode 4x faster, but it
actually takes about twice as long as a normal encode.  I'm using the
-r flag twice; is there a better way?

$ ffmpeg -ss 60 -t 10 -i
/Volumes/RAID/GILT/Raw_Footage/Day07/A045R1NA/A045C001_140402_R1NA.mov
-pix_fmt yuv420p -r 24000/1001 test.mov
ffmpeg version 2.1.git-ffb7d71 Copyright (c) 2000-2014 the FFmpeg developers
  built on Mar  7 2014 16:54:41 with Apple LLVM version 5.0
(clang-500.2.79) (based on LLVM 3.3svn)
  configuration: --prefix=/opt/local --enable-swscale
--enable-avfilter --enable-avresample --enable-libmp3lame
--enable-libvorbis --enable-libopus --enable-libtheora
--enable-libschroedinger --enable-libopenjpeg --enable-libmodplug
--enable-libvpx --enable-libspeex --enable-libass --enable-libbluray
--enable-gnutls --enable-fontconfig --enable-libfreetype
--disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man
--enable-shared --enable-pthreads --cc=/usr/bin/cc --arch=x86_64
--enable-yasm --enable-gpl --enable-postproc --enable-libx264
--enable-libxvid --enable-nonfree --enable-libfdk-aac --enable-libfaac
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libavresample   1.  2.  0 /  1.  2.  0
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'/Volumes/RAID/GILT/Raw_Footage/Day07/A045R1NA/A045C001_140402_R1NA.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt  ARRI
    creation_time   : 2014-04-02 04:27:44
    timecode        : 00:01:33:13
  Duration: 00:06:13.71, start: 0.000000, bitrate: 190892 kb/s
    Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le,
1920x1080, 183719 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 23976
tbn, 23976 tbc (default)
    Metadata:
      creation_time   : 2014-04-02 04:27:44
      handler_name    : Apple Alias Data Handler
    Stream #0:1(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time   : 2014-04-02 04:27:44
      handler_name    : Apple Alias Data Handler
      timecode        : 00:01:33:13
File 'test.mov' already exists. Overwrite ? [y/N] y
[libx264 @ 0x7fb913852c00] using SAR=1/1
[libx264 @ 0x7fb913852c00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x7fb913852c00] profile High, level 4.0
[libx264 @ 0x7fb913852c00] 264 - core 142 - H.264/MPEG-4 AVC codec -
Copyleft 2003-2014 - 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=36 lookahead_threads=6 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=23 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, mov, to 'test.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt  ARRI
    timecode        : 00:01:33:13
    encoder         : Lavf55.33.100
    Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661),
yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 24k tbn, 23.98 tbc
(default)
    Metadata:
      creation_time   : 2014-04-02 04:27:44
      handler_name    : Apple Alias Data Handler
Stream mapping:
  Stream #0:0 -> #0:0 (prores -> libx264)
Press [q] to stop, [?] for help
frame=  240 fps= 35 q=-1.0 Lsize=    4459kB time=00:00:09.92
bitrate=3680.1kbits/s
video:4455kB audio:0kB subtitle:0 data:0 global headers:0kB muxing
overhead 0.092370%
[libx264 @ 0x7fb913852c00] frame I:2     Avg QP:21.98  size:102144
[libx264 @ 0x7fb913852c00] frame P:100   Avg QP:24.07  size: 27494
[libx264 @ 0x7fb913852c00] frame B:138   Avg QP:25.37  size: 11650
[libx264 @ 0x7fb913852c00] consecutive B-frames: 11.2% 31.7% 13.8% 43.3%
[libx264 @ 0x7fb913852c00] mb I  I16..4:  9.3% 71.6% 19.1%
[libx264 @ 0x7fb913852c00] mb P  I16..4:  1.0%  6.6%  1.0%  P16..4:
51.9%  7.9%  5.7%  0.0%  0.0%    skip:25.8%
[libx264 @ 0x7fb913852c00] mb B  I16..4:  0.4%  2.3%  0.5%  B16..8:
38.3%  1.7%  0.2%  direct: 4.2%  skip:52.4%  L0:46.9% L1:51.7% BI:
1.4%
[libx264 @ 0x7fb913852c00] 8x8 transform intra:74.2% inter:84.8%
[libx264 @ 0x7fb913852c00] coded y,uvDC,uvAC intra: 60.9% 55.0% 19.4%
inter: 16.9% 25.1% 0.6%
[libx264 @ 0x7fb913852c00] i16 v,h,dc,p: 20% 21%  6% 52%
[libx264 @ 0x7fb913852c00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 15% 15%
7%  8% 10%  9%  8%  8%
[libx264 @ 0x7fb913852c00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 17% 13%
7%  8% 10%  7%  6%  4%
[libx264 @ 0x7fb913852c00] i8c dc,h,v,p: 60% 17% 19%  4%
[libx264 @ 0x7fb913852c00] Weighted P-Frames: Y:23.0% UV:17.0%
[libx264 @ 0x7fb913852c00] ref P L0: 43.6% 14.8% 26.0% 12.3%  3.3%
[libx264 @ 0x7fb913852c00] ref B L0: 74.4% 21.5%  4.2%
[libx264 @ 0x7fb913852c00] ref B L1: 92.2%  7.8%
[libx264 @ 0x7fb913852c00] kb/s:3645.46

$ ffmpeg -r 96000/1001 -ss 60 -t 10 -i
/Volumes/RAID/GILT/Raw_Footage/Day07/A045R1NA/A045C001_140402_R1NA.mov
-pix_fmt yuv420p -r 24000/1001 test.mov
ffmpeg version 2.1.git-ffb7d71 Copyright (c) 2000-2014 the FFmpeg developers
  built on Mar  7 2014 16:54:41 with Apple LLVM version 5.0
(clang-500.2.79) (based on LLVM 3.3svn)
  configuration: --prefix=/opt/local --enable-swscale
--enable-avfilter --enable-avresample --enable-libmp3lame
--enable-libvorbis --enable-libopus --enable-libtheora
--enable-libschroedinger --enable-libopenjpeg --enable-libmodplug
--enable-libvpx --enable-libspeex --enable-libass --enable-libbluray
--enable-gnutls --enable-fontconfig --enable-libfreetype
--disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man
--enable-shared --enable-pthreads --cc=/usr/bin/cc --arch=x86_64
--enable-yasm --enable-gpl --enable-postproc --enable-libx264
--enable-libxvid --enable-nonfree --enable-libfdk-aac --enable-libfaac
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libavresample   1.  2.  0 /  1.  2.  0
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'/Volumes/RAID/GILT/Raw_Footage/Day07/A045R1NA/A045C001_140402_R1NA.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt  ARRI
    creation_time   : 2014-04-02 04:27:44
    timecode        : 00:01:33:13
  Duration: 00:06:13.71, start: 0.000000, bitrate: 190892 kb/s
    Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le,
1920x1080, 183719 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 23976
tbn, 23976 tbc (default)
    Metadata:
      creation_time   : 2014-04-02 04:27:44
      handler_name    : Apple Alias Data Handler
    Stream #0:1(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time   : 2014-04-02 04:27:44
      handler_name    : Apple Alias Data Handler
      timecode        : 00:01:33:13
[libx264 @ 0x7fa2d0852c00] using SAR=1/1
[libx264 @ 0x7fa2d0852c00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x7fa2d0852c00] profile High, level 4.0
[libx264 @ 0x7fa2d0852c00] 264 - core 142 - H.264/MPEG-4 AVC codec -
Copyleft 2003-2014 - 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=36 lookahead_threads=6 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=23 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, mov, to 'test.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt  ARRI
    timecode        : 00:01:33:13
    encoder         : Lavf55.33.100
    Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661),
yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 24k tbn, 23.98 tbc
(default)
    Metadata:
      creation_time   : 2014-04-02 04:27:44
      handler_name    : Apple Alias Data Handler
Stream mapping:
  Stream #0:0 -> #0:0 (prores -> libx264)
Press [q] to stop, [?] for help
frame=  243 fps= 16 q=-1.0 Lsize=    6151kB time=00:00:10.05
bitrate=5013.1kbits/s dup=0 drop=716
video:6147kB audio:0kB subtitle:0 data:0 global headers:0kB muxing
overhead 0.067901%
[libx264 @ 0x7fa2d0852c00] frame I:2     Avg QP:22.64  size: 86343
[libx264 @ 0x7fa2d0852c00] frame P:126   Avg QP:24.43  size: 31866
[libx264 @ 0x7fa2d0852c00] frame B:115   Avg QP:25.70  size: 18313
[libx264 @ 0x7fa2d0852c00] consecutive B-frames: 12.3% 70.0% 11.1%  6.6%
[libx264 @ 0x7fa2d0852c00] mb I  I16..4:  9.0% 72.2% 18.7%
[libx264 @ 0x7fa2d0852c00] mb P  I16..4:  1.2%  7.4%  1.1%  P16..4:
54.8%  9.5%  5.8%  0.0%  0.0%    skip:20.2%
[libx264 @ 0x7fa2d0852c00] mb B  I16..4:  0.9%  5.0%  0.8%  B16..8:
37.9%  3.1%  0.5%  direct: 8.1%  skip:43.6%  L0:46.5% L1:50.8% BI:
2.8%
[libx264 @ 0x7fa2d0852c00] 8x8 transform intra:75.4% inter:82.9%
[libx264 @ 0x7fa2d0852c00] coded y,uvDC,uvAC intra: 60.5% 55.6% 19.7%
inter: 22.0% 36.6% 0.8%
[libx264 @ 0x7fa2d0852c00] i16 v,h,dc,p: 16% 22%  5% 56%
[libx264 @ 0x7fa2d0852c00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 16% 15%
7%  8% 10%  9%  8%  9%
[libx264 @ 0x7fa2d0852c00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 17% 14%
7%  8% 10%  7%  6%  4%
[libx264 @ 0x7fa2d0852c00] i8c dc,h,v,p: 61% 17% 19%  4%
[libx264 @ 0x7fa2d0852c00] Weighted P-Frames: Y:24.6% UV:23.0%
[libx264 @ 0x7fa2d0852c00] ref P L0: 43.6% 13.9% 21.6% 16.0%  4.9%
[libx264 @ 0x7fa2d0852c00] ref B L0: 67.7% 30.7%  1.6%
[libx264 @ 0x7fa2d0852c00] ref B L1: 96.9%  3.1%
[libx264 @ 0x7fa2d0852c00] kb/s:4967.86


More information about the ffmpeg-user mailing list