[FFmpeg-user] ffmpeg issue

Reindl Harald h.reindl at thelounge.net
Sun Dec 11 14:04:23 CET 2011



Am 11.12.2011 13:54, schrieb Phil Rhodes:
>>> The windows binaries tend to have everything switched on
> 
>> so do the same on linux
> 
> How? Are there Linux binaries with everything switched on?

compile it yourself or pay someone who does it for you

> Creating a build environment for ffmpeg can be very difficult. Creating a build environment for ffmpeg that
> supports a wide variety of third-party libraries is a major computing project requiring expert skills.

laughable

see SPEC-file for fedora with all Build-Requirements

> I mean, seriously, I assume linux has some sort of standalone executable program format - why is there no
> equivalent of ffmpeg.exe? The windows binaries end up being many, many megabytes with everything included, but the
> point is: they actually work, whereas linux, as we've seen, causes endless problems in this regard.

because linux software usually DOES NOT link static and this is good so
you get an update for an vulnerable librarie ffmpeg is using and
ffmpeg is fixed, for windows you need a new ffmpeg

if you do not like this do not use linux
__________________

[builduser at buildserver64:~]$ cat /rpmbuild/SPECS/ffmpeg.spec
%global snapshot 20111207
%global git 32000

Summary:           Digital VCR and streaming server
Name:              ffmpeg
Version:           0.7.8
Release:           4.%{snapshot}git%{git}%{?dist}
License:           GPLv3+
Group:             Applications/Multimedia
URL:               http://ffmpeg.org/
Source0:           ffmpeg-%{snapshot}.tar.bz2
Source1:           ffmpeg-snapshot.sh
Source2:           ffserver.service
Source3:           ffserver.conf
BuildRoot:         %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:     bzip2-devel
BuildRequires:     dirac-devel
BuildRequires:     faac-devel
BuildRequires:     faad2-devel >= %{faad2min}
BuildRequires:     gsm-devel
BuildRequires:     imlib2-devel
BuildRequires:     lame-devel
BuildRequires:     libdc1394-devel
BuildRequires:     libtheora-devel
BuildRequires:     libvdpau-devel
BuildRequires:     libvorbis-devel
BuildRequires:     openjpeg-devel
BuildRequires:     schroedinger-devel
BuildRequires:     SDL-devel
BuildRequires:     speex-devel
BuildRequires:     texi2html
BuildRequires:     x264-devel >= 0.0.0-0.29.20110622
BuildRequires:     xvidcore-devel
BuildRequires:     zlib-devel
BuildRequires:     opencore-amr-devel
BuildRequires:     libvpx-devel
BuildRequires:     librtmp-devel
BuildRequires:     opencv-devel
BuildRequires:     freetype-devel
Requires:          sh-utils
Requires(pre):     /usr/sbin/useradd
Requires(preun):   systemd-units
Requires(postun):  systemd-units
Obsoletes:         qt-faststart
Patch0:            ffmpeg-libx264-requires.patch

%ifarch %{ix86} x86_64
BuildRequires:     yasm
%endif

%description
FFMpeg is a complete and free Internet live audio and video
broadcasting solution for Linux/Unix. It also includes a digital
VCR. It can encode in real time in many formats including MPEG1 audio
and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash.

%package        libs
Summary:        Libraries for %{name}
Group:          System Environment/Libraries

%description    libs
FFMpeg is a complete and free Internet live audio and video
broadcasting solution for Linux/Unix. It also includes a digital
VCR. It can encode in real time in many formats including MPEG1 audio
and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash.
This package contains the libraries for %{name}

%package        devel
Summary:        Development package for %{name}
Group:          Development/Libraries
Requires:       %{name}-libs = %{version}-%{release}
Requires:       pkgconfig

%description    devel
FFMpeg is a complete and free Internet live audio and video
broadcasting solution for Linux/Unix. It also includes a digital
VCR. It can encode in real time in many formats including MPEG1 audio
and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash.
This package contains development files for %{name}

%global ff_configure \
../configure \\\
    --prefix=%{_prefix} \\\
    --bindir=%{_bindir} \\\
    --datadir=%{_datadir}/ffmpeg \\\
    --incdir=%{_includedir}/ffmpeg \\\
    --libdir=%{_libdir} \\\
    --mandir=%{_mandir} \\\
    --arch=%{_target_cpu} \\\
    --extra-cflags="-O6 -march=core2 -mtune=core2 -mmmx -msse2 -msse3 -msse4.1 -fopenmp -mfpmath=sse
