Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (71)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Modifier la date de publication

    21 juin 2013, par

    Comment changer la date de publication d’un média ?
    Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
    Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
    Dans la rubrique "Champs à ajouter, cocher "Date de publication "
    Cliquer en bas de la page sur Enregistrer

Sur d’autres sites (5609)

  • Use a translation function for info and error messages.

    26 avril 2013, par blueimp
    m js/jquery.fileupload.js
    
    Use a translation function for info and error messages.
    

    Initialize regular expressions passed as HTML5 data-attributes.

  • Python PyQT : How to call a GUI function from a worker thread ?

    18 juillet 2014, par rainer

    I have a pyqt gui and calling a long process (ffmpeg) which I put on a separate thread to not block the gui. I then want to update a progress bar when one command of a longer list of commands finishes. The problem is, that I can’t call a function in the gui thread out of the worker thread. So I let run a ticker in the worker thread, but when I update the progress bar with a while loop and reading the ticker value, the gui gets blocked again. How can I solve this. I used currently python threading and not Qthread.
    Thx for any help !

    import threading, pexpect

    self.cmd_list = ['ffmpeg -i file outfile','and so on']

    self.stop_proc = False
    self.executeCMD()

    def spawn_ffmpeg_cmd(self):
       for cmd in self.cmd_list:
           if self.stop_proc == False:
               thread = pexpect.spawn(cmd)
               print "\nstarted: %s" % cmd
               cpl = thread.compile_pattern_list([pexpect.EOF,"frame= *\d+ fps=*\d+",'(.+)'])

               while True:
                   i = thread.expect_list(cpl, timeout=None)
                   if i == 0: # EOF
                       print "the sub process exited"
                       self.pgticker += 1
                       break
                   elif i == 1:
                       frame_number_fps = thread.match.group(0)
                       print frame_number_fps
                       thread.close
                   elif i == 2:
                       pass
       self.startButton.setEnabled(True)


    def executeCMD(self):
       self.startButton.setEnabled(False)
       self.pgticker = 0
       threading.Thread(target=self.spawn_ffmpeg_cmd, name="_proc").start()


    def stopprocess(self):
       self.stop_proc = True
       self.cmd_list = []
       os.system('pkill ffmpeg')
       self.pgticker = len(self.cmd_list)
       self.startButton.setEnabled(True)


    def updateProgress(self):  
       pgfactor = 100 / len(self.cmd_list)
       progress = 0.0
       progress = pgfactor*int(self.pgticker)
       self.progressBar.setProperty("value", progress)
  • List Directory of files to text file sorted by creation date but don't show creation creation date in file

    25 mars 2019, par Oli Shingfield

    I’ve been doing some research on this problem but I can’t get my head around it to suit my particular issue.

    I would like to create a text file of a list of files in a directory, sorted by date but I don’t want the date to be shown in the file.
    The code I have so far is :

    #create list of clips to merge
    save_path = 'downloads/'
    ignored = 'test.bat','mergeclips.bat','draw.bat'
    onlyfiles = [f for f in listdir('downloads/') if isfile(join('downloads/', f)) if f not in ignored]

    with open('downloads/clipstomerge.txt', 'w') as f:
       for item in onlyfiles:
           f.write("file '%s'\n" % item )

    This code ignores the bat files but lists everything else out to a text file in a format ready for ffmpeg to merge the clips. The format of the text file looks like this :

    file 'ARandomClipName.mov'
    file 'Butterflies.mov'
    file 'Chickens.mov'

    At the moment the files are sorted alphabetically but I would like it to be sorted by creation date.
    Does anyone have any ideas how I could modify my code to fix my problem ?