Recherche avancée

Médias (91)

Autres articles (76)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

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

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (9658)

  • Revision 32858 : on vire ce .foucs() qui "force le scroll" vers l’input du formulaire au ...

    12 novembre 2009, par brunobergot@… — Log

    on vire ce .foucs() qui "force le scroll" vers l’input du formulaire au chargement de la page

  • Revision 32737 : habillage par defaut de Zpip utilise les conventions documentees

    8 novembre 2009, par cedric@… — Log

    habillage par defaut de Zpip utilise les conventions documentees

  • How to implement spring animation (mass, tension, friction) in FFmpeg zoompan filter instead of linear interpolation ?

    29 mai, par Mykyta Manuilenko

    I'm trying to create a zoom-in and zoom-out animation using FFmpeg's zoompan filter, but I want to replace the linear interpolation with a spring animation that uses physics parameters (mass, tension, friction).

    


    My input parameters :

    


    "zoompan": {
  "focusRect": {
    "x": 1086.36,
    "y": 641.87,
    "width": 613,
    "height": 345
  },            
  "easing": {
    "mass": 1,
    "tension": 120,
    "friction": 20
  }
}


    


    Current working linear animation :

    


    ffmpeg -framerate 25 -loop 1 -i input.png \
  -filter_complex "\
    [0:v]scale=6010:3380,setsar=1,split=3[zoomin_input][hold_input][zoomout_input]; \
    [zoomin_input]zoompan= \
      z='iw/(iw/zoom + (ow - iw)/duration)': \
      x='x + (3400 - 0)/duration': \
      y='y + (2009 - 0)/duration': \
      d=25:fps=25:s=1920x1080, \
      trim=duration=1,setpts=PTS-STARTPTS[zoomin]; \
    [hold_input]crop=1920:1080:3400:2009,trim=duration=4,setpts=PTS-STARTPTS[hold]; \
    [zoomout_input]zoompan=\
      zoom='if(eq(on,0),iw/ow,iw/(iw/zoom + (iw-ow)/duration))':\
      x='if(eq(on,0),3400,x + (0-3400)/duration)':\
      y='if(eq(on,0),2009,y + (0-2009)/duration)':\
      d=25:fps=25:s=1920x1080, \
      trim=duration=1,setpts=PTS-STARTPTS[zoomout];
    [zoomin][hold][zoomout]concat=n=3:v=1:a=0[outv]" \
  -map "[outv]" \
  -crf 23 \
  -preset medium \
  -c:v libx264 \
  -pix_fmt yuv420p \
  output.mp4


    


    Notes :

    


      

    • It creates a perfectly straight zoom path to the specific point on the screen (similar to pinch-zooming on a smartphone - straight zooming to the center of the focus rectangle)

      


    • 


    • To improve the quality of the output, I upscale it beforehand

      


    • 


    


    What I want to achieve :

    


    Instead of linear interpolation, I want to implement a spring function with these physics parameters :

    


      

    • mass : 1
    • 


    • tension : 120
    • 


    • friction : 20
    • 


    


    Note that these params can be changed.

    


    Also, I want to preserve a perfectly straight zoom path to the specific point on the screen (similar to pinch-zooming on a smartphone).

    


    Question :

    


    How can I properly implement a spring animation function in FFmpeg's zoompan filter ?