Recherche avancée

Médias (0)

Mot : - Tags -/alertes

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

Autres articles (104)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Soumettre bugs et patchs

    10 avril 2011

    Un logiciel n’est malheureusement jamais parfait...
    Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
    Si vous pensez avoir résolu vous même le bug (...)

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

Sur d’autres sites (8865)

  • How do I timestamp an excel document using Pandas ?

    16 juillet 2015, par Andy Do

    I have a script that uses FFMPEG and CMD to cut video files based off of an excel document row by row. I would like python to add a timestamp after it is done with a row. Can you guys please help ?

    import subprocess as sp, pandas as pd

    ffmpeg = 'C:/FFMPEG/bin/ffmpeg.exe' # on Windows
    datafile = r'C:\Users\A_Do\Dropbox\1. Projects\2. Python\TM Creator\tm_creator_test1.xlsx'

    xl = pd.ExcelFile(datafile,index = False)
    df = xl.parse('Sheet1')

    def create_tm():
       row_iterator = df.iterrows()
        # take first item from row_iterator
       for i, row in row_iterator:
           infile = row['filename']
           outputfile = row['outputfilename']
           timein = row['timein']
           duration = row['duration']
           decision = row['Create TM?']
           if decision == "Y":
               sp.call(ffmpeg + " -y -i " + infile + " -map 0:0 -map 0:1 -map 0:2 -acodec copy -ss " + str(timein) + " -codec copy -t " + str(duration) + " " + outputfile,shell=True) #this works

           elif decision != decision: #this gets rid of the NaN
               break
           else:
               print "You said you didn't want to make a TM for " + str(infile)

    create_tm()

    Thanks !

    My final code :

    import subprocess as sp, pandas as pd
    # (1) new import
    from openpyxl import load_workbook
    # (2) new import
    from datetime import datetime

    ffmpeg = 'D:/FFMPEG/bin/ffmpeg.exe' # on Windows
    datafile = r'D:\Dropbox\1. Projects\2. Python\TM Creator\tm_creator_test1.xlsx'

    # (3) open the file in openpyxl first:
    book = load_workbook(datafile)

    xl = pd.ExcelFile(datafile,index = False)
    df = xl.parse('Sheet1')

    def create_tm():
       row_iterator = df.iterrows()
        # take first item from row_iterator
       for i, row in row_iterator:
           infile = row['filename']
           outputfile = row['outputfilename']
           timein = row['timein']
           duration = row['duration']
           decision = row['Create TM?']
           if decision == "Y":
               sp.call(ffmpeg + " -y -i " + infile + " -map 0:0 -map 0:1 -acodec copy -ss " + str(timein) + " -codec copy -t " + str(duration) + " " + outputfile,shell=True) #this works
               # (4) Wherever in the code you want to put the timestamp:
               df.loc[i, 'Timestamp'] = str(datetime.now())
               # (5) This saves the sheet back into the original file, without removing
               # any of the old sheets.
               writer = pd.ExcelWriter(datafile)
               writer.book = book
               writer.sheets = dict((ws.title, ws) for ws in book.worksheets)
               df.to_excel(writer, index=False)
               writer.save()
           elif decision != decision: #this gets rid of the NaN
               break
           else:
               print "You said you didn't want to make a TM for " + str(infile)
  • Revision 185 : Edited wiki page through web user interface.

    1er avril 2010, par marc.noirot

    Changed Paths :
     Modify /wiki/Streaming.wiki



    Edited wiki page through web user interface.

  • Revision 191 : Edited wiki page through web user interface.

    11 mai 2010, par marc.noirot

    Changed Paths :
     Modify /wiki/CheckMessages.wiki



    Edited wiki page through web user interface.