Recherche avancée

Médias (91)

Autres articles (53)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (9038)

  • Evolution #3509 (Nouveau) : Visualiser un changelog depuis l’interface des plugins

    23 juillet 2015, par placido roxing

    L’idée est d’ajouter un lien sur le numéro de version de chaque plugin depuis la page ?exec=admin_plugin pour afficher (dans une mediabox) son changelog.

    D’aucuns diront qu’il existe déjà un lien vers la documentation... certes. Mais même si cette dernière a été consciencieusement mise à jour, il est rare qu’elle retranscrive exactement tous les derniers changements introduits.
    Une telle source d’informations, rapidement consultable depuis la partie privée, m’apparaît avantageuse au moment d’une mise à jour, voire précieuse pour déceler une éventuelle incompatibilité.
    C’est aussi un bon moyen de voir la fréquence de maintenance du plugin.

    Je pense que l’affichage du lien peut être conditionné - par exemple - à la présence d’un fichier changelog.txt à la racine du plugin, lequel serait affiché dans la mediabox.
    Dès lors, le plus gros de la fonctionnalité ne concerne pas SVP mais l’empaqueteur de la Zone qui pourrait se charger de la génération du changelog de manière automatique.

  • Http server live streaming in python

    8 juillet 2015, par George Subi

    I want to send the live output of ffmpeg command to every GET request, but I’m novice in python and can’t solve it. This is my code :

    import subprocess # for piping
    from http.server import HTTPServer, BaseHTTPRequestHandler

    class RequestHandler(BaseHTTPRequestHandler):

       def _writeheaders(self):
           self.send_response(200) # 200 OK http response
           self.send_header('Connection', 'keep-alive')
           self.send_header('Content-Type', 'video/mp4')
           self.send_header('Accept-Ranges', 'bytes')
           self.end_headers()

       def do_GET(self):
           self._writeheaders()
           global p
           DataChunkSize = 10000

           print("starting polling loop.")
           while(p.poll() is None):
               print("looping... ")
               stdoutdata = p.stdout.read(DataChunkSize)
               self.wfile.write(stdoutdata)

           print("Done Looping")

           print("dumping last data, if any")
           stdoutdata = p.stdout.read(DataChunkSize)
           self.wfile.write(stdoutdata)

    if __name__ == '__main__':
       command = 'ffmpeg -re -i video.avi -an -vcodec libx264 -vb 448k -f mp4 -movflags dash -'
       print("running command: %s" % (command, ))
       p = subprocess.Popen(command, stdout=subprocess.PIPE, bufsize=-1, shell=True)
       print("Server in port 8080...")
       serveraddr = ('', 8080) # connect to port 8080
       srvr = HTTPServer(serveraddr, RequestHandler)
       srvr.serve_forever()

    This is a prove of concept with a video.avi but the real application is with a live signal video.

    When connect to html5 video tag, play the video well, but when open another connection then play the video from the begining and not from the live moment. Also, when close the web, the server print an error :

    BrokenPipeError: [Errno 32] Broken pipe

    Yes, the pipe is broken when cut the connection is obvious. I think that maybe do it with pipes is not correct, but I don’t know how to do it.

    The goal is to run only one ffmpeg command and the output send to every client connected or will do it. Anybody can help me please ?

  • Repeating video frame sequences without iterating each frame

    4 juillet 2015, par Raheel Khan

    I have an application that generates a video from a given number of files. A total frame count and sequence is provided and the generated video should loop the given sequence until the total number of frames have been written.

    At the moment, I’m using FFMPEG.VideoFileWriter from AForge.

    var frameIndex = 0;
    var frameCount = 300;

    var writer = new AForge.Video.FFMPEG.VideoFileWriter();
    writer.Open(filename: "Video.mp4", width: 10000, height: 10000, fps: 30, code: VideoCodec.MPEG4, bitrate: 1024 * 1024 * 2);

    using (var imageCanvas = new Bitmap(width, height))
    {
       do
       {
           foreach (var file in this._Files)
           {
               frameIndex++;
               if (frameIndex > frameCount) { break; }

               using (var graphicsCanvas = Graphics.FromImage(imageCanvas))
               {
                   graphicsCanvas.Clear(Color.Black);

                   using (var imageFile = Image.FromFile(file.FullName))
                   {
                       graphicsCanvas.DrawImage(imageFile, 0, 0, imageCanvas.Width, imageCanvas.Height);
                   }
               }

               writer.WriteVideoFrame(imageCanvas);
           }
       }
       while (true);
    }

    the bottlenecks are :

    • The call to writer.WriteVideoFrame(imageCanvas).
    • The source images in question are massive (more than 10Kx10K 32bpp) so keeping them all in memory is not an option.

    The only thing I can think of is to create an uncompressed AVI file and somehow copy entire sequences in bulk. although transcoding back to MP4 would still take a while, it may same some overall.

    Any general optimization suggestions or clues on how to write multiple frames at once would be appreciated.