Recherche avancée

Médias (91)

Autres articles (40)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

Sur d’autres sites (4132)

  • Using FFMpeg with Runtime.exec() to do a simple transcoding

    1er novembre 2011, par Adam Ingmansson

    I know there are many questions touching this subject, but none have helped me solve my issue.

    Purpose :

    Transcoding a video taken,from a queue, from .mov to h.264 (for now only that)

    Solution :

    Building a java application that gets the next in the queue, transcodes it then repeat

    Problem :

    Running ffmpeg using Runtime.exec() is not working.
    Im using the StreamGobbler from this tutorial to capturing the output from the process.

    This code shows how i start my process :

    String[] command = new String[]{"./ffmpeg/ffmpeg","-i",videoFile.getPath(),"-vcodec","libx264","-fpre",preset,folder + recID + ".flv"};
    System.out.println("Running command..");
    Process p = r.exec(command);

    // any error message?
    StreamGobbler errorGobbler = new
    StreamGobbler(p.getErrorStream(), "ERROR");            

    // any output?
    StreamGobbler outputGobbler = new
    StreamGobbler(p.getInputStream(), "OUT");

    // kick them off
    errorGobbler.start();
    outputGobbler.start();

    //logProcessOutputAndErrors(p);

    int res = p.waitFor();
    if (res != 0) {
       throw new Exception("Encoding error: "+String.valueOf(res));
    }

    and this is the current modified version of StreamGobbler (the important part)

    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line=null;
    int c = 0;
    StringBuilder str = new StringBuilder();

    while (true) {
       c = br.read();
    }

    Sometimes ffmpeg just stalls, maybe waiting for my input (although there is no indication on screen).

    Sometimes it just ends.

    Sometimes (when I added the line "System.out.print((char) c) ;" in the while-loop above) i got loads of "¿¿ï" repeated over and over again, wich might be the actual encoding of the video wich I managed to capture instead of to a file.

    For those who wonders why i dont just go with a commandline or maybe even php :

    The purpose is an application that will run 24/7 transcoding anything and everything from a queue. The files are pretty large to begin with and takes about 15 min to transcode.

  • Anomalie #3347 : Barre d’outils absente en pleine écran

    20 novembre 2014, par Franck Dalot

    hello :-)
    http://zone.spip.org/trac/spip-zone/changeset/86183/_core_/plugins/porte_plume
    Fait bien de nouveau apparaitre la barre d’outils, mais par contre, il reste toujours le 2eme problème, à savoir :

    Si on clique sur l’onglet "plein écran", puis que l’on en sort via la touche "echap" du clavier par exemple.
    L’adresse de la page dans le navigateur fait toujours apparaitre #fullscreen
    Chose qui n’est pas normal car le passage de #previsuVoir à #previsuEditer est "invisible", alors que le passage de #fullscreen à #previsuEditer ne l’ai pas car il fait apparaitre :
    .../ecrire/ ?exec=article_edit&new=oui#fullscreen
    et non :
    .../ecrire/ ?exec=article_edit&new=oui

    Si l’on clique sur l’onglet "voir", cela ne change rien, #fullscreen reste apparent dans la barre de navigation du navigateur
    Franck

  • Percentage transcoded never goes past 65% php-ffmpeg

    22 février 2016, par K Ф

    Edit

    After some tests it would appear that this bug has something to do directly with the clipped video. If I take 100% of the video, then the percentage transcoded goes up to 100%. If I take only 30% of the video, then the percentage transcoded goes up tot 64-65%.

    Introduction

    I’m using https://github.com/PHP-FFMpeg/PHP-FFMpeg for my symfony3 project. Installed via composer.

    When the video is done transcoding (when the transcodage percentage reaches 100%) I would like to start another type of operation on the video I just created.

    Problems

    However, it would appear that I never get to 100% when I clip a video. It seems to stop at 65% every time.

       $format->on('progress', function ($video, $format, $percentage) use ($videoExportPath, $temporary_video_path) {
           //This part never goes past 65%...
           dump("$percentage % transcoded");
           if($percentage == 100) {
               //never enters this part..
               dump("$percentage % transcoded");
               $video = $this->ffmpeg->open($videoExportPath);
               $filterConcat = new ConcatVideoFilter();
               $filterConcat->addFile($temporaryVideoPath);
               dump("second video...");
               $video
                   ->addFilter($filterConcat)
                   ->save($this->createNewMP4Format(), $videoExportPath);
           }
       });

    I’ve looked at the lib to see what is causing this but unfortunately I can not find any indication. The X264 format extends to the DefaultVideo class where the progress listeners are created. Here is the exact function that does that.

    public function createProgressListener(MediaTypeInterface $media, FFProbe $ffprobe, $pass, $total)
    {
       $format = $this;
       $listeners = array(new VideoProgressListener($ffprobe, $media->getPathfile(), $pass, $total));

       foreach ($listeners as $listener) {
           $listener->on('progress', function () use ($format, $media) {
              $format->emit('progress', array_merge(array($media, $format), func_get_args()));
           });
       }

       return $listeners;
    }

    Questions

    And yes the first video I want to create actually gets clipped correctly. Does clipping a video (reducing the length of a video) have something to do with the transcoding percentage to never reach 100% ?

    Is there a more elegant way to know when a video is done transcoding ?


    https://github.com/PHP-FFMpeg/PHP-FFMpeg/issues/201