Recherche avancée

Médias (3)

Mot : - Tags -/plugin

Autres articles (98)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

Sur d’autres sites (10263)

  • avcodec/alsdec : Set channels from data after data is set

    18 mars 2022, par Michael Niedermayer
    avcodec/alsdec : Set channels from data after data is set
    

    Fixes : out of array write
    Fixes : 45624/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-6473487382872064
    Fixes : 45626/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-4874997192065024

    Found-by : continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
    Reviewed-by : James Almer <jamrial@gmail.com>
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavcodec/alsdec.c
  • How to save animations with tight layout, transparency and in high quality

    23 octobre 2023, par mapf

    I am trying to implement an option in my GUI to save an image sequence displayed using matplotlib. The code looks something like this :

    &#xA;&#xA;

    import matplotlib.pyplot as plt&#xA;from matplotlib.backends.backend_qt5agg import \&#xA;    FigureCanvasQTAgg as FigureCanvas&#xA;from matplotlib.animation import FuncAnimation&#xA;from PIL import Image&#xA;&#xA;&#xA;plt.rcParams[&#x27;savefig.bbox&#x27;] = &#x27;tight&#x27; &#xA;&#xA;&#xA;class Printer:&#xA;    def __init__(self, data):&#xA;        self.fig, self.ax = plt.subplots()&#xA;        self.canvas = FigureCanvas(self.fig)&#xA;&#xA;        # some irrelevant color adjustment here&#xA;        #self.ax.spines[&#x27;bottom&#x27;].set_color(&#x27;#f9f2d7&#x27;)&#xA;        #self.ax.spines[&#x27;top&#x27;].set_color(&#x27;#f9f2d7&#x27;)&#xA;        #self.ax.spines[&#x27;right&#x27;].set_color(&#x27;#f9f2d7&#x27;)&#xA;        #self.ax.spines[&#x27;left&#x27;].set_color(&#x27;#f9f2d7&#x27;)&#xA;        #self.ax.tick_params(axis=&#x27;both&#x27;, colors=&#x27;#f9f2d7&#x27;)&#xA;        #self.ax.yaxis.label.set_color(&#x27;#f9f2d7&#x27;)&#xA;        #self.ax.xaxis.label.set_color(&#x27;#f9f2d7&#x27;)&#xA;        #self.fig.subplots_adjust(left=0.1, right=0.975, bottom=0.09, top=0.98)&#xA;        self.fig.patch.set_alpha(0)&#xA;        self.fig.patch.set_visible(False)&#xA;        self.canvas.setStyleSheet("background-color:transparent;")&#xA;        self.fig.set_size_inches(10, 10, True)&#xA;        self.fig.tight_layout()&#xA;&#xA;        self.data = data&#xA;        self.image_artist = self.ax.imshow(data[0])&#xA;&#xA;    def animate(self, i):&#xA;        self.image_artist.set_data(self.data[i])&#xA;        self.canvas.draw()&#xA;&#xA;&#xA;def save_animation():&#xA;    data = [&#xA;        Image.open("test000.png"),&#xA;        Image.open("test001.png"),&#xA;    ]&#xA;    file = &#x27;test.gif&#x27;&#xA;    printer = Printer(data)&#xA;&#xA;    ani = FuncAnimation(&#xA;        printer.fig, printer.animate, interval=100, frames=len(data),&#xA;    )&#xA;    # writer = animation.writers[&#x27;pillow&#x27;](bitrate=1000)&#xA;    ani.save(&#xA;        file, writer=&#x27;pillow&#x27;, savefig_kwargs={&#x27;transparent&#x27;: True, &#x27;bbox_inches&#x27;: &#x27;tight&#x27;}&#xA;    )&#xA;&#xA;&#xA;save_animation()&#xA;

    &#xA;&#xA;

    Transparency :

    &#xA;&#xA;

    As you can see I have already tried several different approaches as suggested elsewhere (1, 2), but didn't manage to find a solution. All of the settings and arguments patch.set_alpha(0), patch.set_visible(False), canvas.setStyleSheet("background-color:transparent;"), savefig_kwargs={&#x27;transparent&#x27;: True} seem to have no effect at all on the transparency. I found this post but I didn't get the code to work (for one I had to comment out this %matplotlib inline, but then I ended up getting some error during the MovieWriter.cleanup out = TextIOWrapper(BytesIO(out)).read() TypeError: a bytes-like object is required, not &#x27;str&#x27;). Here, it was suggested that this is actually a bug, but the proposed workaroud doesn't work for me since I would have to rely on third-party software. There also exists this bug report which was supposedly solved, so maybe it is unrelated.

    &#xA;&#xA;

    Tight layout

    &#xA;&#xA;

    I actually couldn't really find much on this, but all the things I tried (plt.rcParams[&#x27;savefig.bbox&#x27;] = &#x27;tight&#x27;, fig.tight_layout(), savefig_kwargs={&#x27;bbox_inches&#x27;: &#x27;tight&#x27;}) don't have any effect or are even actively discarded in the case of the bbox_inches argument. How does this work ?

    &#xA;&#xA;

    High quality

    &#xA;&#xA;

    Since I cannot use ImageMagick and can't get ffmpeg to work (more on this below), I rely on pillow to save my animation. But the only argument in terms of quality that I can pass on seems to be the bitrate, which doesn't have any effect. The files still have the same size and the animation still looks like mush. The only way that I found to increase the resolution was to use fig.set_size_inches(10, 10, True), but this still doesn't improve the overall quality of the animation. It still looks bad. I saw that you can pass on codec and extra_args so maybe that is something that might help, but I have no idea how to use these because I couldn't find a list with allowed arguments.

    &#xA;&#xA;

    ffmpeg

    &#xA;&#xA;

    I can't get ffmpeg to work. I installed the python package from here and can import it into a python session but I don't know how I can get matplotlib to use that. I also got ffmpeg from here (Windows 64-bit version) and set the plt.rcParams[&#x27;animation.ffmpeg_path&#x27;] to where I saved the files (there was no intaller to run, not sure if I did it correctly). But this didn't help either. Also this is of course also third-party software, so if somebody else were to use my code/program it wouldn't work.

    &#xA;

  • hls : Save and forward avio options

    23 juillet 2015, par Luca Barbato
    hls : Save and forward avio options
    

    Make possible to send the custom headers and override the user agent.

    Reported-by : BenWonder

    • [DBH] libavformat/hls.c