"Unknown encoder libx264" on Windows

4

I'm testing ClipBucket on a Windows XP system, and ClipBucket (open source video share) uses FFmpeg to convert videos. The final command it executes is (i changed it a little to make it compatible with the current FFmpeg):

D:\ffmpeg-snapshot-git\ffmpeg\ffmpeg.exe -i C:
\wamp\www\cb/files/conversion_queue/1352973741c353c.mp4 -f flv -vcodec libx2
64 -pre normal -r 25 -s 426x240 -aspect 1.775 -vf "pad=10:20:30:40:yellow"  -ac
odec libfaac -ab 128000 -ar 22050 C:\wamp\www\cb/files/videos/13540939451e18
4.flv 2> C:\wamp\www\cb/files/temp/13540939461c124.tmp 2>&1

And this is the response I get:

ffmpeg version 1.0.git Copyright (c) 2000-2012 the FFmpeg developers
built on Nov 19 2012 16:42:42 with gcc 4.6.2 (GCC)
configuration:
libavutil      52.  8.100 / 52.  8.100
libavcodec     54. 73.100 / 54. 73.100
libavformat    54. 37.100 / 54. 37.100
libavdevice    54.  3.100 / 54.  3.100
libavfilter     3. 23.101 /  3. 23.101
libswscale      2.  1.102 /  2.  1.102
libswresample   0. 16.100 /  0. 16.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\wamp\www\cb/files/conversion_que
ue/1352973741c353c.mp4':
Metadata:
major_brand     : isom
minor_version   : 512
compatible_brands: isomiso2avc1mp41
encoder         : Lavf53.21.0
Duration: 00:00:51.67, start: 0.000000, bitrate: 344 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 426x240 [
SAR 1:1 DAR 71:40], 308 kb/s, 15 fps, 15 tbr, 15 tbn, 30 tbc
Metadata:
handler_name    : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 31
kb/s
Metadata:
handler_name    : SoundHandler
Unknown encoder 'libx264'

How can I get this libx264 working in Windows?

shampoo

Posted 2012-11-28T11:07:14.930

Reputation: 145

Answers

5

Your ffmpeg has not been configured with --enable-gpl and --enable-libx264 which are required to support encoding with libx264.

You can re-compile, but the easiest solution is to download an already compiled binary from Zeranoe FFmpeg Windows builds which includes libx264 support. Linux and OS X users can refer to the FFmpeg Download page for links to binaries for those systems.

Also see FFmpeg Wiki: H.264 Video Encoding.

llogan

Posted 2012-11-28T11:07:14.930

Reputation: 31 929

1believe it or not i thought about super user, but the conclusion was "i may need some compiling" so i preferred stack overflow. – shampoo – 2012-11-29T06:57:58.107

for compiling with libfaac how should i configure it? --enable-nonfree needs --enable-libfaac too? i know, i can test these configs but windows takes about ten minutes to build ffmpeg.exe using mingw. testing it one config by one config including research for config would probably take one week. – shampoo – 2012-11-29T07:05:51.607