Recherche avancée

Médias (1)

Mot : - Tags -/swfupload

Autres articles (100)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (12658)

  • 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 ?