Recherche avancée

Médias (91)

Autres articles (72)

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

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

Sur d’autres sites (5155)

  • Rotate two halves of VR video

    7 mars 2018, par user2939415

    I downloaded this video to play in in GearVR :

    https://www.youtube.com/watch?v=0A56uOVluNM

    However the two parts of the frame for each eye need to be rotated 90 degrees. I would like to go from

    > >

    to

    v v

    Can I do this from command line in Linux ?

  • 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)
  • Ideas for new HTML5 apps

    10 mars 2011, par silvia

    At the recent Linux conference in Brisbane, Australia, I promised a free copy of my book to the person that could send me the best idea for an HTML5 video application. I later also tweeted about it. While I didn’t get many emails, I am still impressed by the things people want to do. Amongst (...)