Closed totaam closed 12 years ago
Looks, good.
- shouldn't we be using a specific release rather straight off svn for ffmpeg and x264? This would make the build more reliable?
- I think the pkgconfig changes could be included in the main xpra source tree as a patch ("enable-videolibs-static.patch"), and applied via the rpm spec file for the platforms that need it?
- if ffmpeg is available as a static library then there is no reason not to allow vpx, iirc centos 6 has it out of the box (only centos 5 will need it disabled now - or the same static library could be built for vpx)
- a specific release is not necessary - it will allow us to catch problems when they arise
- I'm fine with enable-videolibs-static.patch, just let me know what you expect me to do
- centos 6's vpx doesn't seem to build correctly, so you have to build libvpx from source as for the others - instructions added
- I'm not convinced by the "catch problems when they arise" at all, the libraries are unlikely to be rebuilt once I have them in the build chroot. If something breaks, we will not know until we try. I much prefer having 100% reproducible instructions. But this will do for now.
- I'll do the patches + specfile changes
- vpx: ok, will do
done in r701, centos rpms now have static x264/vpx support
(if I have time, I will do the same for the other builds which are missing x264/vpx: opensuse, fedora unreleased, old debian/ubuntu..)
Milestone current deleted
Updated instructions adding libvpx 1.1 and
--enable-memalign-hack
and better VPX options (favour realtime, etc):cd /tmp git clone git://git.videolan.org/ffmpeg.git ffmpeg git clone git://git.videolan.org/x264.git wget http://webm.googlecode.com/files/libvpx-v1.1.0.tar.bz2 cd x264 ./configure --enable-shared --enable-static make && make install cd .. cd ffmpeg ./configure --enable-static --enable-shared --disable-debug --enable-gpl \ --enable-runtime-cpudetect --disable-doc --disable-ffplay --disable-ffprobe \ --disable-ffserver --disable-vaapi --disable-vdpau --disable-everything \ --enable-decoder=h264 --enable-memalign-hack make && make install cd .. tar jxvf libvpx-v1.1.0.tar.bz2 cd libvpx-v1.1.0 ./configure --enable-pic --disable-install-docs --enable-shared --enable-static \ --enable-vp8 --enable-realtime-only --enable-onthefly-bitpacking --enable-runtime-cpu-detect make && make install cd ..
Not all versions of x264 work... Here are some that are known to build and work correctly:
x264-snapshot-20120329-2245
x264-snapshot-20120712-2245-stable
Updated instructions valid as of r2681: the latest static builds use the following versions and build commands (loosely based on these ones for osx):
curl -O https://webm.googlecode.com/files/libvpx-v1.1.0.tar.bz2 tar -jxf libvpx-v1.1.0.tar.bz2 cd libvpx-v1.1.0 ./configure --enable-pic --disable-install-docs --enable-shared --enable-static \ --enable-vp8 --enable-realtime-only --enable-onthefly-bitpacking --enable-runtime-cpu-detect make && make install mkdir /usr/local/include/vpx/ cp vpx/vpx_*h /usr/local/include/vpx/ cd .. curl -O http://libav.org/releases/libav-9.1.tar.gz tar -zxf libav-9.1.tar.gz cd libav-9.1 ./configure --enable-runtime-cpudetect --enable-static --enable-shared \ --disable-avdevice --enable-pic make && make install cd .. curl -O ftp://ftp.videolan.org/pub/x264/snapshots/x264-snapshot-20130205-2245-stable.tar.bz2 rm -fr x264-snapshot-20130205-2245-stable tar -jxf x264-snapshot-20130205-2245-stable.tar.bz2 cd x264-snapshot-20130205-2245-stable ./configure --enable-shared --enable-static make && make install cd .. rm -fr libav-9.2 tar -zxf libav-9.2.tar.gz cd libav-9.2 ./configure --enable-runtime-cpudetect --enable-static --enable-shared \ --enable-memalign-hack \ --disable-avdevice --enable-pic --disable-zlib \ --disable-filters --disable-everything \ --enable-libx264 --enable-gpl --enable-decoder=h264 make && make install cd ..
Note: the x264 snapshot name is hardcoded here, you should probably use something newer by the time you read this.
To cross-compile libav for win32, use the following configure command:
./configure --enable-runtime-cpudetect --enable-static --enable-shared --enable-gpl \ --enable-memalign-hack --disable-avdevice \ --disable-dxva2 --disable-everything --enable-decoder=h264 \ --cross-prefix=i486-mingw32- --enable-cross-compile \ --target-os=mingw32 --arch=x86 --prefix=/tmp/mingw32_ffmpeg_ah \ --disable-decoders --enable-decoder=h264 --enable-decoder=h263
This will generate a minimal libav (without dxva2 - enabling it requires manually copying a header file from VLC's source code) usable for dynamic and static linking.
As of this writing, latest libav git requires h263 to be built otherwise we get the following error:
libavcodec/x86/dsputil.o:libavcodec/x86/dsputil.asm:(.text+0x12b0): \ undefined reference to `ff_h263_loop_filter_strength'
the win32 stuff has been moved to #270 (which is now also done) since this is an already closed ticket about
CentOS
.
Issue migrated from trac ticket # 103
component: core | priority: minor | resolution: fixed
2012-04-03 14:04:49: ahuillet created the issue