Archive for the ‘Apache’ Category.

Apache video streaming: flv et mp4 (H264) via modules open-source

Note: cette installation s’est déroulée avec Apache 2.2.3  (Plesk 9.2) sous CentOS 5.2

Pour réaliser du pseudo streaming via HTTP avec le serveur web Apache, il suffit d’installer deux modules open-source:

L’installation…

  1. Installer APXS pour Apache
    yum install httpd-devel
  2. Télécharger la source du module mod_flv
    wget http://people.apache.org/%7Epquerna/modules/mod_flvx.c
  3. Compiler et installer mod_flv
    apxs -c -i ./mod_flvx.c
  4. Créer/Editer un fichier de configuration mod_flv pour Apache
    vi /etc/httpd/conf.d/mod_flvx.conf
    avec le contenu suivant:
    LoadModule flvx_module modules/mod_flvx.so
    AddHandler flv-stream .flv
  5. Redémarrer Apache pour être certain que l’installation de mod_flv s’est bien déroulée
    service httpd restart
  6. Télécharger et décompresser le module H264 Streaming
    wget http://h264.code-shop.com/download/apache_mod_h264_streaming-2.2.5.tar.gz
    tar -xvzf apache_mod_h264_streaming-2.2.5.tar.gz
  7. Compiler et installer le module H264 Streaming
    cd ./mod_h264_streaming-2.2.5
    ./configure
    make
    make install
  8. Créer/Editer un fichier de configuration mod_flv pour Apache
    vi /etc/httpd/conf.d/mod_h264_streaming.conf
    avec le contenu suivant:
    LoadModule flvx_module modules/mod_flvx.so
    AddHandler flv-stream .flv
  9. Redémarrer Apache
    service httpd restart

Des fichiers flv avec des keyframes…

  • les clés peuvent être ajoutées sur un fichier flv existant en utilisant flvtool2 (DAG repository):
    flvtool2 -U video.flv

Tester le streaming HTTP…

Sources:

  • Share/Save/Bookmark