Recherche avancée

Médias (0)

Mot : - Tags -/acrobat

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

Autres articles (80)

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

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

Sur d’autres sites (4608)

  • ffmpeg : video to images with pts in filename

    12 février 2016, par ntg

    I am trying to extract images of exact times (say every second) from a mp4 video of an experiment. There are a lot of methods to do that using ffmpeg out there, but surprisingly enough the time accuracy is off.

    To measure accuracy, I have first time-stamped the video using pts, e.g. :

    -vf "[in] scale=640:-2 , drawtext=fontcolor=white:fontsize=22:fontfile='times.ttf':timecode='22\:10\:55\:00:text='03/12/15__':r=23.976023976:x=0:y=0 [out]"

    And as a result I got a millisecond precision time-stamp on the video. I checked the video and it seems the time-stamps are very accurate. I then tried all the methods I could find out there including :

    -Using -ss [timestamp] to go to an exact time and -vframes 1 to get the first frame at that time : this method is extremely slow since it involves calling ffmpeg once for each second of the video. Furthermore, seems to work fine for the first minutes, but then gets out of sync.

    -Using fps=1 and using out_%05d.jpg as the output. This was probably the most inaccurate, as it went off by whole seconds, plus it never got exactly the 0th millisecond.

    -Using a fast fps, and then selecting only the ones I need, e.g. -vf "fps=10, framestep=10, select=not(mod(n\,40))" was promising for the first minutes, but also became inaccurate after that.

    -I tried writing the pts/date as metadata, but (do not know how to /cannot) write to the metadata of a .jpg from ffmpeg...

    The problem is that after some time, if we are using out_%05d.jpg, the numbers get completely out of sinc, while the -ss gets inaccurate, and takes forever.

    Ideally there should be a way to write the %pts or the date as part of the filename... Does anyone know a method to extract images from an .mp4 file with millisecond precision, preferably using ffmpeg (or its library ? I am using python and getting desperate...)

    [Edit : as explained in the comment by Mulvya, the pts is calculated by using the fps of the video, ffmpeg can give it to you. In my case some of the videos have 30 and others 24*(100/1001) fps. Bellow is an example, which was produced by :

    args = ['ffmpeg',
    '-i',
    'c:\\Temp\\scr_cam.mp4',
    '-y',
    '-vf',
    "[in] drawtext=fontcolor=black:fontsize=22:fontfile='times.ttf':timecode='17\\:00\\:29\\:00':text='09/02/16__':r=30.0:x=0:y=0, drawtext=fontcolor=black:fontsize=22:fontfile='times.ttf':timecode='00\\:00\\:00\\:00':text='':r=30.0 :x=0:y=30, drawtext=fontcolor=black:fontsize=22:fontfile='times.ttf':text='n\\: %{n}   pts\\:%{pts}':r=30.0:x=0:y=60 [out]",
    '-c:a',
    'copy',
    '-metadata',
    'creation_time=2016-02-09T17:00:29',
    '-preset',
    'ultrafast',
    '-threads',
    '3',
    'c:\\Temp\\stamped_scr_cam.mp4']
    subprocess.call(args)

    In it we see that indeed pts = n/30 (n is the frame no). I have tried many combinations of the params of the commands I talk in the beginning, so listing all my efforts would take too much space. As we see, the drawtext seems to be very accurate, so it does not seem to be a problem of incorrect fps.

    sample of drawtext

    To get the fps I am using :

    def get_frame_rate_and_duration(filename):
       if not os.path.exists(filename):
           sys.stderr.write("ERROR: filename %r was not found!" % (filename,))
           return -1
       args = ["ffprobe",filename,"-v","0","-select_streams","v","-print_format","flat"]
       args.extend(["-show_entries","stream=r_frame_rate"])
       args.extend(["-show_entries","format=duration"])
       out = subprocess.check_output(args).split("\n")
       rate = out[0].split('=')[1].strip()[1:-1].split('/')
       duration = pd.Timedelta("{0} sec".format(out[1].split('=')[1].strip()[1:-1]))
       if len(rate)==1:
           rate = float(rate[0])
       if len(rate)==2:
           rate =  float(rate[0])/float(rate[1])
       else:
           rate = -1
       return rate, duration
  • How to loop images using boomerang effect with ffmpeg ?

    20 mars 2019, par geekpedia1

    Hi everyone I’m trying to take 12 images at 24fps and I would like to do boomerang effect like 4 times. can someone help me to solve this thx

  • how to play audio files using ffmpeg

    6 juin 2012, par user1426122

    I'm using ffmpeg to make a music player, i want to know the function to play the music and pause the music. The have searched several times about it but it, but didn't find a workable answer.