Recherche avancée

Médias (0)

Mot : - Tags -/objet éditorial

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

Autres articles (23)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

Sur d’autres sites (7430)

  • Stop doing this in your encoder comparisons

    14 juin 2010, par Dark Shikari — Uncategorized

    I’ll do a more detailed post later on how to properly compare encoders, but lately I’ve seen a lot of people doing something in particular that demonstrates they have no idea what they’re doing.

    PSNR is not a very good metric. But it’s useful for one thing : if every encoder optimizes for it, you can effectively measure how good those encoders are at optimizing for PSNR. Certainly this doesn’t tell you everything you want to know, but it can give you a good approximation of “how good the encoder is at optimizing for SOMETHING“. The hope is that this is decently close to the visual results. This of course can fail to be the case if one encoder has psy optimizations and the other does not.

    But it only works to begin with if both encoders are optimized for PSNR. If one optimizes for, say, SSIM, and one optimizes for PSNR, comparing PSNR numbers is completely meaningless. If anything, it’s worse than meaningless — it will bias enormously towards the encoder that is tuned towards PSNR, for obvious reasons.

    And yet people keep doing this.

    They keep comparing x264 against other encoders which are tuned against PSNR. But they don’t tell x264 to also tune for PSNR (–tune psnr, it’s not hard !), and surprise surprise, x264 loses. Of course, these people never bother to actually look at the output ; if they did, they’d notice that x264 usually looks quite a bit better despite having lower PSNR.

    This happens so often that I suspect this is largely being done intentionally in order to cheat in encoder comparisons. Or perhaps it’s because tons of people who know absolutely nothing about video coding insist on doing comparisons without checking their methodology. Whatever it is, it clearly demonstrates that the person doing the test doesn’t understand what PSNR is or why it is used.

    Another victim of this is Theora Ptalarbvorm, which optimizes for SSIM at the expense of PSNR — an absolutely great decision for visual quality. And of course if you just blindly compare Ptalarbvorm (1.2) and Thusnelda (1.1), you’ll notice Ptalarbvorm has much lower PSNR ! Clearly, it must be a worse encoder, right ?

    Stop doing this. And call out the people who insist on cheating.

  • HTML5 Audio() : Improved audio formats, mp3, mp4/aac + detection. Works on Palm Pre (tested on WebOS 1.4.1). HTML5 on for iPad, iPhone, Pre. Removed JS interval timer, using native timeupdate event. Callback frequency may be lower, but lower CPU. Element now unloaded + reference nulled at stop() / onfinish().

    17 mai 2010, par Scott Schiller

    m script/soundmanager2-jsmin.js m script/soundmanager2-nodebug-jsmin.js m script/soundmanager2.js HTML5 Audio() : Improved audio formats, mp3, mp4/aac + detection. Works on Palm Pre (tested on WebOS 1.4.1). HTML5 on for iPad, iPhone, Pre. Removed JS interval timer, using native timeupdate event. (...)

  • What do I need in order to save animation videos from matplotlib in mp3 format ?

    27 juin 2022, par DarthMalloc

    I am using python3.8 on Linux Mint 19.3, and I am trying to save an animation created by a cellular automata model in matplotlib. My actual code for the model is private, but it uses the same code for saving the animation as the code shown below, which is a slight modification of one of the examples shown in the official matplotlib documentation :

    


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

fig, ax = plt.subplots()


def f(x, y):
    return np.sin(x) + np.cos(y)

x = np.linspace(0, 2 * np.pi, 120)
y = np.linspace(0, 2 * np.pi, 100).reshape(-1, 1)

fig, ax = plt.subplots()


    
ims = []
for i in range(60):
    x += np.pi / 15.
    y += np.pi / 20.
    im = ax.imshow(f(x, y), animated=True)
    if i == 0:
        ax.imshow(f(x, y))  # show an initial one first
    ims.append([im])

ani = animation.ArtistAnimation(fig, ims, interval=50, blit=True,
                                    repeat_delay=1000)

    # To save the animation, use e.g.
    #
    # ani.save("movie.mp4")
    #
    # or
    #
writer = animation.FFMpegWriter(fps=15, metadata=dict(artist='Me'), bitrate=1800)
ani.save("movie.mp3", writer=writer)


    


    When executed, the code produces this error :

    


        MovieWriter stderr:&#xA;    Output file #0 does not contain any stream&#xA;&#xA;    Traceback (most recent call last):&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/animation.py", line 234, in saving&#xA;        yield self&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/animation.py", line 1093, in save&#xA;        writer.grab_frame(**savefig_kwargs)&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/animation.py", line 351, in grab_frame&#xA;        self.fig.savefig(self._proc.stdin, format=self.frame_format,&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/figure.py", line 3046, in savefig&#xA;        self.canvas.print_figure(fname, **kwargs)&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/backend_bases.py", line 2319, in print_figure&#xA;        result = print_method(&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/backend_bases.py", line 1648, in wrapper&#xA;        return func(*args, **kwargs)&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/_api/deprecation.py", line 415, in wrapper&#xA;        return func(*inner_args, **inner_kwargs)&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/backends/backend_agg.py", line 486, in print_raw&#xA;        fh.write(renderer.buffer_rgba())&#xA;    BrokenPipeError: [Errno 32] Broken pipe&#xA;&#xA;    During handling of the above exception, another exception occurred:&#xA;&#xA;    Traceback (most recent call last):&#xA;      File "/home/justin/animation_test.py", line 36, in <module>&#xA;        ani.save("movie.mp3", writer=writer)&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/animation.py", line 1093, in save&#xA;        writer.grab_frame(**savefig_kwargs)&#xA;      File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__&#xA;        self.gen.throw(type, value, traceback)&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/animation.py", line 236, in saving&#xA;        self.finish()&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/animation.py", line 342, in finish&#xA;        self._cleanup()  # Inline _cleanup() once cleanup() is removed.&#xA;      File "/usr/local/lib/python3.8/dist-packages/matplotlib/animation.py", line 373, in _cleanup&#xA;        raise subprocess.CalledProcessError(&#xA;    subprocess.CalledProcessError: Command &#x27;[&#x27;ffmpeg&#x27;, &#x27;-f&#x27;, &#x27;rawvideo&#x27;, &#x27;-vcodec&#x27;, &#x27;rawvideo&#x27;, &#x27;-s&#x27;, &#x27;640x480&#x27;, &#x27;-pix_fmt&#x27;, &#x27;rgba&#x27;, &#x27;-r&#x27;, &#x27;15&#x27;, &#x27;-loglevel&#x27;, &#x27;error&#x27;, &#x27;-i&#x27;, &#x27;pipe:&#x27;, &#x27;-vcodec&#x27;, &#x27;h264&#x27;, &#x27;-pix_fmt&#x27;, &#x27;yuv420p&#x27;, &#x27;-b&#x27;, &#x27;1800k&#x27;, &#x27;-metadata&#x27;, &#x27;artist=Me&#x27;, &#x27;-y&#x27;, &#x27;movie.mp3&#x27;]&#x27; returned non-zero exit status 1.&#xA;</module>

    &#xA;

    I have looked at posts on similar queries concerning matplotlib animations, but none have specifically included the error Output file #0 does not contain any stream. I have little experience with ffmpeg, so I am wondering what might be missing.

    &#xA;