Шукати в цьому блозі

Показ дописів із міткою FFmpeg. Показати всі дописи
Показ дописів із міткою FFmpeg. Показати всі дописи

пʼятниця, 1 жовтня 2010 р.

Ошибка: ffmpeg: relocation error: /usr/local/lib/libavfilter.so.1: symbol sws_isSupportedInput, version LIBSWSCALE_0 not defined in file libswscale.so

На некоторых компьютерах с Ubuntu 10.04.1, после сборке ffmpeg из git наблюдалась ошибка вида:

ffmpeg: relocation error: /usr/local/lib/libavfilter.so.1: symbol sws_isSupportedInput, version LIBSWSCALE_0 not defined in file libswscale.so.0 with link time reference

При инсталяции ffmpeg бросал библиотеки /usr/local/lib/

но ldd `which ffmpeg` выдал:



linux-gate.so.1 => (0x004f8000)
libavdevice.so.52 => /usr/lib/i686/cmov/libavdevice.so.52 (0x00336000)
libavfilter.so.1 => /usr/local/lib/libavfilter.so.1 (0x006ed000)
libavformat.so.52 => /usr/lib/i686/cmov/libavformat.so.52 (0x001fd000)
libavcodec.so.52 => /usr/lib/i686/cmov/libavcodec.so.52 (0x006ff000)
libswscale.so.0 => /usr/lib/i686/cmov/libswscale.so.0 (0x00110000)

libavcore.so.0 => /usr/local/lib/libavcore.so.0 (0x0014b000)
libavutil.so.50 => /usr/local/lib/libavutil.so.50 (0x005a2000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x00150000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x00176000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00340000)
librtmp.so.0 => /usr/lib/i686/cmov/librtmp.so.0 (0x0018f000)
libz.so.1 => /lib/libz.so.1 (0x001a7000)
libxvidcore.so.4 => /usr/lib/libxvidcore.so.4 (0x005b9000)
libx264.so.98 => /usr/lib/libx264.so.98 (0x004f9000)
libopencore-amrwb.so.0 => /usr/lib/libopencore-amrwb.so.0 (0x001bc000)
libopencore-amrnb.so.0 => /usr/lib/libopencore-amrnb.so.0 (0x002d9000)
libmp3lame.so.0 => /usr/lib/libmp3lame.so.0 (0x13fca000)
libgsm.so.1 => /usr/lib/libgsm.so.1 (0x0030c000)
libfaac.so.0 => /usr/lib/libfaac.so.0 (0x0031a000)
/lib/ld-linux.so.2 (0x001e0000)
libssl.so.0.9.8 => /lib/i686/cmov/libssl.so.0.9.8 (0x0049a000)
libcrypto.so.0.9.8 => /lib/i686/cmov/libcrypto.so.0.9.8 (0x0219d000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x1422e000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00571000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x001d6000)


Ссылки на некоторые библиотеки вели /usr/lib/i686/cmov/, где были старые версии библиотек, которые не удовлетворяли последнюю сборку ffmpeg, поскольку я не сильно продвинут в знаниях Linux, решил проблему в лоб, скопировав(переписав) новые необходимые библиотеки поверх старых из каталога /usr/local/lib/.

Или же сменить симлинки библиотек на библиотеки в /usr/local/lib/.

В результате, по крайней мере ffmpeg стал запускаться:

ffmpeg
FFmpeg version git-120610e, Copyright (c) 2000-2010 the FFmpeg developers
built on Oct 1 2010 11:23:47 with gcc 4.4.3
configuration: --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-version3 --enable-yasm --enable-libgsm --enable-libfaac --enable-libx264 --enable-libxvid --enable-librtmp
libavutil 50.27. 0 / 50.27. 0
libavcore 0. 9. 0 / 0. 9. 0
libavcodec 52.89. 0 / 52.89. 0
libavformat 52.78. 5 / 52.78. 5
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.39. 0 / 1.39. 0
libswscale 0.11. 0 / 0.11. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

середа, 22 вересня 2010 р.

Cборка ffmpeg с поддержкой librtmp в Ubuntu 10.04.1 server

Принимаем, что librtmp уже установлена.

