Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (22)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

Sur d’autres sites (3607)

  • FFMPEG animation with multiple images

    7 octobre 2015, par user1402732

    I am using ffmpeg command line tool for creating video by mixing images & audio files. Everything is working as expected. Problem started when I need to add some animation to the images when creating videos. i.e. adding zoom in effect to multiple images, it has filters but none of seems to be working with multiple inputs but only for single input.

    Works fine :

    ffmpeg -loop 1 -i Winter.jpg -vf "zoompan=z='min(zoom+0.0015,1.5)':d=125" \
    -c:v libx264  -t 5 -s "800x450" zoomin1.mp4

    But this does not :

    ffmpeg -loop 1 -framerate 1 -i bg2.jpg -framerate 1/3 -i img%03d.jpg -i audio.mp3 \
    -filter_complex overlay=(W-w)/2:(H-h)/2:shortest=1,format=yuv420p,zoompan=z='zoom+0.095':d=3 \
    -c:v libx264 -r 30 -c:a aac -strict experimental -b:a 192k -movflags +faststart \
    -shortest testvideo.mp4

    It’s with multiple image and background image & audio.

    It zooms but transition is not smooth and also there’s a gap between images. It should go smoothly one after another.

  • How to use ffmpeg to make a video from one still image with height from 0 to 100% animation,

    30 août 2021, par Xiang Chen

    I want use a still image to make a transparent webm video, this video needs to have the following style :

    


      

    1. The image height auto increase from 0 to 100% in specific time.
    2. 


    3. I don't want scroll effect , what i want is just like the image spread from top to bottom
    4. 


    


    Below is my demo image :

    


    below is my demo image

    


    This is the effect I want :

    


    this is the effect i want

    


    Black color part represent transparency.

    


  • Python animation saves only one single frame

    5 octobre 2015, par JohnND

    I’m trying to save a python animation as a video file. The animation itself works fine with show(). But when I use save() I get a video file containing only one frame which stays on for the duration of the video. The duration itself seems correct (2 minutes).
    Here’s my script, it gets some data from files that are read by custom functions then use the data to make an animation. I’ve tried various alternatives like specifying ffmpeg as writer or using Agg as backend. So far it all gives the same result. Is there some obvious misuse of the animation module ?

    #!/usr/bin/env python

    import sys
    import os
    import matplotlib
    #matplotlib.use("Agg")
    import numpy as np
    import math as mh
    from pylab import *
    from matplotlib import animation as animation
    #plt.rcParams['animation.ffmpeg_path'] = '/usr/bin/ffmpeg'

    sys.path.append('/home/jseverin/bin/myPythonScripts/')
    import temp_profile_v4

    ##########################################################################
    #                          Function definition                           #
    ##########################################################################


    ##########################################################################
    #                                  Main                                  #
    ##########################################################################

    def main(args):
       log_file = args[1]

       lz, coords, instant_profiles, fig1, Nlayers = temp_profile_v4.main(["temp_profile_v4.py", "-i", log_file])
       close(fig1)

       # Layer thickness in angstroms
       thickA = lz/Nlayers
       thickA2 = thickA/2


       # We need to slice the array
       # We choose the width of the exclusion area as a fraction of the source/sink width
       fract = 1.0
       safeDist = fract*thickA
       #sliced_coords, sliced_temps = slice_prof(safeDist, thickA2, lz, slice_coords, slice_temps)

       Nframes = int(len(instant_profiles)/2)

       # Plot setup

       fig = figure(figsize=(12,8.5)) # initialise la figure
       line, = plot([],[], '-', linewidth=1.5, label = "T(z)")

       ymax = 0
       for prof in instant_profiles :
           dummy = max(prof)
           if dummy > ymax :
               ymax = dummy

       ymin = 999999999
       for prof in instant_profiles :
           dummy = min(prof)
           if dummy < ymin :
               ymin = dummy

       xlim([-0.1, lz])
       ylim([ymin, ymax])
       xlabel(r'z ($\AA$)', fontsize=14)
       ylabel('Temperature (K)', fontsize=14)

       # Show source and sink on graph
       axvspan(lz/4-thickA2, lz/4+thickA2, alpha=0.2, color='black', label=r"source/sink (a = %d $\AA$)" % int(round(thickA)))
       axvspan(3*lz/4-thickA2, 3*lz/4+thickA2, alpha=0.2, color='black')
       axvline(x=lz/4 + thickA2 + safeDist, linestyle='--', color='k')
       axvline(x=3*lz/4 - thickA2 - safeDist, linestyle='--', color='k')

       # fonction a definir quand blit=True
       # cree l'arriere de l'animation qui sera present sur chaque image
       def init():
           line.set_data([],[])
           return line,

       def animate(i):
           step = 2*i
           line.set_data(coords, instant_profiles[step])
           return line,

       ani = animation.FuncAnimation(fig, animate, init_func=init, frames=Nframes, blit=True, interval=20, repeat=False)

       show()

       #FFwriter = animation.FFMpegWriter()
       #ani.save('dynamic_profile.mp4', writer = 'ffmpeg')

       # Set up formatting for the movie files
       #Writer = animation.writers['ffmpeg']
       #writer = Writer(fps=15, metadata=dict(artist='Me'), bitrate=1800)
       #ani.save('animation.mp4', writer=writer)

       ani.save('animation.mp4', fps=15)

    # End main

    if __name__=="__main__":
       main(sys.argv)