Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (21)

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

  • FFMpegWriter not using the bitrate specified ? Animation is very blurry

    18 mai 2022, par cebo

    I am using matplotlib's FunAnimation as well as FFMpegWriter to try to write a simulation animation to a file. I'd like to save a high quality version of it, but when I increase the bitrate value of the writer, the actual bitrate of the .mp4 it creates seems to increase in discrete steps up to a fairly low value after which it doesn't increase any more whatsoever.

    


    My code is roughly :

    


    dpi = 96&#xA;fig = plt.figure(figsize=(width/dpi, height/dpi), dpi=dpi)&#xA;anim = FuncAnimation(fig, myAnimation, frames=100, interval=1, blit=True)&#xA;writer = animation.FFMpegWriter(fps=10, bitrate=<some number="number">)&#xA;anim.save(&#x27;MyAnimation.mp4&#x27;, writer=writer)&#xA;</some>

    &#xA;

    The animation is only 200x200px so I feel like it shouldn't be a problem to have a high quality video, but I can't seem to get a high enough bitrate. For the following bitrates specified in my code, the actual bitrate shown in the files properties are :

    &#xA;

    BR In Code   => Actual BR (kbps)&#xA;-1 / None    => 13&#xA;100          => 58&#xA;1000         => 76&#xA;10000        => 76&#xA;

    &#xA;

    The bitrate doesn't seem to track very well at all, and won't go above 76kbps at all. The video is still badly blurry at this bitrate.

    &#xA;

    What do I need to do to increase the bitrate or else the quality of the video file ?

    &#xA;

    Alternatively, is there a better video format/writer to use for this purpose ? Specifically one that is broadly supported so I could embed it in a website or upload it to YouTube or something like that.

    &#xA;

    Edit :

    &#xA;

    To be more specific about the issue, neighboring pixels are being blended together, resulting in a blurry look. The following imgur album shows several examples with different settings :

    &#xA;

    https://imgur.com/a/cxQnV4x

    &#xA;

    These include the view in the figure window from plt.show(), default bitrate, a "high" bitrate, and something else I just tried which was to increase the dpi. While the results are much nicer it also nearly doubled the execution time so I'd like to avoid it.

    &#xA;

    It seems silly to have to upscale what is effectively "pixel art" in order for it to look good, but I guess this is an artifact of the signal processing approach mpeg uses, which is why I suspect a different file format might be the best solution for small framed animations like this. If I wanted to do a 1920*1080 animation the blurring would probably be less of an issue.

    &#xA;

  • How could I create a fps=1 mp4 video using FFMpegWriter from matplotlib.animation ?

    3 août 2024, par liubenyuan

    I would like to create a video to visualize a small dataset. This dataset contains only 10 or 20 frames of data, and I want to visualize it one frame a second and make a .mp4 video using FFMpegWriter.

    &#xA;

    But when I set fps=1, there is a long time black screen of the result video and only a still image. After that, this .mp4 ends. An example of code is as follows :

    &#xA;

    import numpy as np&#xA;from matplotlib.animation import FFMpegWriter&#xA;&#xA;np.random.seed(0)&#xA;fig, ax = plt.subplots(figsize=(9, 4))&#xA;ln, = ax.plot([])&#xA;ax.set_xlim([0, 1000])&#xA;ax.set_ylim([-1, 1])&#xA;ax.grid(True)&#xA;&#xA;writer = FFMpegWriter(fps=1)&#xA;with writer.saving(fig, "writer_test.mp4", 300):&#xA;    for i in range(20):&#xA;        x = np.arange(1000)&#xA;        t = np.random.randn(1000)&#xA;        y = np.sin(2 * np.pi * t)&#xA;        ln.set_data(x, y)&#xA;        writer.grab_frame()&#xA;plt.show()&#xA;

    &#xA;

    If I change fps to 10, then the video flows well but end too soon. Can I grab and make videos one frame per second ?

    &#xA;

  • swscale : aarch64 : Optimize the final summation in the hscale routine

    20 avril 2022, par Martin Storsjö
    swscale : aarch64 : Optimize the final summation in the hscale routine
    

    Before : Cortex A53 A72 A73 Graviton 2 Graviton 3
    hscale_8_to_15_width8_neon : 8273.0 4602.5 4289.5 2429.7 1629.1
    hscale_8_to_15_width16_neon : 12405.7 6803.0 6359.0 3549.0 2378.4
    hscale_8_to_15_width32_neon : 21258.7 11491.7 11469.2 5797.2 3919.6
    hscale_8_to_15_width40_neon : 25652.0 14173.7 12488.2 6893.5 4810.4

    After :
    hscale_8_to_15_width8_neon : 7633.0 3981.5 3350.2 1980.7 1261.1
    hscale_8_to_15_width16_neon : 11666.7 5951.0 5512.0 3080.7 2131.4
    hscale_8_to_15_width32_neon : 20900.7 10733.2 9481.7 5275.2 3862.1
    hscale_8_to_15_width40_neon : 24826.0 13536.2 11502.0 6397.2 4731.9

    Thus, this gives overall a 8-29% speedup for the smaller filter
    sizes, around 1-8% for the larger filter sizes.

    Inspired by a patch by Jonathan Swinney <jswinney@amazon.com>.

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DH] libswscale/aarch64/hscale.S