Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (30)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (5628)

  • FFmpeg youtube stream get corrupted until restart

    19 février 2023, par unpwn

    I am streaming images from python to youtube using ffmpeg.
It's working fine with just one problem.
Sometimes the stream get somehow corrupted an the stream looks like this :

    


    Corrupted stream image

    


    Or you can see for yourself in the stream itself : https://www.youtube.com/watch?v=PG6NLtr0jjM (Scroll back to the beginning)

    


    Then I have to restart ffmpeg and its working fine. Sometimes an error occurs regarding the network and I have to automatically restart the stream. Then there is the possibility it is corrupted again.

    


    The parameters for ffmpeg are the following :

    


    cmd_out = ['ffmpeg',
       '-re',
       '-f', 'concat',
       '-i', os.path.join(BASE_DIR, 'music', 'music.txt').replace('\\', '/'),           
       '-r', '1',
       '-f', 'image2pipe',
       '-vcodec', 'png',
       '-r', '1',
       '-i', '-',
       '-c:v', 'libx264',
       '-c:a', 'copy',
       '-g', '4',
       '-f', 'flv',
       'rtmp://a.rtmp.youtube.com/live2/{}'.format(stream_key)]  


    


    I never had that problem testing it on windows. It just appears when I use my linux server.

    


    I am using ffmpeg version 3.2.18-0+deb9u1 and the generated images are fine, when I save them to a normal file.

    


    Does someone know how to fix it ? Or where the problem is comming from ?

    



    


    Solution : An old ffmpeg version was available while using docker. I solved the problem by using a static build from https://www.johnvansickle.com/ffmpeg/

    


    I used this to use it in docker :

    


    WORKDIR /app
ADD ./ffmpeg /app
RUN mv ffmpeg /usr/local/ffmpeg
RUN chmod +x /usr/local/ffmpeg


    


    Until now the error seems to be solved.

    


  • ffmpeg progress percentage in php

    9 avril 2018, par Mr.ZZ

    ffmpeg.php

    $sCmd = "ffmpeg -i ".$image." -i ".$music." video.avi 1> progress.txt";
    $proc = popen($sCmd." 2>&1", "r");

    progress.php

    $content = @file_get_contents('progress.txt');
    if($content){
       preg_match("/Duration: (.*?), start:/", $content, $matches);
       $rawDuration = $matches[1];
       $ar = array_reverse(explode(":", $rawDuration));
       $duration = floatval($ar[0]);
       if (!empty($ar[1])) $duration += intval($ar[1]) * 60;
       if (!empty($ar[2])) $duration += intval($ar[2]) * 60 * 60;
       preg_match_all("/time=(.*?) bitrate/", $content, $matches);
       $rawTime = array_pop($matches);
       if (is_array($rawTime)){$rawTime = array_pop($rawTime);}
       $ar = array_reverse(explode(":", $rawTime));
       $time = floatval($ar[0]);
       if (!empty($ar[1])) $time += intval($ar[1]) * 60;
       if (!empty($ar[2])) $time += intval($ar[2]) * 60 * 60;
       $progress = round(($time/$duration) * 100);
       echo $progress;
    }

    progress.php final output was always 100, so it was easy with jquery to hide progress and show download button.

    BUT after changing ffmpeg.php with this command :

    $sCmd = "ffmpeg -loop 1 -r 1 -i ".$image." -i ".$music." -c:a copy -shortest video.avi 1> progress.txt";
    $proc = popen($sCmd." 2>&1", "r");

    progress.php output is different numbers above 100(thousands) and jquery can’t figure out ffmpeg process finished or not.

    How to get 100 when ffmpeg finishs working ? I think i need some changes in progress.php because final result in progress.txt is longer than before.

  • Streaming audio with ffmpeg

    15 avril 2016, par Dmitry

    I use for streaming next command :

    start /min ffmpeg -re -i ..music.mp3 -vn  -f rtp rtp://197.100.15.9:29000?localport=40000

    I have next questions :

    1. How to make it stream in the endless loop ?
    2. How to make it send data in ptime=20 ? because it sending it randomly.
    3. Also, is it possible to use my own SDP file(from my filesystem) for
      streaming ?