Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (26)

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

  • avfilter/all : propagate errors of functions from avfilter/formats

    5 octobre 2015, par Ganesh Ajjanagadde
    avfilter/all : propagate errors of functions from avfilter/formats
    

    Many of the functions from avfilter/formats can return errors, usually AVERROR(ENOMEM).
    This propagates the return values.

    All of these were found by using av_warn_unused_result, demonstrating its utility.

    Tested with FATE. I am least sure of the changes to avfilter/filtergraph,
    since I don’t know what/how reduce_format is intended to behave and how it should
    react to errors.

    Fixes : CID 1325680, 1325679, 1325678.

    Reviewed-by : Michael Niedermayer <michael@niedermayer.cc>
    Previous version Reviewed-by : Nicolas George <george@nsup.org>
    Previous version Reviewed-by : Clément Bœsch <u@pkh.me>
    Signed-off-by : Ganesh Ajjanagadde <gajjanagadde@gmail.com>

    • [DH] libavfilter/aeval.c
    • [DH] libavfilter/af_aformat.c
    • [DH] libavfilter/af_agate.c
    • [DH] libavfilter/af_amerge.c
    • [DH] libavfilter/af_amix.c
    • [DH] libavfilter/af_aresample.c
    • [DH] libavfilter/af_astreamsync.c
    • [DH] libavfilter/af_channelmap.c
    • [DH] libavfilter/af_channelsplit.c
    • [DH] libavfilter/af_earwax.c
    • [DH] libavfilter/af_extrastereo.c
    • [DH] libavfilter/af_join.c
    • [DH] libavfilter/af_pan.c
    • [DH] libavfilter/af_replaygain.c
    • [DH] libavfilter/af_resample.c
    • [DH] libavfilter/af_sidechaincompress.c
    • [DH] libavfilter/af_stereotools.c
    • [DH] libavfilter/af_stereowiden.c
    • [DH] libavfilter/asrc_anullsrc.c
    • [DH] libavfilter/asrc_flite.c
    • [DH] libavfilter/avf_aphasemeter.c
    • [DH] libavfilter/avf_avectorscope.c
    • [DH] libavfilter/avf_concat.c
    • [DH] libavfilter/avf_showcqt.c
    • [DH] libavfilter/avf_showfreqs.c
    • [DH] libavfilter/avf_showspectrum.c
    • [DH] libavfilter/avf_showvolume.c
    • [DH] libavfilter/avf_showwaves.c
    • [DH] libavfilter/avfiltergraph.c
    • [DH] libavfilter/buffersink.c
    • [DH] libavfilter/buffersrc.c
    • [DH] libavfilter/drawutils.c
    • [DH] libavfilter/f_drawgraph.c
    • [DH] libavfilter/f_ebur128.c
    • [DH] libavfilter/formats.c
    • [DH] libavfilter/src_movie.c
    • [DH] libavfilter/vf_alphamerge.c
    • [DH] libavfilter/vf_boxblur.c
    • [DH] libavfilter/vf_crop.c
    • [DH] libavfilter/vf_detelecine.c
    • [DH] libavfilter/vf_displace.c
    • [DH] libavfilter/vf_elbg.c
    • [DH] libavfilter/vf_extractplanes.c
    • [DH] libavfilter/vf_fieldorder.c
    • [DH] libavfilter/vf_frei0r.c
    • [DH] libavfilter/vf_hflip.c
    • [DH] libavfilter/vf_histogram.c
    • [DH] libavfilter/vf_il.c
    • [DH] libavfilter/vf_maskedmerge.c
    • [DH] libavfilter/vf_mergeplanes.c
    • [DH] libavfilter/vf_neighbor.c
    • [DH] libavfilter/vf_noise.c
    • [DH] libavfilter/vf_overlay.c
    • [DH] libavfilter/vf_palettegen.c
    • [DH] libavfilter/vf_paletteuse.c
    • [DH] libavfilter/vf_scale.c
    • [DH] libavfilter/vf_showpalette.c
    • [DH] libavfilter/vf_stack.c
    • [DH] libavfilter/vf_swapuv.c
    • [DH] libavfilter/vf_telecine.c
    • [DH] libavfilter/vf_transpose.c
    • [DH] libavfilter/vf_vectorscope.c
    • [DH] libavfilter/vsrc_life.c
  • attempting to save FuncAnimation changes the animation

    25 mars 2024, par pibion

    I am attempting to create and save an animation of a time-varying vector field using matplotlib's FuncAnimation. When I run the animation without attempting to save it, it updates smoothly as expected. However, when I try to save the animation, the vectors increase in length and the animation only appears to update a few times. I've been able to record the screen to get a video file, but I'd like to understand how to save the animation to a video in python.

    &#xA;

    Here is the code to create the vector field animation. I ran this in a local jupyter notebook using python 3.9.12 on Windows.

    &#xA;

    %matplotlib notebook&#xA;import numpy as np&#xA;import matplotlib.pyplot as plt&#xA;import matplotlib.animation as animation&#xA;&#xA;x_min, x_max = -20, 20&#xA;y_min, y_max = 0, 25&#xA;wire_x = -4&#xA;wire_y = 17&#xA;&#xA;# Define the vector field function (example: rotating vector field)&#xA;def vector_field(x, y, t):&#xA;    x = x - wire_x&#xA;    y = y - wire_y&#xA;    r = np.sin(t) / (x**2 &#x2B; y**2)&#xA;    u = -r * y&#xA;    v = r * x&#xA;    return (u, v)&#xA;&#xA;# Define grid&#xA;x = np.linspace(x_min, x_max, 20)&#xA;y = np.linspace(y_min, y_max, 20)&#xA;X, Y = np.meshgrid(x, y)&#xA;&#xA;# Create animation&#xA;fig, ax = plt.subplots(1,1)&#xA;ax.set_aspect(&#x27;equal&#x27;)&#xA;ax.set_xlim(x_min, x_max)&#xA;ax.set_ylim(y_min, y_max)&#xA;ax.set_xlabel(&#x27;X (m)&#x27;)&#xA;ax.set_ylabel(&#x27;Y (m)&#x27;)&#xA;&#xA;u, v = vector_field(X, Y, 1)&#xA;&#xA;quiver = ax.quiver(X, Y, u, v)&#xA;&#xA;time_arr = np.linspace(0,20,200)&#xA;&#xA;plt.show()&#xA;&#xA;def update_quiver(num):&#xA;    t = num * 0.1  # Time step&#xA;    u, v = vector_field(X, Y, t)&#xA;    quiver.set_UVC(u, v)&#xA;&#xA;ani = animation.FuncAnimation(fig, update_quiver, frames=200, interval=50, repeat=False)&#xA;

    &#xA;

    This produces an animation whose vectors smoothly vary in length on my computer.

    &#xA;

    However, when I try to save the animation by adding the lines

    &#xA;

    writervideo = animation.FFMpegWriter(fps=60) &#xA;ani.save(&#x27;field_leftWire.mp4&#x27;, writer=writervideo) &#xA;

    &#xA;

    then the animation changes - the vectors are much longer and it appears to only update a few times throughout the animation.

    &#xA;

    I'll also note that I had to install ffmpeg and restart my computer as outlined in Installation of FFMPEG for Python in WIndows to get the last two lines to run without error.

    &#xA;

  • FFmpeg zoompan animation results in zig-zag pattern [closed]

    2 février 2024, par kregus

    please assist, as I am pulling my hair out !

    &#xA;

    The goal is for a user to specify a zoomPoint in a video as follows :

    &#xA;

    {&#xA;   "scale":4,        # Scale factor, here x4&#xA;   "offset":0,       # Start zooming in after 0ms&#xA;   "duration":5000,  # Stay zoomed in for 5000ms&#xA;   "marginX":80,     # Zoom x to 80% of video width &#xA;   "marginY":10      # Zoom y to 10% of video height&#xA;}&#xA;

    &#xA;

    I am running the following, simplified FFmpeg command :

    &#xA;

    ffmpeg -i "/tmp/input.mp4" -c:v libx264 -r 30 -vf "scale=iw*2:ih*2,zoompan=fps=30:z=&#x27;if(gte(it,0.0)*lt(it,5.0), min(pzoom&#x2B;0.2, 4),if(gte(it,5.0)*lt(it,5.5), max(pzoom-0.2, 1), 1))&#x27;:d=1:s=1512x982:x=&#x27;(iw - iw/4)*(80/100)&#x27;:y=&#x27;(ih - ih/4)*(10/100)&#x27;" /tmp/output.mp4&#xA;

    &#xA;

    The animation duration is 0.5s, the video framerate is 30fps, and so there are 0.5 / (1/30) = 15 animation frames.

    &#xA;

    Zoom distance is scale - 1 = 3 in this case, which makes the zoom increment 3 / 15 = 0.2.

    &#xA;

    This results in the following example video : click here

    &#xA;

    While the zoom animation ends in the correct position, you will notice it arrives at that position in a zig-zag pattern, where it starts by zooming into the top-right corner, before changing direction towards the correct position.

    &#xA;

    I cannot seem to figure out how to get it to animate the zoom in a straight line to the specified x/y position.

    &#xA;

    Any tips are welcome, thanks !

    &#xA;