Скачиваем последний ffmpeg:
sudo apt-get install git-core
git clone git://git.ffmpeg.org/ffmpeg/
cd ffmpeg
git clone git://git.ffmpeg.org/libswscale/


Cмотрим доступные функции для конфигурирования:

~/ffmpeg$ ./configure --help

Usage: configure [options]
Options: [defaults in brackets after descriptions]
Standard options:
--help print this message
--logfile=FILE log tests and output to FILE [config.log]
--disable-logging do not log configure debug information
--prefix=PREFIX install in PREFIX []
--bindir=DIR install binaries in DIR [PREFIX/bin]
--datadir=DIR install data files in DIR [PREFIX/share/ffmpeg]
--libdir=DIR install libs in DIR [PREFIX/lib]
--shlibdir=DIR install shared libs in DIR [PREFIX/lib]
--incdir=DIR install includes in DIR [PREFIX/include]
--mandir=DIR install man page in DIR [PREFIX/share/man]

Configuration options:
--disable-static do not build static libraries [no]
--enable-shared build shared libraries [no]
--enable-gpl allow use of GPL code, the resulting libs
and binaries will be under GPL [no]
--enable-version3 upgrade (L)GPL to version 3 [no]
--enable-nonfree allow use of nonfree code, the resulting libs
and binaries will be unredistributable [no]
--disable-doc do not build documentation
--disable-ffmpeg disable ffmpeg build
--disable-ffplay disable ffplay build
--disable-ffprobe disable ffprobe build
--disable-ffserver disable ffserver build
--disable-avdevice disable libavdevice build
--disable-avcodec disable libavcodec build
--disable-avcore disable libavcore build
--disable-avformat disable libavformat build
--disable-swscale disable libswscale build
--enable-postproc enable GPLed postprocessing support [no]
--disable-avfilter disable video filter support [no]
--disable-pthreads disable pthreads [auto]
--enable-w32threads use Win32 threads [no]
--enable-x11grab enable X11 grabbing [no]
--disable-network disable network support [no]
--disable-mpegaudio-hp faster (but less accurate) MPEG audio decoding [no]
--enable-gray enable full grayscale support (slower color)
--disable-swscale-alpha disable alpha channel support in swscale
--disable-fastdiv disable table-based division
--enable-small optimize for size instead of speed
--disable-aandct disable AAN DCT code
--disable-dct disable DCT code
--disable-fft disable FFT code
--disable-golomb disable Golomb code
--disable-huffman disable Huffman code
--disable-lpc disable LPC code
--disable-mdct disable MDCT code
--disable-rdft disable RDFT code
--disable-vaapi disable VAAPI code
--disable-vdpau disable VDPAU code
--disable-dxva2 disable DXVA2 code
--enable-runtime-cpudetect detect cpu capabilities at runtime (bigger binary)
--enable-hardcoded-tables use hardcoded tables instead of runtime generation
--enable-memalign-hack emulate memalign, interferes with memory debuggers
--disable-everything disable all components listed below
--disable-encoder=NAME disable encoder NAME
--enable-encoder=NAME enable encoder NAME
--disable-encoders disable all encoders
--disable-decoder=NAME disable decoder NAME
--enable-decoder=NAME enable decoder NAME
--disable-decoders disable all decoders
--disable-hwaccel=NAME disable hwaccel NAME
--enable-hwaccel=NAME enable hwaccel NAME
--disable-hwaccels disable all hwaccels
--disable-muxer=NAME disable muxer NAME
--enable-muxer=NAME enable muxer NAME
--disable-muxers disable all muxers
--disable-demuxer=NAME disable demuxer NAME
--enable-demuxer=NAME enable demuxer NAME
--disable-demuxers disable all demuxers
--enable-parser=NAME enable parser NAME
--disable-parser=NAME disable parser NAME
--disable-parsers disable all parsers
--enable-bsf=NAME enable bitstream filter NAME
--disable-bsf=NAME disable bitstream filter NAME
--disable-bsfs disable all bitstream filters
--enable-protocol=NAME enable protocol NAME
--disable-protocol=NAME disable protocol NAME
--disable-protocols disable all protocols
--disable-indev=NAME disable input device NAME
--disable-outdev=NAME disable output device NAME
--disable-indevs disable input devices
--disable-outdevs disable output devices
--disable-devices disable all devices
--enable-filter=NAME enable filter NAME
--disable-filter=NAME disable filter NAME
--disable-filters disable all filters
--list-decoders show all available decoders
--list-encoders show all available encoders
--list-hwaccels show all available hardware accelerators
--list-muxers show all available muxers
--list-demuxers show all available demuxers
--list-parsers show all available parsers
--list-protocols show all available protocols
--list-bsfs show all available bitstream filters
--list-indevs show all available input devices
--list-outdevs show all available output devices
--list-filters show all available filters

