Recherche avancée

Médias (0)

Mot : - Tags -/latitude

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

Autres articles (51)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

Sur d’autres sites (6776)

  • How can we add Animation on touch position overlay on video in android

    11 août 2017, par Vinesh Chauhan

    I am looking for any command of ffmpeg or any other library by using it I can archive an application that can able to do animation on capture video from the android device.

    I have already gone through some tutorials about this topic but I didn’t find any help related to this.

    please help !. TIA.

  • Can't save matplotlib animation (ffmpeg)

    25 mai 2014, par renger

    I am trying to get a simple animation saved using ffmpeg. I followed a tutorial to install ffmpeg, and I can now access it from the command prompt.

    Now I run this piece of code :

    import numpy as np
    from matplotlib import pyplot as plt
    from matplotlib import animation

    fig = plt.figure()
    ax = plt.axes(xlim=(0, 2), ylim=(-2, 2))
    line, = ax.plot([], [], lw=2)

    def init():
       line.set_data([], [])
       return line,

    def animate(i):
       x = np.linspace(0, 2, 1000)
       y = np.sin(2 * np.pi * (x - 0.01 * i))
       line.set_data(x, y)
       return line,

    anim = animation.FuncAnimation(fig, animate, init_func=init,
                                  frames=200, interval=20, blit=True)

    mywriter = animation.FFMpegWriter()
    anim.save('mymovie.mp4',writer=mywriter)

    plt.show()

    I get this error :

    Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
      File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 523, in runfile
       execfile(filename, namespace)
     File "C:\Users\Renger\.xy\startups\b.py", line 23, in <module>
       anim.save('mymovie.mp4',writer=mywriter)
     File "C:\Python27\lib\site-packages\matplotlib\animation.py", line 609, in save
       with writer.saving(self._fig, filename, dpi):
     File "C:\Python27\lib\contextlib.py", line 17, in __enter__
       return self.gen.next()
     File "C:\Python27\lib\site-packages\matplotlib\animation.py", line 166, in saving
       self.setup(*args)
     File "C:\Python27\lib\site-packages\matplotlib\animation.py", line 156, in setup
       self._run()
     File "C:\Python27\lib\site-packages\matplotlib\animation.py", line 183, in _run
       stdin=subprocess.PIPE)
     File "C:\Python27\lib\subprocess.py", line 711, in __init__
       errread, errwrite)
     File "C:\Python27\lib\subprocess.py", line 948, in _execute_child
       startupinfo)
    WindowsError: [Error 2] Het systeem kan het opgegeven bestand niet vinden
    </module></module></stdin>

    The last dutch sentence does mean something like : The system can’t find the specified file.

    What do these errors mean, and how can I solve them ?

    Best,

  • Why does ffmpeg could only record the first 100 frames of the animation ?

    9 février 2020, par jack fang

    I am using the following Python code to make an animation and want to save it as a video through FFmpeg (in PyCharm) :

    import numpy as np
    import matplotlib.pyplot as plt
    import matplotlib.animation as animation
    from matplotlib.animation import FFMpegWriter

    def func():
       for j in range(1, len(t)):
           time = j * 0.01
           print('time:{:2}'.format(time))
           yield time

    def animate(data):
       time = data
       ax2.plot(time, time, **{'marker':'o'})
       ax2.set_title('t = {:.2}'.format(time))
       return  ax2

    def init():
       ax2.plot(0, 0)
       return ax2

    dt = 0.01
    t = np.arange(0, 50, dt)

    fig2 = plt.figure()
    ax2 = fig2.add_subplot(111, autoscale_on=True)
    ax2.grid()

    ani = animation.FuncAnimation(fig2, animate, func, interval=dt*1000, blit=False, init_func=init, repeat=False)

    plt.rcParams['animation.ffmpeg_path'] = 'C:\Program Files\\ffmpeg\\bin\\ffmpeg.exe'
    writer = FFMpegWriter(fps=15, metadata=dict(artist='Me'), bitrate=1800)
    ani.save("movie.mp4", writer=writer)

    #plt.show()

    But when time reaches 1.0, the process stopped but it is supposed to stop when time reaches 50.0. The following picture shows when the process stopped. The PyCharm Run console
    I then check movie.mp4 and find that the video ends when time reaches 1.0.
    That is to say, only the first 100 frames of the animation were converted into the .mp4 file, so I was very confused where did the rest of the frames went ?

    I tried to run the code through windows cmd but got the same result.
    I then uncomment the line #plt.show() and found that the process stopped when time reaches 50.0 and the animation could be displayed properly but still only the first 100 frames was converted.

    I am now very confused about this problem and don’t know how to solve it. Appreciated for your help. :)