IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

SDL Discussion :

Comment compiler ffmpeg pour un usage avec la SDL


Sujet :

SDL

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé Avatar de Froyok
    Profil pro
    Inscrit en
    Décembre 2008
    Messages
    83
    Détails du profil
    Informations personnelles :
    Âge : 35
    Localisation : France, Indre et Loire (Centre)

    Informations forums :
    Inscription : Décembre 2008
    Messages : 83
    Par défaut Comment compiler ffmpeg pour un usage avec la SDL
    Bonjour/Bonsoir à tous, voilà, j'ai trouvé une discussion au fil de me recherche sur Developpez qui indiquait que ffmepg étais très approprié pour la lecture de vidéos sous la SDL. J'ai mis la main sur les sources (sur le site officiel), ainsi que sur un tutorial (ici : http://www.dranger.com/ffmpeg/tutorial01.html ) pour parvenir à cela.

    Sauf que je ne sais en fait pas du tout comment procéder... Dois-je compiler ffmepg ? Je pense que oui, mais comment ? Je suis sous windows seven, et malgré cygwin ou mingw32-make, je ne suis pas un adepte des makefile.

    Donc je suis perdu, dois-je la compiler ? Si oui comment ?
    Je suppose que je ne suis pas le premier à demander de l'aide à ce niveau, mais dans le cas d'un usage avec la sdl, il y a t'il une configuration particulière à opérer ?

    Merci d'avance !

  2. #2
    Membre Expert
    Avatar de coyotte507
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    1 327
    Détails du profil
    Informations personnelles :
    Âge : 35
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 1 327
    Par défaut
    Sous Linux il suffit de faire ./configure

    Sinon en regardant sur google "ffmpeg windows" j'ai obtenu ça:

    http://urzhiata.emoc.org/comment-ins...indows-xp.html

    Après il te suffit de suivre le tutoriel SDL+ffmpeg, je pense, en linkant bien la librairie.

  3. #3
    Membre confirmé Avatar de Froyok
    Profil pro
    Inscrit en
    Décembre 2008
    Messages
    83
    Détails du profil
    Informations personnelles :
    Âge : 35
    Localisation : France, Indre et Loire (Centre)

    Informations forums :
    Inscription : Décembre 2008
    Messages : 83
    Par défaut
    J'ai vu que ./configure aurait pu m'aider, mais malheureusement, j'aimerias compiler sous windows ffmpeg, et mingw-maker ne reconnait pas tel quel la commande configure...

    Enfin, ton lien ne renvois que vers des binaires, pas de librairie de développement hélas...

    Merci néanmoins de m'avoir répondu !

  4. #4
    Membre Expert
    Avatar de coyotte507
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    1 327
    Détails du profil
    Informations personnelles :
    Âge : 35
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 1 327

  5. #5
    Membre confirmé Avatar de Froyok
    Profil pro
    Inscrit en
    Décembre 2008
    Messages
    83
    Détails du profil
    Informations personnelles :
    Âge : 35
    Localisation : France, Indre et Loire (Centre)

    Informations forums :
    Inscription : Décembre 2008
    Messages : 83
    Par défaut
    Merci beaucoup, grâce à toi j'ai trouvé les librairie et les includes pour windows qui normalement me permettront de coder sous windows...

    Je dis bien normalement, car il semblerait que j'ai besoin de vc++.


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    #ifndef _MSC_VER // [
    #error "Use this header only with Microsoft Visual C++ compilers!"
    #endif // _MSC_VER ]
    dans le stdint.h fournit avec...


    Et comment je m'en sort avec mingw et code::blocks ?

  6. #6
    Membre Expert
    Avatar de coyotte507
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    1 327
    Détails du profil
    Informations personnelles :
    Âge : 35
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 1 327
    Par défaut
    Honnêtement je ne sais pas,

    mais ils disent ça:

    FFmpeg Win32 Unofficial Builds
    Here you'll find Win32 MinGW builds of FFmpeg SVN (with FFplay).
    Both static and shared.
    Both in .tar.bz2 and .zip format.
    The shared packages contain the libs needed to use with MSVC++.
    Ce qui voudrait dire qu'il y a les librairies nécessaires pour MSVC++, mais qu'il y a les autres aussi.

    Donc à toi d'inclure le bon fichier/linker la bonne librairie.

    Finalement j'ai téléchargé le deuxième fichier ("How to builds and patches") et voilà ce qui est écrit dans le README:

    Go to http://ffmpeg.arrozcru.org/wiki for the latest build instructions.

    Build system:

    gcc 4.2.4
    nasm 2.05.01
    yasm 0.7.2
    w32api 3.13
    mingw-runtime 3.15.1
    binutils 2.18.50


    Extra libraries included:

    zlib 1.2.3
    http://www.zlib.net/

    $ tar zxfv zlib-1.2.3.tar.gz
    $ cd zlib-1.2.3
    $ ./configure --prefix=/mingw
    $ make
    $ make install

    pthreads-win32 2.8.0
    http://sourceware.org/pthreads-win32/

    $ tar zxfv pthreads-w32-2-8-0-release.tar.gz
    $ patch -p0 < pthreads-w32-2-8-0.diff
    $ cd pthreads-w32-2-8-0-release
    $ make clean GC-static
    $ cp libpthreadGC2.a /mingw/lib
    $ cp pthread.h sched.h /mingw/include

    libfaac 1.26
    http://www.audiocoding.com/

    $ tar zxfv faac-1.26.tar.gz
    $ patch -p0 < faac-1.26.diff
    $ cd faac
    $ sh bootstrap
    $ ./configure --prefix=/mingw --enable-static --disable-shared
    $ make
    $ make install

    lame 3.98.2
    http://lame.sourceforge.net/

    $ tar zxfv lame-398-2.tar.gz
    $ cd lame-398-2
    $ patch -p0 < ../lame-398-2.diff
    $ ./configure --prefix=/mingw --disable-shared --enable-static --disable-frontend --enable-nasm
    $ make
    $ make install

    libogg 1.1.3
    http://www.xiph.org/

    $ tar zxfv libogg-1.1.3.tar.gz
    $ cd libogg-1.1.3
    $ ./configure --prefix=/mingw --enable-static --disable-shared
    $ make
    $ make install

    libvorbis 1.2.0
    http://www.xiph.org/

    $ tar zxfv libvorbis-1.2.0.tar.gz
    $ cd libvorbis-1.2.0
    $ ./configure --prefix=/mingw --enable-static --disable-shared
    $ make
    $ make install

    libtheora 1.0
    http://www.xiph.org/

    $ tar xfvj libtheora-1.0.tar.bz2
    $ cd libtheora-1.0
    $ ./configure --prefix=/mingw --enable-static --disable-shared
    $ make
    $ make install

    speex-1.2rc1.tar.gz
    http://www.xiph.org/

    $ tar zxfv speex-1.2rc1.tar.gz
    $ cd speex-1.2rc1
    $ ./configure --prefix=/mingw --enable-static --disable-shared
    $ make
    $ make install

    libgsm 1.0.12
    http://kbs.cs.tu-berlin.de/~jutta/toast.html

    $ tar zxfv gsm-1.0.12.tar.gz
    $ patch -p0 < gsm_1.0-pl12.diff
    $ cd gsm-1.0-pl12
    $ make
    $ cp lib/libgsm.a /mingw/lib/
    $ cp inc/gsm.h /mingw/include/

    xvidcore 1.2.0
    http://www.xvid.org

    $ tar xfvj xvidcore-1.2.0.tar.bz2
    $ patch -p0 < xvidcore-1.2.0
    $ cd xvidcore/build/generic
    $ ./configure --prefix=/mingw
    $ make
    $ make install
    $ rm /mingw/lib/xvidcore.dll
    $ mv /mingw/lib/xvidcore.a /mingw/lib/libxvidcore.a

    x264 0.65.1074M b6bb3d4
    http://developers.videolan.org/x264.html

    $ git clone git://git.videolan.org/x264.git x264
    $ cd x264
    $ ./configure --prefix=/mingw
    $ make
    $ make install

    liboil 0.3.15
    http://liboil.freedesktop.org

    $ tar zxfv liboil-0.3.15.tar.gz
    $ cd liboil-0.3.15
    $ ./configure --prefix=/mingw --enable-static --disable-shared
    $ make
    $ make install
    $ cd ..
    $ rm -rf liboil-0.3.15
    $ tar zxfv liboil-0.3.15.tar.gz
    $ cd liboil-0.3.15
    $ ./configure --prefix=/mingw --enable-static --enable-shared
    $ make
    $ cp liboil/.libs/liboil-0.3.a /mingw/lib/

    schroedinger 1.0.5
    http://diracvideo.org

    $ tar zxfv schroedinger-1.0.5.tar.gz
    $ cd schroedinger-1.0.5
    $ ./configure --prefix=/mingw --enable-static --disable-shared
    $ make
    $ make install

    SDL 1.2.13
    http://www.libsdl.org/

    $ tar zxfv SDL-1.2.13.tar.gz
    $ cd SDL-1.2.13
    $ ./configure --prefix=/mingw --enable-static --disable-shared
    $ make
    $ make install

    ffmpeg r16537
    http://www.ffmpeg.org

    $ svn co svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg -r 16537
    $ cd ffmpeg
    $ patch -p0 < ../ffmpeg_r16573.diff
    $ cd ..
    $ mkdir build
    $ cd build
    $ ../ffmpeg/configure --extra-cflags=-fno-common --enable-memalign-hack \
    --enable-pthreads --enable-libmp3lame --enable-libxvid \
    --enable-libvorbis --enable-libtheora --enable-libspeex \
    --enable-libfaac --enable-libgsm --enable-libx264 \
    --enable-libschroedinger --enable-avisynth --enable-swscale \
    --enable-gpl
    Cherche un peu notamment sur le lien donné...

Discussions similaires

  1. Comment compiler Tcl pour ARM
    Par gilles06 dans le forum Tcl/Tk
    Réponses: 0
    Dernier message: 13/11/2013, 16h08
  2. Réponses: 2
    Dernier message: 21/07/2009, 16h14
  3. Réponses: 2
    Dernier message: 27/10/2007, 10h16
  4. Réponses: 7
    Dernier message: 30/04/2007, 08h11

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo