[FFmpeg-user] x264 encoding of certain (small) videos take hours

Martin Bay (Netomia) mbp at netomia.dk
Mon Aug 22 21:06:55 CEST 2011


Whenever I try to encode a video file form my Android phone with x264, 
it takes several hours - as compared to seconds with other videos of the 
same length and size.

Does anyone know of a fix?

ffmpeg -y -i <path> -ab 96k -acodec libfaac -ac 2 -vcodec libx264 
-vprofile baseline -threads 4 <path2>.mp4

ffmpeg version N-31979-gedae3db, Copyright (c) 2000-2011 the FFmpeg 
developers
   built on Aug 18 2011 20:59:51 with gcc 4.4.5
   configuration: --enable-gpl --enable-libfaac --enable-libmp3lame 
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora 
--enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree 
--enable-postproc --enable-version3 --enable-x11grab
   libavutil    51. 12. 0 / 51. 12. 0
   libavcodec   53. 11. 0 / 53. 11. 0
   libavformat  53.  8. 0 / 53.  8. 0
   libavdevice  53.  3. 0 / 53.  3. 0
   libavfilter   2. 32. 0 /  2. 32. 0
   libswscale    2.  0. 0 /  2.  0. 0
   libpostproc  51.  2. 0 / 51.  2. 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x32b3460] multiple edit list entries, a/v 
desync might occur, patch welcome
   Metadata:
     major_brand     : 3gp4
     minor_version   : 0
     compatible_brands: isom3gp4
     creation_time   : 1945-07-08 03:28:22
   Duration: 00:00:50.24, start: 0.000000, bitrate: 3142 kb/s
     Stream #0.0(eng): Audio: aac, 44100 Hz, mono, s16, 63 kb/s
     Metadata:
       creation_time   : 1945-07-08 03:28:22
     Stream #0.1(eng): Video: h264 (Baseline), yuv420p, 480x800, 2960 
kb/s, SAR 65536:65536 DAR 3:5, 22.40 fps, 90k tbr, 90k tbn, 180k tbc
     Metadata:
       creation_time   : 1945-07-08 03:28:22
[mp4 @ 0x32b4920] Frame rate very high for a muxer not effciciently 
supporting it.
Please consider specifiying a lower framerate, a different muxer or -vsync 2
[buffer @ 0x32adc40] w:480 h:800 pixfmt:yuv420p tb:1/1000000 
sar:65536/65536 sws_param:
[libx264 @ 0x32ad780] Default settings detected, using medium profile
[libx264 @ 0x32ad780] using SAR=1/1
[libx264 @ 0x32ad780] MB rate (135000000) > level limit (983040)
[libx264 @ 0x32ad780] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0x32ad780] profile Constrained Baseline, level 5.1
[libx264 @ 0x32ad780] 264 - core 116 r2057 0ba8a9c - H.264/MPEG-4 AVC 
codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - 
options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 
psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 
8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=4 
sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 
constrained_intra=0 bframes=0 weightp=0 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

-- 
Regards,
Martin Bay Pedersen


More information about the ffmpeg-user mailing list