External library support:
--enable-avisynth enable reading of AVISynth script files [no]
--enable-bzlib enable bzlib [autodetect]
--enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
--enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
--enable-libopencv enable video filtering via libopencv [no]
--enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
and libraw1394 [no]
--enable-libdirac enable Dirac support via libdirac [no]
--enable-libfaac enable FAAC support via libfaac [no]
--enable-libgsm enable GSM support via libgsm [no]
--enable-libmp3lame enable MP3 encoding via libmp3lame [no]
--enable-libnut enable NUT (de)muxing via libnut,
native (de)muxer exists [no]
--enable-libopenjpeg enable JPEG 2000 decoding via OpenJPEG [no]
--enable-librtmp enable RTMP[E] support via librtmp [no]
--enable-libschroedinger enable Dirac support via libschroedinger [no]
--enable-libspeex enable Speex decoding via libspeex [no]
--enable-libtheora enable Theora encoding via libtheora [no]
--enable-libvorbis enable Vorbis encoding via libvorbis,
native implementation exists [no]
--enable-libvpx enable VP8 support via libvpx [no]
--enable-libx264 enable H.264 encoding via x264 [no]
--enable-libxavs enable AVS encoding via xavs [no]
--enable-libxvid enable Xvid encoding via xvidcore,
native MPEG-4/Xvid encoder exists [no]
--enable-mlib enable Sun medialib [no]
--enable-zlib enable zlib [autodetect]

Advanced options (experts only):
--source-path=PATH path to source code [/home/emutant/ffmpeg]
--cross-prefix=PREFIX use PREFIX for compilation tools []
--enable-cross-compile assume a cross-compiler is used
--sysroot=PATH root of cross-build tree
--sysinclude=PATH location of cross-build system headers
--target-os=OS compiler targets OS []
--target-exec=CMD command to run executables on target
--target-path=DIR path to view of build directory on target
--nm=NM use nm tool
--ar=AR use archive tool AR [ar]
--as=AS use assembler AS []
--cc=CC use C compiler CC [gcc]
--ld=LD use linker LD
--host-cc=HOSTCC use host C compiler HOSTCC
--host-cflags=HCFLAGS use HCFLAGS when compiling for host
--host-ldflags=HLDFLAGS use HLDFLAGS when linking for host
--host-libs=HLIBS use libs HLIBS when linking for host
--extra-cflags=ECFLAGS add ECFLAGS to CFLAGS []
--extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS []
--extra-libs=ELIBS add ELIBS []
--extra-version=STRING version string suffix []
--build-suffix=SUFFIX library name suffix []
--arch=ARCH select architecture []
--cpu=CPU select the minimum required CPU (affects
instruction selection, may crash on older CPUs)
--disable-asm disable all assembler optimizations
--disable-altivec disable AltiVec optimizations
--disable-amd3dnow disable 3DNow! optimizations
--disable-amd3dnowext disable 3DNow! extended optimizations
--disable-mmx disable MMX optimizations
--disable-mmx2 disable MMX2 optimizations
--disable-sse disable SSE optimizations
--disable-ssse3 disable SSSE3 optimizations
--disable-armv5te disable armv5te optimizations
--disable-armv6 disable armv6 optimizations
--disable-armv6t2 disable armv6t2 optimizations
--disable-armvfp disable ARM VFP optimizations
--disable-iwmmxt disable iwmmxt optimizations
--disable-mmi disable MMI optimizations
--disable-neon disable neon optimizations
--disable-vis disable VIS optimizations
--disable-yasm disable use of yasm assembler
--enable-pic build position-independent code
--malloc-prefix=PFX prefix malloc and related names with PFX
--enable-sram allow use of on-chip SRAM

