Recherche avancée

Médias (0)

Mot : - Tags -/diogene

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

Autres articles (29)

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

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (5051)

  • Glitchy mp4 File saved with Matplotlib Animation via ffmpeg

    9 janvier 2024, par Jacob Ivanov

    I am attempting to save an .mp4 file using matplotlib.animation to output some simulation results. The relevent section is as follows :

    


    ANI = FuncAnimation(fig, update, init_func = lambda : None, frames = range(0, 21300, 50))
ANI.save("[removed]/anim/v6 256 unforced 0.02.mp4", dpi = 600, fps = 30, writer = 'ffmpeg')


    


    However, it appears that there is some issue in the produced .mp4 file, as when I use macOS Quicktime to view the file, it pauses on certain frames, and restarts later on. It appears to consistently pause on the same frame a few seconds in. In order to check if Quicktime was the problem, I opened some random .mp4 files I found in a family group chat, and did not have this issue.

    


    I also tried viewing this .mp4 file with VLC, which had no issue, and played without any glitches. The Slack media viewer built into the app pauses similar to Quicktime.

    


    The following are all relevant versions :

    


      

    • macOS : 14.2.1 (23C71)
    • 


    • Python : 3.10.9 via Homebrew
    • 


    • Matplotlib : 3.6.2
    • 


    • ffmpeg : 6.1.1
    • 


    


    If it would help, I can also provide the .mp4 file itself, but I'm not quite sure how to upload it. I will be happy to provide any additional information as well.

    


    Unfortunately, I'm not very familiar with video rendering, but I would appreciate any help anyone could provide. Thank you in advance !

    


  • I keep having the message "MovieWriter ffmpeg unavailable ; using Pillow instead." I want to save as MP4 an animation

    6 décembre 2023, par Enrra

    I am doing an animation :

    


    animation = FuncAnimation(fig, update, frames=len(time_values), interval=250, repeat=False)
with a simple frame update function, I want it save it as a MP4 format :

    


    animation.save(f'{save_path}/heat_map.mp4', writer='ffmpeg', fps=10)

    


    I get the error message "MovieWriter ffmpeg unavailable ; using Pillow instead."

    


    I tried to do the following :

    


    plt.rcParams['animation.ffmpeg_path'] ='C:\\ProgramData\\Anaconda3\\LIB\\site-packages\\ffmpeg'
FFwriter = animation.FFMpegWriter()
animation.save(f'{save_path}/heat_map.mp4', writer = FFwriter, fps=10)


    


    This gets me an error message :

    


    Traceback (most recent call last):&#xA;  File "Graph_V1-8.py", line 406, in <module>&#xA;    FFwriter = animation.FFMpegWriter()&#xA;AttributeError: &#x27;FuncAnimation&#x27; object has no attribute &#x27;FFMpegWriter&#x27;&#xA;</module>

    &#xA;

    and I also tried to do the following :&#xA;animation.save(f&#x27;{save_path}/heat_map.mp4&#x27;, writer=&#x27;ffmpeg&#x27;, fps=10, codec=&#x27;libx264&#x27;)

    &#xA;

    which also get me the error :&#xA;"MovieWriter ffmpeg unavailable ; using Pillow instead."

    &#xA;

    When I write :

    &#xA;

    pip install ffmpeg&#xA;Requirement already satisfied: ffmpeg in c:\programdata\anaconda3\lib\site-packages (1.4)&#xA;

    &#xA;

    Thank you in advance for your help

    &#xA;

  • IPython.display Video giving an unplayable "empty" video when trying to run an animation from previous plots (Using ffmpeg)

    17 novembre 2023, par drhode

    I am working on a crater simulation project for a class and am running into a problem when it comes to creating a video. The general project is for us to simulate a surface being hit by craters until it becomes saturated. The code works, however, if I print out every graph in the simulation it would be thousands of graphs until sat is reached and then I would have to manually clip them all together. To circumvent this, I would like to take all the graphs and put them into an animation. I however, have no idea where to even start.

    &#xA;

    for reference, here is main code block :

    &#xA;

    import matplotlib.pyplot as plt&#xA;import numpy as np&#xA;import math&#xA;import os&#xA;import matplotlib.animation as ani&#xA;&#xA;#I have removed the definitions and class implementation for sake of simplicity and space&#xA;&#xA;ani.writers.list()&#xA;FFMpegWriter = ani.writers[&#x27;ffmpeg&#x27;]&#xA;writer = FFMpegWriter(fps = 10)&#xA;fig = plt.gcf()&#xA;figure = plt.figure()&#xA;fig.patch.set_alpha(1.0)&#xA;&#xA;with writer.saving(figure, "sine.mp4", 150):&#xA;    while sat_counter !=1:#while loop that will introduce new crater each iteration&#xA;&#xA;        new_crater = generate_crater()&#xA;        new_crater.age = sat_counter&#xA;        random_crater_list.append(new_crater)&#xA;&#xA;        i =0&#xA;&#xA;        while i &lt; len(random_crater_list):#looping through the crater list and comparing new crater to all others&#xA;&#xA;&#xA;            old_crater = random_crater_list[i]&#xA;&#xA;&#xA;            overlap = square_overlap(old_crater, new_crater)#checks if old crater should be covered/removed by new crater&#xA;          &#xA;&#xA;            if overlap == True:&#xA;                    random_crater_list.remove(old_crater)&#xA;                    i=i-1&#xA;&#xA;                    &#xA;            else:&#xA;                pass&#xA;&#xA;            i=i&#x2B;1&#xA;&#xA;        sat = Saturation(random_crater_list)# checks the saturation of the graph and returns a a number between 0 and 100&#xA;        if sat > 90:&#xA;            sat_counter = 1#base condition used to break the while loop&#xA;&#xA;        writer.grab_frame()&#xA;plot_craters(random_crater_list)                   &#xA;&#xA;

    &#xA;

    Here is what the final graph looks like&#xA;saturated surface

    &#xA;

    I have tried to use the IPython.display video :

    &#xA;

    &#xA;Video("sine.mp4", embed = True, width = 320, height = 320)&#xA;

    &#xA;

    This however loads an empty video that is unplayable.&#xA;empty video

    &#xA;