4
2
I'm trying to compile ffmpeg with minimal requirements in order to encode/decode with h264.
So far my command line configuration is :
./configure --disable-yasm --disable-everything --enable-encoder=libx264 --enable-encoder=libfaac --enable-decoder=h264 --enable-muxer=h264 --enable-demuxer=h264 --enable-parser=h264 --enable-protocol=file
once compiled, I try this :
./ffmpeg -i ~/Dropbox/TestFile.mov -vcodec libx264 test.mp4
but I get an error :
ffmpeg version N-58081-g2925571 Copyright (c) 2000-2013 the FFmpeg developers
built on Nov 14 2013 15:49:58 with Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
configuration: --disable-yasm --disable-everything --enable-encoder=libx264 --enable-encoder=libfaac --enable-decoder=h264 --enable-muxer=h264 --enable-demuxer=h264 --enable-parser=h264 --enable-protocol=file
libavutil 52. 52.100 / 52. 52.100
libavcodec 55. 43.100 / 55. 43.100
libavformat 55. 21.100 / 55. 21.100
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 91.100 / 3. 91.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/mGs/Dropbox/TestFile.mov':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2013-06-23 14:33:09
model : iPhone 4S
model-fra : iPhone 4S
encoder : 6.0
encoder-fra : 6.0
date : 2013-06-23T16:33:09+0200
date-fra : 2013-06-23T16:33:09+0200
make : Apple
make-fra : Apple
Duration: 00:00:42.09, start: 0.000000, bitrate: 20960 kb/s
Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 20880 kb/s, 29.97 fps, 29.97 tbr, 600 tbn, 1200 tbc (default)
Metadata:
rotate : 180
creation_time : 2013-06-23 14:33:09
handler_name : Core Media Data Handler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, 63 kb/s (default)
Metadata:
creation_time : 2013-06-23 14:33:09
handler_name : Core Media Data Handler
[NULL @ 0x7fd999802e00] Unable to find a suitable output format for 'test.mp4'
test.mp4: Invalid argument
This is probably coming from the fact that I have forgot something to enable on the ffmpeg configuration... But I can't found out what.
The test file is a video got from iPhone 4S Camera.
EDIT :
Enabled decoders:
h264
Enabled encoders:
Enabled hwaccels:
Enabled parsers:
h264
Enabled demuxers:
asf mov rm
h264 mpegts rtsp
Enabled muxers:
ffm h264
Enabled protocols:
file rtp udp
http tcp
Enabled filters:
aformat format trim
anull null
atrim setpts
Apparently it does not activate the encoder libx264 although I have specified it in my command line...
Did root ever resolve this? – Guy – 2014-09-22T15:31:23.493
I wouldn't recommend --disable-yasm that sounds pretty scary :) – rogerdpack – 2015-09-29T22:12:09.630
Why do you want to disable everything? – Elliott B – 2016-04-27T08:15:47.783
--disable-everything
? If you choose that, everything you enable will be disabled, notably the--enable-encoder=
parts. I think you need--enable-libx264
at the very least. – slhck – 2013-11-14T18:23:12.6801doesn't --disable-everything will let me enable things one by one ? – TheSquad – 2013-11-14T20:21:35.847
Not sure – I haven't tried recompiling. I was just looking at the
configure
script. It basically unsets all the components. – slhck – 2013-11-14T20:36:19.440@slhck : I have checked on the configuration, it enables correctly the codec I want one by one, see the post EDITED :-) – TheSquad – 2013-11-15T11:21:57.703
No, it does not. Your list shows
Enabled encoders:
as empty. You should have at leastlibx264
there. – slhck – 2013-11-15T11:30:44.487@slhck Yes I have noted it on the EDIT, but even if I only configure with ./configure --disable-yasm it doesn't show on the list... – TheSquad – 2013-11-15T11:31:55.743
I will try to install yasm to see if libx264 is disabled because of that – TheSquad – 2013-11-15T11:34:26.973
nope, even with yasm, libx264 does not appear on the list... – TheSquad – 2013-11-15T11:36:01.293
Again, that's because
--disable-everything
disables everything. You can't selectively re-enable components after that../configure --enable-libx264 --enable-gpl
is the minimum you need. From there you could start disabling things manually that you don't need, of course. – slhck – 2013-11-15T12:07:00.133@slhck If he just installed yasm, then how was h264 compiled? One needs yasm to compile x264. – Rajib – 2013-11-16T13:51:32.397
@Rajib
h264
is ffmpeg-internal. Not an external library. – slhck – 2013-11-16T16:31:56.617@slhck Sorry I meant libx264- because the config you suggest is
--enable-libx264
. – Rajib – 2013-11-16T16:54:52.723