Developer options (useful when working on FFmpeg itself):
--disable-debug disable debugging symbols
--enable-debug=LEVEL set the debug level []
--disable-optimizations disable compiler optimizations
--enable-extra-warnings enable more compiler warnings
--disable-stripping disable stripping of executables and shared libraries
--samples=PATH location of test samples for FATE

NOTE: Object files are built at the place where configure is launched.


Вот она поддержка: --enable-librtmp enable RTMP[E] support via librtmp [no]

Смотрим текущую конфигурацию ffmpeg

ffmpeg
FFmpeg version 0.5.1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-version3 --enable-yasm --enable-libfaad --enable-libgsm --enable-libfaac --enable-libx264 --enable-libxvid


Конфигурим с теми же параметрами, так как необходимые библиотеки у нас есть, добавляем ьолько поддержку librtmp (параметр --enable-librtmp):

./configure --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-version3 --enable-yasm --enable-libgsm --enable-libfaac --enable-libx264 --enable-libxvid --enable-librtmp

Собираем и устанавливаем:

make
sudo make install
make clean


Пытаемся запустить:

ffmpeg
ffmpeg: error while loading shared libraries: libavcore.so.0: cannot open shared object file: No such file or directory


Смотрим зависимости (ldd - print shared library dependencies):

ldd `which ffmpeg`
linux-vdso.so.1 => (0x00007fff9fdff000)
libavdevice.so.52 => /usr/local/lib/libavdevice.so.52 (0x00007fcc383c5000)
libavfilter.so.1 => /usr/lib/libavfilter.so.1 (0x00007fcc381b8000)
libavformat.so.52 => /usr/local/lib/libavformat.so.52 (0x00007fcc37ee1000)
libavcodec.so.52 => /usr/local/lib/libavcodec.so.52 (0x00007fcc3721a000)
libswscale.so.0 => /usr/lib/libswscale.so.0 (0x00007fcc36fc5000)
libavcore.so.0 => not found
libavutil.so.50 => /usr/lib/libavutil.so.50 (0x00007fcc36db2000)
libm.so.6 => /lib/libm.so.6 (0x00007fcc36b2f000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fcc36911000)
libc.so.6 => /lib/libc.so.6 (0x00007fcc3658e000)
libavcore.so.0 => not found
libavcore.so.0 => not found
librtmp.so.0 => /usr/lib/librtmp.so.0 (0x00007fcc36374000)
libz.so.1 => /lib/libz.so.1 (0x00007fcc3615d000)
libavcore.so.0 => not found
libxvidcore.so.4 => /usr/lib/libxvidcore.so.4 (0x00007fcc35e4e000)
libx264.so.98 => /usr/lib/libx264.so.98 (0x00007fcc35bb7000)
libopencore-amrwb.so.0 => /usr/lib/libopencore-amrwb.so.0 (0x00007fcc3599a000)
libopencore-amrnb.so.0 => /usr/lib/libopencore-amrnb.so.0 (0x00007fcc35760000)
libmp3lame.so.0 => /usr/lib/libmp3lame.so.0 (0x00007fcc354e5000)
libgsm.so.1 => /usr/lib/libgsm.so.1 (0x00007fcc352d6000)
libfaac.so.0 => /usr/lib/libfaac.so.0 (0x00007fcc350c4000)
/lib64/ld-linux-x86-64.so.2 (0x00007fcc385da000)
libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0x00007fcc34e21000)
libgcrypt.so.11 => /lib/libgcrypt.so.11 (0x00007fcc34ba9000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fcc34895000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007fcc3467d000)
libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0x00007fcc3446c000)
libgpg-error.so.0 => /lib/libgpg-error.so.0 (0x00007fcc34268000)


И где же наш libavcore.so.0 ?

find /usr/local/lib/ | grep -E "libavcore.so.0"

/usr/local/lib/libavcore.so.0.9.0
/usr/local/lib/libavcore.so.0


Далее

cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf


Добавим:

sudo nano /etc/ld.so.conf
/usr/local/libevent-1.4.14b/lib
/usr/local/lib

sudo ldconfig



Запускаем ffmpeg:

