Recherche avancée

Médias (91)

Autres articles (45)

  • 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 (8689)

  • Evolution #4182 : Changer le statut par simple sélection dans la liste sans avoir à cliquer sur [C...

    18 novembre 2018, par RastaPopoulos ♥

    Je suis assez d’accord que c’est pas super ergonomique actuellement. En fait, quand une action (un form) ne comporte vraiment qu’un et un seul champ, et qu’en plus c’est pas un champ libre (comme la recherche), c’est mieux de trouver une méthode pour que l’action se fasse directement. Dans divers framework CSS, ya des systèmes de menus déroulants qui peuvent comporter ce qu’on veut dedans, lien ou bouton/form, à terme ce serait peut-être mieux. Ça se présenterait comme une liste déroulante, mais en HTML ça serait bien des boutons d’action (suivant la norme qu’une action n’est pas un lien donc doit être un bouton).

  • Thread in Thread

    28 mai 2014, par user3679963

    My company is working for visual effects and we set up an internal shot playback via a browser for our clients. For that we need to upload the video file to a FTP server.

    I want to convert a image sequence to mp4 and upload this file directly after the rendering will finish.

    For that I use :

    • one command prompt to convert
    • one command prompt to get an `md5hash
    • one for uploading the file

    I already achieved that on my local computer, where I just chained os.system('command').

    After recognizing that the program freezes very long with longer image sequences I changed the script to spawn a thread using the os.system chain.
    But on the Render Farm Server this script does not actually work.

    The RenderFarm Server runs Python 2.5

    There are some code examples :

    class CopraUpload(threading.Thread):

       # initializing Thread
       # via super constructor
       def __init__(self):
           threading.Thread.__init__(self)


       # return the size of the
       # created mp4 file
       #
       # @return: the file size in byte
       def _getFileSize(self):


       # creates a random id for organising
       # the server upload used as flag
       #
       # @return: a hash
       def _getHash(self):
               self.fileLoc = str(self.outputfileName + '.mp4')
               self.fileLoc = os.path.normpath(self.fileLoc)
               return str(os.path.getsize(self.fileLoc))

       # integrates the "missing" data for the xml file
       # generated post render from the mp4 file
       def _setPreviewDataToXML(self):
           self.xmlFile = str(self.outputfileName + '_copraUpload.xml')
           self.xmlFile = os.path.normpath(self.xmlFile)

           ett = ET.parse(self.xmlFile)
           root = ett.getroot()
           for child in root.getiterator('preview_size'):
               child.text = self._getFileSize()
           for child in root.getiterator('preview_md5hash'):
               child.text = self._getHash()
           ett.write(self.xmlFile)


       # create a connection to a ftp server
       # and copies the mp4 file and the xml file
       # on the server
       def _uploadToCopra(self):

           os.system(self.uploadCommand)
           #process = Popen(self.uploadCommand)


       # the main function of the program
       # called via start from a Thread Object
       def run(self):

           # the command which will be send to the commando shell
           # for further adjustments see ffmpeg help with ffmpeg.exe -h
           FinalCommand = self.ffmpegLocation + " -r "+ self.framerate + " -i " + self.inputPath + " -an -strict experimental -s hd720 -vcodec libx264 -preset slow -profile:v baseline -level 31 -refs 1 -maxrate 6M -bufsize 10M -vb 6M -threads 0 -g 8 -r " + self.framerate + " " + self.outputfileName + ".mp4 -y"
           FinalCommandList = FinalCommand.split(" ")


           # calling the program
           print "Start ffmpeg convertion"

           outInfo = os.path.normpath("C:\\Users\\sarender\\Desktop\\stdoutFFMPEG.txt")
           outError = os.path.normpath("C:\\Users\\sarender\\Desktop\\stderrFFMPEG.txt")
           stdoutFile = open(outInfo,"w")
           stderrFile = open(outError,"w")

           handle = subp.check_all(FinalCommandList,stdout = stdoutFile,stderr = stderrFile)
           handle.communicate()
           stdoutFile.close()
           stderrFile.close()
           print "Convertion from ffmpeg done"

           # fill the xml file with the missing data
           # - preview file size
           # - preview md5hash
           self._setPreviewDataToXML()
           self._uploadToCopra()
           print "---------------------------------->FINISHED------------------------------------------------------>"


       # Creates a callable Thread for the Copra Upload.
       # start is calling the run method which will start the Uploading

    and the main start :

       if "$(RenderSet.writenode)" == "PREVIEW":
           print "---------------------------------->Initializing Script------------------------------------------------------>"
           process = CopraUpload()
           process.start()

    What happens :

    The script starts after the rendering and ffmpeg converts the image sequence and creates an mp4. But it stops after that. It does not print "Conversion from ffmpeg complet". Just stops the script.

    It actually should create the Thread converting with ffmpeg and wait until it finishes. After it should write some stuff in an xml file and upload both to the server.

    Do I miss something ? Is subprocess within a thread not the way to go ? But I need a Thread because I can not deadlock the render management server.

  • Anomalie #3234 (Nouveau) : Upload gros fichiers

    19 juin 2014, par Eric Camus

    Bonjour,

    Avec SPIP 3.0.16 sans plugins (sur serveur WIMP et LAMP).

    Si on demande le téléchargement d’un poids de fichiers (un ou plusieurs) supérieur à POST_MAX_SIZE on se retrouve avec la page d’édition de l’article dans lequel on était dans le cadre de téléchargement : c’est super chouette artistiquement mais c’est tout (cf P.J.).

    Pour résoudre ce problème, j’ai placé dans ’mes_options.php’ le code suivant qui permet d’afficher un texte dans le cadre :

    // capturer un formulaire post en surcharge !!!
    if($_SERVER[’REQUEST_METHOD’]==’POST’ and strlen($_SERVER[’CONTENT_TYPE’])>0 and
        substr($_SERVER[’CONTENT_TYPE’],0,19)==’multipart/form-data’ and
        $_SERVER[’CONTENT_LENGTH’]>inigetoctets(’post_max_size’)) 
        // on est en hors quota donc erreur
            echo ’

    Erreur de chargement :

    le poids total des fichiers dépasse la limite autorisée (’.ini_get(’post_max_size’).
    ’o).
    Pour recommencer, veuillez recharger cette page.

    ’ ;
    exit ;

    function inigetoctets($var)
    $val=trim(ini_get($var)) ;
    if($val !=’’)
    $last=strtolower($val[strlen($val)-1]) ;

    else
    $last=’’ ;

    switch($last) // The ’G’ modifier is available since PHP 5.1.0
    case ’g’ :
    $val*=1024 ;
    case ’m’ :
    $val*=1024 ;
    case ’k’ :
    $val*=1024 ;

    return $val ;

    Comme il me semble que les formulaires de téléchargement sont dans des cadres ’java’ cela ne doit pas poser d’autres problèmes ?
    Si c’est le cas, il faudrait envisager de placer un code de ce type quelque part dans le core de SPIP pour pallier à tout formulaire de téléchargement.

    Nota : si taille des données POST > POST_MAX_SIZE alors les variables $_POST et $_FILES sont vides.