Recherche avancée

Médias (1)

Mot : - Tags -/embed

Autres articles (55)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

Sur d’autres sites (6422)

  • 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)
  • avcodec/ac3dec : Hardcode tables to save space

    23 mai, par Andreas Rheinhardt
    avcodec/ac3dec : Hardcode tables to save space
    

    The code to initialize the ungrouped bap mantissa tables
    (bap 3 or 5) takes more bytes of .text than the tables itself ;
    they have therefore been hardcoded.

    For GCC (14, -O3, albeit in an av_cold function), the initialization
    code takes 99B each for the fixed and floating point decoders
    (the code is currently duplicated), whereas the hardcoded tables
    only take 96B. For Clang 19 it were 374B each (I don't now what
    Clang was doing there).

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/ac3dec.c
    • [DH] libavcodec/ac3dec_data.c
    • [DH] libavcodec/ac3dec_data.h
  • avcodec/vvc : refact, save pf and ciip_flag in ff_vvc_set_intra_mvf

    14 mai, par Wu Jianhua
    avcodec/vvc : refact, save pf and ciip_flag in ff_vvc_set_intra_mvf
    

    Signed-off-by : Wu Jianhua <toqsxw@outlook.com>

    • [DH] libavcodec/vvc/ctu.c
    • [DH] libavcodec/vvc/mvs.c
    • [DH] libavcodec/vvc/mvs.h