Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (12)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

Sur d’autres sites (3392)

  • Revision 67257 : Encore un gros jet d’améliorations : - correction d’un énorme bug sur la ...

    29 octobre 2012, par eric@… — Log

    Encore un gros jet d’améliorations :
    - correction d’un énorme bug sur la pattern des archives qui fonctionnait par miracle depuis la nuit des temps
    - les actions de sauvegarde et nettoyage auto sont décorrélées et possèdent leur propre cron et propre configuration
    - correction d’items de langue
    - nettoyage des fonctions inutiles et inclusion là ou il faut pour les squelettes
    - incrément de version

  • Revision 67257 : Encore un gros jet d’améliorations : - correction d’un énorme bug sur la ...

    29 octobre 2012, par eric@… — Log

    Encore un gros jet d’améliorations :
    - correction d’un énorme bug sur la pattern des archives qui fonctionnait par miracle depuis la nuit des temps
    - les actions de sauvegarde et nettoyage auto sont décorrélées et possèdent leur propre cron et propre configuration
    - correction d’items de langue
    - nettoyage des fonctions inutiles et inclusion là ou il faut pour les squelettes
    - incrément de version

  • How to convert mp4 files into mp3 on button click using ffmpeg/php ?

    4 juin 2019, par flash

    I am working on a php code as shown below where I am converting mp4 files into mp3 using system command ffmpeg (in the case statement below).

    <?php

    $mp4_files = preg_grep('~\.(mp4)$~', scandir($src_dir));

    foreach ($mp4_files as $f)
    {

        $parts = pathinfo($f);
        switch ($parts['extension'])
        {
            case 'mp4' :
                $filePath = $src_dir . DS . $f;
                system('ffmpeg -i ' . $filePath . ' -map 0:2 -ac 1 ' . $destination_dir . DS . $parts['filename'] . '.mp3', $result);  // Through this command conversion happens.
        }
    }

    $mp3_files = preg_grep('/^([^.])/', scandir($destination_dir));

    ?>

    After conversion, mp3 files goes into destination_dir. If new mp4 file arrives in $src_dir, the conversion usually happen on refresh of a page.

    Once the conversion is complete, I am parsing everything into table as shown below :

    <table>
      <tr>
         <th style="width:8%; text-align:center;">House Number</th>
         <th style="width:8%; text-align:center;">MP4 Name</th>
         <th style="width:8%; text-align:center;">Action/Status</th>
      </tr>
      &lt;?php
         $mp4_files = array_values($mp4_files);
         $mp3_files = array_values($mp3_files);
         foreach ($programs as $key => $program)    {
            $file = $mp4_files[$key];    
            $file2 = $mp3_files[$key];   // file2 is in mp3 folder
         ?>
      <tr>
         <td style="width:5%; text-align:center;"><span style="border: 1px solid black; padding:5px;">&lt;?php echo basename($file, ".mp4"); ?></span></td>
         <td style="width:5%; text-align:center;"><span style="border: 1px solid black; padding:5px;">&lt;?php echo basename($file); ?></span></td>              
         <td style="width:5%; text-align:center;"><button style="width:90px;" type="button" class="btn btn-outline-primary">Gotd>  
      </button></td></tr>
      &lt;?php } ?>
    </table>

    Problem Statement :

    I am wondering what changes I should make in the php code above that on click of a Go button, conversion of individual mp4 into mp3 happen.

    On clicking of Go button, individual mp3 file (from an mp4) belonging to an individual row should go inside destination directory ($destination_dir).

    enter image description here