Recherche avancée

Médias (91)

Autres articles (83)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (12715)

  • Where is moviepy getting the video fps from ?

    7 février 2017, par Gloin

    I am using the Python 3 moviepy module for video editing, and I have a few videos that are taken in slow motion. When imported into moviepy, they are massively sped up, and then sit on the last frame for the rest of their duration. Note that, the videos are supposed to be normal for the first couple and last couple of seconds, then slow in the middle.

    Unfortunately, I cannot provide the actual video for you to test with, but here is the relevant metadata (fetched with the command ffprobe -v quiet -print_format json -show_format -show_streams slo-mo_movie.mov)

    "r_frame_rate": "240/1",                              
    "avg_frame_rate": "1679400/39481",
    "time_base": "1/2400",

    For comparison, here is the equivalent metadata from a video taken, I think, from the same phone, but without slo-mo :

    "r_frame_rate": "30/1",
    "avg_frame_rate": "143160/4771",
    "time_base": "1/600",

    I can import the videos in to moviepy with clip = VideoFileClip("path/to/file.mp4"), and then for each run print(clip.fps). The first video prints 2400 (not a typo from me !), and the second 30.

    Here is the moviepy code (in moviepy/video/io/ffmpeg_reader.py) at line 293) that gets the fps :

    # Get the frame rate. Sometimes it's 'tbr', sometimes 'fps', sometimes
    # tbc, and sometimes tbc/2...
    # Current policy: Trust tbr first, then fps. If result is near from x*1000/1001
    # where x is 23,24,25,50, replace by x*1000/1001 (very common case for the fps).

    try:
       match = re.search("( [0-9]*.| )[0-9]* tbr", line)
       tbr = float(line[match.start():match.end()].split(' ')[1])
       result['video_fps'] = tbr

    except:
       match = re.search("( [0-9]*.| )[0-9]* fps", line)
       result['video_fps'] = float(line[match.start():match.end()].split(' ')[1])


    # It is known that a fps of 24 is often written as 24000/1001
    # but then ffmpeg nicely rounds it to 23.98, which we hate.
    coef = 1000.0/1001.0
    fps = result['video_fps']
    for x in [23,24,25,30,50]:
       if (fps!=x) and abs(fps - x*coef) < .01:
           result['video_fps'] = x*coef

    if check_duration:
       result['video_nframes'] = int(result['duration']*result['video_fps'])+1
       result['video_duration'] = result['duration']
    else:
       result['video_nframes'] = 1
       result['video_duration'] = None
    # We could have also recomputed the duration from the number
    # of frames, as follows:
    # >>> result['video_duration'] = result['video_nframes'] / result['video_fps']

    If I set the slo-mo video’s fps using moviepy to 24, it outputs it the same (very fast, then still on the last frame), but if I set the slo-mo video’s fps to 20, then it outputs it correctly.

    Obviously video players like VLC player and Quicktime can correctly work out what frame speed to play, but moviepy/ffmpeg fails. Moviepy/ffmpeg is getting the wrong fps from somewhere.

    So, how can I get moviepy to automatically output them as they are supposed to be without human trial and error like above ?

  • What do the parameters in LocalMotion in vid.stab mean ? (understanding transforms.trf)

    17 février 2016, par Melanie Sclar

    I’ve been trying to understand the log file transforms.trf in vid.stab. I realized that it’s the local motions in each frame, but I still don’t get all the parameters.

    Looking at the code, in serialize.c I found :

       int storeLocalmotion(FILE* f, const LocalMotion* lm){
     return fprintf(f,"(LM %i %i %i %i %i %lf %lf)", lm->v.x,lm->v.y,lm->f.x,lm->f.y,lm->f.size,
                    lm->contrast, lm->match);
    }

    I imagine (v.x, v.y) is the direction of the motion vector and (f.x, f.y) is the starting point. f.size maybe means the magnitude of the vector (although (v.x, v.y) could have expressed that already), but I have no idea of what match and contrast mean. I think contrast refers to the same concept as the option ’mincontrast’, but I’m not sure what it means.

    Thanks a lot !

  • Combine two clips from two different videos into one video with javascript (client side) ?

    19 mai 2017, par Mike Johnson Jr

    Does anyone know if this is possible ?

    The closest thing I found to what I am looking for is this : http://bgrins.github.io/videoconverter.js/

    But the "docs" are very minimal.