ffmpeg
FFmpeg version git-120610e, Copyright (c) 2000-2010 the FFmpeg developers
built on Sep 21 2010 16:50:07 with gcc 4.4.3
configuration: --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-version3 --enable-yasm --enable-libgsm --enable-libfaac --enable-libx264 --enable-libxvid --enable-librtmp
libavutil 50.27. 0 / 50.27. 0
libavcore 0. 9. 0 / 0. 9. 0
libavcodec 52.89. 0 / 52.89. 0
libavformat 52.78. 5 / 52.78. 5
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.39. 0 / 1.39. 0
libswscale 0.11. 0 / 0.11. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'


Собран, работает :)

В процессе поиска неисправностей читался источник.

субота, 18 вересня 2010 р.

UPD: Linux (Ubuntu) + ffmpeg with amr, mp3, faac, libgsm

Дополнительно к заметке.

п.6. В версии Ubuntu 10.04 Package libopencore-amrnb-dev и libopencore-amrwb-dev

Если хотим добавить libgsm :

sudo apt-get install libgsm1-dev libgsm-tools

Информация о пакетах (Ubuntu libgsm package):

libgsm-tools: User binaries for a GSM speech compressor
libgsm1: Shared libraries for GSM speech compressor
libgsm1-dbg: Shared libraries for GSM speech compressor (debug symbols)
libgsm1-dev: Development libraries for a GSM speech compressor



UPD 30.09.2010: В Ubuntu 10.04 ("Lucid Lynx") если необходимо установить libxvid.

Необходимо вместо libxvidcore4-dev указывать в комманде libxvidcore-dev т.е.

sudo apt-get install libxvidcore-dev

понеділок, 12 жовтня 2009 р.

Linux (Ubuntu) + ffmpeg with amr, mp3, faac, faad

Исходные данные:
ОС - Ubunu server 9.04 в минимальной конфигурации.
Необходимо собрать ffmpeg c поддержкой amr,faac,faad,mp3,h264

1) обновляемся sudo apt-get update && sudo apt-get upgrade

2) sudo apt-get install build-essential

3) скачиваем исходники ffmpeg wget http://ffmpeg.org/releases/ffmpeg-export-snapshot.tar.bz2,
можно с svn svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg, но у меня прокси не пропускает.

4) для х264 apt-get install libx264-dev
правда могут случиться исключения, у некоторых камрадов, с этим пакетом ffmpeg, не собирался, потому есть вариант слить исходники и скомпилировать:
git clone git://git.videolan.org/x264.git , но опять мой прокси не пропускает, потому исходники перенес на флешке.

распаковываем, далее
cd x264/
./configure
make && make install

5) apt-get install libgpac-dev libmp3lame-dev libfaac-dev libfaad-dev

6) AMR sudo apt-get install libamrnb-dev libamrwb-dev можно так, но я предпочел скачать исходники с http://opencore-amr.sourceforge.net и собрать кодеки из них.

7) распаковываем и заходим в каталог ffmpeg-export-snapshot
./configure --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-shared --enable-libfaac --enable-libmp3lame --enable-gpl --enable-nonfree --enable-version3 --enable-libfaad --enable-yasm


make && make install

После конфигурирования, зборки и установки обнаружился при запуске сбой:
error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory
В источнике №2 было найдено решение:
cd /etc/ld.so.conf.d
echo /usr/local/lib > custom-libs.conf
/usr/local/lib

Как результат:
ffmpeg
FFmpeg version SVN-r20192-snapshot, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 12 2009 14:14:37 with gcc 4.3.3
configuration: --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-shared --enable-libfaac --enable-libmp3lame --enable-gpl --enable-nonfree --enable-version3 --enable-libfaad --enable-yasm
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.36. 0 / 52.36. 0
libavformat 52.39. 0 / 52.39. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
At least one output file must be specified


Были использованы следующие источники:
источник №1
источник №2
источник №3



UPD: 18.09.2010

четвер, 24 вересня 2009 р.

Установка ffmpeg с использованием MacPorts с поддержкой amr, faad, faac аудио кодеков в Mac OS X "Snow Leopard"

Исходные данные:
Обновленная система Mac OS X "Snow Leopard".
Установленые MacPorts
Установленый пакет XCode