-fno-delete-null-pointer-checks -fstack-protector --param=ssp-buffer-size=4 -pipe -D_FORTIFY_SOURCE=2 -fexceptions" \\\
    --extra-version=thelounge.net \\\
    --enable-nonfree \\\
    --enable-gpl \\\
    --enable-version3 \\\
    --enable-libopencore-amrnb \\\
    --enable-libopencore-amrwb \\\
    --enable-libdc1394 \\\
    --enable-libdirac \\\
    --enable-libfaac \\\
    --enable-libgsm \\\
    --enable-libmp3lame \\\
    --enable-libopenjpeg \\\
    --enable-libschroedinger \\\
    --enable-libspeex \\\
    --enable-libtheora \\\
    --enable-libvorbis \\\
    --enable-libx264 \\\
    --enable-libxvid \\\
    --enable-libvpx \\\
    --enable-librtmp \\\
    --enable-avfilter \\\
    --enable-postproc \\\
    --enable-swscale \\\
    --enable-bzlib \\\
    --enable-zlib \\\
    --enable-libfreetype \\\
    --enable-pthreads \\\
    --enable-fastdiv \\\
    --enable-pic \\\
    --enable-libopencv \\\
    --enable-shared \\\
    --disable-vdpau \\\
    --disable-vaapi \\\
    --disable-hwaccels \\\
    --disable-static \\\
    --disable-debug

%prep
%setup -q -n ffmpeg-%{snapshot}
%patch0 -p1 -b .libx264-requires

%build

mkdir generic
pushd generic

%{ff_configure} \
 --shlibdir=%{_libdir} \
%if 0%{?ffmpegsuffix:1}
 --build-suffix=%{ffmpegsuffix} \
 --disable-doc \
 --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver \
%else
 %ifarch %{ix86}
 --cpu=core2 \
 --enable-pic \
 %endif
 %ifarch %{ix86} x86_64
  --cpu=core2 \
  --enable-runtime-cpudetect \
 %endif
 %ifarch ppc
  --cpu=g3 \
  --enable-runtime-cpudetect \
 %endif
 %ifarch ppc64
  --cpu=g5 \
  --enable-runtime-cpudetect \
 %endif
 %ifarch sparc sparc64
  --disable-vis \
 %endif
%endif

make %{?_smp_mflags}
make documentation
popd

%if 0%{!?ffmpegsuffix:1}
 mkdir simd
 pushd simd
 %ifarch sparc sparc64
  %{ff_configure} \
   --shlibdir=%{_libdir}/v9 \
   --cpu=v9 \
   --enable-vis \
   --disable-ffmpeg \
   --disable-ffserver \
   --disable-ffplay \
   make %{?_smp_mflags}
 %endif
 popd
%endif

# qt-faststart direkt in das ffmpeg-Paket packen
CURRENT_DIR=`pwd`
mkdir -p %{buildroot}/%{_bindir}/
gcc $CURRENT_DIR/tools/qt-faststart.c -o qt-faststart

%install
rm -rf $RPM_BUILD_ROOT
pushd generic
make install DESTDIR=$RPM_BUILD_ROOT
popd
%if 0%{!?ffmpegsuffix:1}
 pushd simd
 %ifarch sparc sparc64
  make install DESTDIR=$RPM_BUILD_ROOT
 %endif
 popd
%endif
install -D -m0755 qt-faststart "%{buildroot}/%{_bindir}/qt-faststart"

# install systemd-service-file
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system
install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT/lib/systemd/system/

# /etc/ffserver.conf
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/ffserver.conf

%clean
rm -rf $RPM_BUILD_ROOT

%pre
/usr/sbin/useradd -M -N -g users -o -r -s /bin/bash -c "ffmpeg streaming server" -u 520 ffserver >/dev/null 2>&1 || :

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig

%post
/bin/touch /var/log/ffserver.log
/bin/chmod 666 /var/log/ffserver.log
/bin/chown ffserver /var/log/ffserver.log

%if 0%{!?ffmpegsuffix:1}
%files
%defattr(-,root,root,-)
%doc COPYING.* CREDITS README doc/ffserver.conf
%{_bindir}/ffmpeg
%{_bindir}/ffplay
%{_bindir}/ffprobe
%{_bindir}/ffserver
%{_bindir}/qt-faststart
%{_mandir}/man1/ffmpeg.1*
%{_mandir}/man1/ffplay.1*
%{_mandir}/man1/ffprobe.1*
%{_mandir}/man1/ffserver.1*
%{_datadir}/ffmpeg
%attr(0644, root, root) /lib/systemd/system/ffserver.service
%attr(0644, root, root) %config(noreplace) %{_sysconfdir}/ffserver.conf
%endif

%files libs
%defattr(-,root,root,-)
%{_libdir}/lib*.so.*
%if 0%{!?ffmpegsuffix:1}
 %ifarch sparc sparc64
  %{_libdir}/v9/lib*.so.*
 %endif
%endif

%files devel
%defattr(-,root,root,-)
%doc MAINTAINERS doc/APIchanges doc/*.txt
%{_includedir}/ffmpeg
%{_libdir}/pkgconfig/lib*.pc
%{_libdir}/lib*.so
%if 0%{!?ffmpegsuffix:1}
 %ifarch sparc sparc64
  %{_libdir}/v9/lib*.so
 %endif
%endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20111211/3422c0a0/attachment.asc>


More information about the ffmpeg-user mailing list