[FFmpeg-user] Lowering the conversion time with ffmpeg

Andrei Petru Mura mapandrei at gmail.com
Wed Oct 30 09:24:54 CET 2013


I have the following command for converting an avi to mp4:

./ffmpeg -i /path/to/file.avi -c:v libx264 -b:v 1000k -r 30 -vf
scale=640:480 ~/Desktop/out2.mp4

the output is :

ffmpeg version git-2013-10-16-10c6d1b Copyright (c) 2000-2013 the FFmpeg
developers
  built on Oct 16 2013 14:56:56 with gcc 4.7 (Ubuntu/Linaro 4.7.3-1ubuntu1)
  configuration: --prefix=/home/artaxerxe/ffmpeg_build
--extra-cflags=-I/home/artaxerxe/ffmpeg_build/include
--extra-ldflags=-L/home/artaxerxe/ffmpeg_build/lib
--bindir=/home/artaxerxe/bin --extra-libs=-ldl --enable-gpl --enable-libass
--enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
--enable-x11grab
  libavutil      52. 46.101 / 52. 46.101
  libavcodec     55. 37.100 / 55. 37.100
  libavformat    55. 19.102 / 55. 19.102
  libavdevice    55.  4.100 / 55.  4.100
  libavfilter     3. 88.101 /  3. 88.101
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
[avi @ 0xae08d60] probed stream 1 failed
[avi @ 0xae08d60] Stream #2: not enough frames to estimate rate; consider
increasing probesize
[avi @ 0xae08d60] Could not find codec parameters for stream 1 (Subtitle:
none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize'
options
[avi @ 0xae08d60] Could not find codec parameters for stream 2 (Subtitle:
none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize'
options
Input #0, avi, from
'../avi_from_server/standard_codec/geovision_format_converted_to_standard.avi':
  Duration: 00:00:57.77, start: 0.000000, bitrate: 6033 kb/s
    Stream #0:0: Video: h264 (High) (X264 / 0x34363258), yuvj420p(pc),
1920x1080, 30 fps, 30 tbr, 30 tbn, 30 tbc
    Stream #0:1: Subtitle: none
    Stream #0:2: Subtitle: none
[swscaler @ 0xadf7020] deprecated pixel format used, make sure you did set
range correctly
No pixel format specified, yuvj420p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0xae24bc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0xae24bc0] profile High, level 3.0
[libx264 @ 0xae24bc0] 264 - core 138 r2 9e941d1 - H.264/MPEG-4 AVC codec -
Copyleft 2003-2013 - 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=3 lookahead_threads=1
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=abr mbtree=1 bitrate=1000 ratetol=1.0
qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/home/artaxerxe/Desktop/out2.mp4':
  Metadata:
    encoder         : Lavf55.19.102
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuvj420p,
640x480, q=-1--1, 1000 kb/s, 15360 tbn, 30 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
Press [q] to stop, [?] for help
frame= 1733 fps= 25 q=-1.0 Lsize=    7072kB time=00:00:57.70
bitrate=1004.0kbits/s
video:7063kB audio:0kB subtitle:0 global headers:0kB muxing overhead
0.116756%
[libx264 @ 0xae24bc0] frame I:21    Avg QP:19.61  size:  8103
[libx264 @ 0xae24bc0] frame P:1689  Avg QP:22.54  size:  4126
[libx264 @ 0xae24bc0] frame B:23    Avg QP:23.68  size:  4032
[libx264 @ 0xae24bc0] consecutive B-frames: 97.3%  2.7%  0.0%  0.0%
[libx264 @ 0xae24bc0] mb I  I16..4: 34.3% 57.6%  8.1%
[libx264 @ 0xae24bc0] mb P  I16..4: 22.2% 14.3%  0.3%  P16..4: 50.1%  6.4%
 2.3%  0.0%  0.0%    skip: 4.4%
[libx264 @ 0xae24bc0] mb B  I16..4:  8.9%  6.9%  0.3%  B16..8: 45.5% 10.5%
 0.9%  direct: 7.4%  skip:19.6%  L0:59.1% L1:38.2% BI: 2.7%
[libx264 @ 0xae24bc0] final ratefactor: 21.55
[libx264 @ 0xae24bc0] 8x8 transform intra:39.5% inter:89.6%
[libx264 @ 0xae24bc0] coded y,uvDC,uvAC intra: 14.7% 51.5% 5.8% inter:
21.0% 58.0% 4.2%
[libx264 @ 0xae24bc0] i16 v,h,dc,p: 17% 17%  6% 60%
[libx264 @ 0xae24bc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 17% 35%  3%  6%
 6%  4%  3%  2%
[libx264 @ 0xae24bc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 12% 30%  5% 12%
 9%  4%  4%  3%
[libx264 @ 0xae24bc0] i8c dc,h,v,p: 63% 21% 13%  4%
[libx264 @ 0xae24bc0] Weighted P-Frames: Y:0.9% UV:0.1%
[libx264 @ 0xae24bc0] ref P L0: 38.3%  2.4% 17.2% 42.1%  0.1%
[libx264 @ 0xae24bc0] ref B L0: 51.0% 49.0%
[libx264 @ 0xae24bc0] kb/s:1001.59

The time needed for this conversion was 1 minute and 10 seconds. Is there a
possibility to improve this time?
Normally I would need to convert some very high quality videos to some
formats compatible with iPad, iPhone and a few other standard formats.

A second question related to this is: would a video card increase the
performance of FFMpeg, or is it just a matter of CPU? Is that behavior
definable, or is it tied to OS (I'm using Linux for example) or to
empiricism?

Thanks in advance.


More information about the ffmpeg-user mailing list