Recherche avancée

Médias (0)

Mot : - Tags -/publication

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (104)

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

  • 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" ;

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (10187)

  • Anomalie #4214 (Rejeté) : Notices sous easyphp et php 7.3 rc3

    2 novembre 2018, par Franck D

    Super, merci de la réponse :-)
    Je ferme donc en rejetant le ticket

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