Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (85)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (9405)

  • lavf : Only initialize s->offset once when using avoid_negative_ts make_zero

    17 novembre 2014, par Martin Storsjö
    lavf : Only initialize s->offset once when using avoid_negative_ts make_zero
    

    When given a stream starting at dts=0, it would previously consider
    s->offset as uninitialized and set an offset when the second packet
    was written, ending up writing two packets with dts=0. By initializing
    this field to AV_NOPTS_VALUE, we make sure that we only initialize it
    once, on the first packet.

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DBH] libavformat/mux.c
    • [DBH] libavformat/options.c
  • i have this code. It is supposed to classify the segment files with the ratings in sys.argv[5].But it keeps having error

    3 août 2014, par Darkace435

    I have the following code tha uses FFmpeg . It has 5 argv and it takes in filename,video,segment size, start time, end time, ratings. thats supposed to let me classify segments many times with my ratings "PG G M18..." but there’s this error,

    "File "C:\c.py",line 92, in <module> os.rename<filename filename="filename" the="the" system="system" cannot="cannot" find="find" the="the" file="file"></filename>code></module>

    Ive tried to edit many times but this error still persists. Anyone have any idea what could this error mean and anyway to solve it ?

    import sys
    import subprocess
    import os

    #change hh:mm:ss to seconds:
    def getSeconds(sec):
       l = sec.split(':')
       return int(l[0])* 3600 + int(l[1])* 60 + float(l[2])

    def get_total_time(filename):

       proc = subprocess.Popen(["ffmpeg", "-i", filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
       lines = proc.communicate()[1]
       target = [line for line in lines.split('\n') if 'Duration:' in line][0]
       time = target.split('Duration: ')[-1].split(',', 1)[0]
       return time


    #check command line arguments
    if len(sys.argv) &lt; 5:
       print "Error: not enough arguments"
       sys.exit()

    #save filename to file_name
    file_name = sys.argv[1]
    if not file_name.endswith('mpg'):
       print 'Error! File extension not supported'
       sys.exit()
    # save a size of chunk in chunk
    segsize = int(sys.argv[2])
    chunk = (segsize * 1024)

    # get time of starting censorship in seconds
    start_censorship = getSeconds(sys.argv[3])

    # get time of ending censorship in seconds
    end_censorship   = getSeconds(sys.argv[4])

    classification = sys.argv[5]
    if classification not in ['P','PG','G','NC16','M18','R21']:
       print "Error: invalid classification"
       sys.exit()

    #initialize variable for extension
    file_ext = ''


    # if extension exists then save it into file_ext
    if '.' in file_name:
       # split file_name on two parts from right
       file_ext = sys.argv[1].split('.')[-1]


    # file_name without extension    
    filename = '.'.join(file_name.split('.')[:-1])

    # total_time of file in seconds
    total_time = getSeconds(get_total_time(file_name))

    print total_time



    #open file    
    in_file = open(file_name,'rb')


    #read first chunks
    s = in_file.read(chunk)

    in_file.seek(0, 2)
    file_size = in_file.tell()
    chunks = (file_size / chunk) + 1

    chunk_time = total_time/ file_size * chunk

    #close input file    
    in_file.close()

    #loop for each chunk
    for x in range(0, chunks):
       # starting time of current chunk
       t1 = chunk_time*x
       # ending time of current chunk    
       t2 = chunk_time*(x+1)

       if t2 &lt; start_censorship or t1 > end_censorship:
           pass
       else:
           if os.path.exists(filename + str(x) + 'x'):
               os.rename(filename + str(x) + 'x', filename + str(x))
           os.rename(filename + str(x), filename + str(x) + classification)

       #read next bytes
  • Create thumbnails tile for time range of video

    6 mars 2024, par Dmitrii Mikhailov

    I need to create, let's say, 12 thumbnails from video, but skip 10 percent in the beginning and in the ending. I found this thing, but it just takes every 1000th frame. In my case this range will be variable and it will be better if it will be in seconds. Can't figure out how to do this with ffmpeg, don't work with it much.

    &#xA;