Для начала необходимо переустановить пакет разработчика, а также обновить порты:
Обновление портов:

sudo ports -v selfupdate

рекомендуемо обновляем установленые с портов приложения

sudo port update outdate

Велика вероятность того, что часть приложений не сможет обновиться, опытным путем была
установлена следующая процедура:
- удаление "капризных" приложений sudo port uninstall portname
- установка из обновленного дерева портов вручную sudo port install portname
Как правило, в большинствеслучаев такое нелогичное "шаманство" помогает.
Ставим заново с портов кодеки faac и faad2.

sudo port install faac
sudo port install faad2

Хотя при установке правильных ключей, и сборке ffmpeg из портов, эти кодеки должны установиться по зависимости.

На официальном сайте http://ffmpeg.org/ есть новость:
July 24, 2009
FFmpeg has removed support for libamr as of svn revision 19365. It has been replaced with support for libopencore-amr. Naturally the configure options have changed. The libamr options have been removed and there are two new options to take their place:

* --enable-libopencore-amrnb
* --enable-libopencore-amrwb

The reason for this change is that the libamr license was non-free, while libopencore-amr is licensed under an Apache 2 license. The change was discussed at length on the developer mailing list during May, June, and July. This has several effects:

* You may now distribute FFmpeg builds with support for dynamically loading libopencore-amr
* Support for AMR-WB encoding has been removed since libopencore-amr does not support it

Что значит, что начиная svn сверсии 19365 поддержка в ffmpeg "несвободной" версии отановлена, далнейшее развитие подразумевает
использование libopencore-amr, исходники которой можно найти на ресуре http://opencore-amr.sourceforge.net/

В свою очередь, в портах версия ffmpeg 0.5 с поддержкой non-free кодеков, поэтому скачиваем последние актуальные исходники libamr.

Например, на ресурсе http://ftp.penguin.cz/pub/users/utx/amr/ были найдены исходники:

http://ftp.penguin.cz/pub/users/utx/amr/amrnb-7.0.0.2.tar.bz2
http://ftp.penguin.cz/pub/users/utx/amr/amrwb-7.0.0.3.tar.bz2

датированные 22.05.2008

скачиваем, распаковываем, устанавливаем:

tar -jxvf amrnb-7.0.0.2.tar.bz2
cd amrnb-7.0.0.2
./configure
make
sudo make install

tar -jxvf amrwb-7.0.0.3.tar.bz2
cd amrwb-7.0.0.3.tar.bz2
./configure
make
sudo make install

Теперь необходимо отредактировать параметры сборки ffmpeg.

sudo port edit ffmpeg

Раздел аргументов кофигурирования должен содержать следующие ключи:

--enable-libfaac \
--enable-libfaad \
--enable-libamr-nb \
--enable-libamr-wb \
--enable-nonfree \

Выходим из редактора сохранив изменения.


Собираем ffmpeg:

sudo port install ffmpeg.

В идеале в конце имеем собраный ffmpeg с поддержкой amr:

ffmpeg
FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --prefix=/opt/local --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-avfilter-lavf --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libfaac --enable-libfaad --enable-libxvid --enable-libx264 --enable-libamr-nb --enable-libamr-wb --enable-nonfree --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/gcc-4.0 --arch=i386
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 1. 4. 0 / 1. 4. 0
libswscale 1. 7. 1 / 1. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Sep 24 2009 20:18:37, gcc: 4.0.1 (Apple Inc. build 5490)
At least one output file must be specified


Источники:

http://sda00.blogspot.com/2008_03_01_archive.html
http://ubuntuforums.org/showthread.php?t=491885
http://ffmpeg.org/

субота, 15 листопада 2008 р.

CentOS 5.2 + FFMpeg

Как-то так сложилось, что в CentOS FFMpeg из дефолтных репозитариев не ставиться, нет его там.
Чтоб не ставить все руцями качать кучу зависимых файлов искался репозитарий, решение было найдено здесь

Добавляем репозитарий:

nano -w /etc/yum.repos.d/dag.repo

Добавляем:

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1

Закачиваем и импортируем ключ:
wget http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
rpm --import RPM-GPG-KEY.dag.txt


Устанавливаем:

yum update
yum install ffmpeg