
Recherche avancée
Autres articles (90)
-
Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur
8 février 2011, parLa visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
Configuration de la boite multimédia
Dès (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Automated installation script of MediaSPIP
25 avril 2011, parTo 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 (4123)
-
How convert High bitrate mp3 to lower rate using ffmpeg in android
23 mars 2018, par Android TeamWe want to convert 320kbps mp3 file to 128kbps mp3 so currently we are using below ffmpeg command but its not working.
ffmpeg -i input.mp3 -codec:a libmp3lame -qscale:a 5 output.mp3
Result :-the output bitrate same as input mp3.
And we are following the FFmpeg Encoding guideline for that here is the link :- https://trac.ffmpeg.org/wiki/Encode/MP3
so please suggest any solution.
-
ValueError : I/O operation on closed file with ffmpeg
22 mars 2018, par AstroCodaI’m trying to get this (minimal working example) code to compile in a virtual environment on Anaconda which I’ve set up in a supercomputing cluster :
import numpy as np
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import matplotlib.animation as manimation
FFMpegWriter = manimation.writers['ffmpeg']
metadata = dict(title='Movie Test', artist='Matplotlib',
comment='Movie support!')
writer = FFMpegWriter(fps=15, metadata=metadata)
fig = plt.figure()
l, = plt.plot([], [], 'k-o')
plt.xlim(-5, 5)
plt.ylim(-5, 5)
x0, y0 = 0, 0
with writer.saving(fig, "writer_test.mp4", 100):
for i in range(100):
x0 += 0.1 * np.random.randn()
y0 += 0.1 * np.random.randn()
l.set_data(x0, y0)
writer.grab_frame()The thing is, this code works absolutely fine on my local machine (MacOSX) - Anaconda distribution ; Python 2.7 ; same matplotlib and numpy version, and I have ffmpeg on Anaconda ; I have ffmpeg on the cluster as well, albeit at a different version to the one on Python (but no issue with this on my local machine). When I run the code on the cluster, I get :
Traceback (most recent call last):
File "movie_test.py", line 25, in <module>
writer.grab_frame()
File "~/anaconda2/envs/test_movie/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/matplotlib/animation.py", line 241, in saving
self.finish()
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/matplotlib/animation.py", line 367, in finish
self.cleanup()
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/matplotlib/animation.py", line 405, in cleanup
out, err = self._proc.communicate()
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/subprocess32.py", line 927, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/subprocess32.py", line 1713, in _communicate
orig_timeout)
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/subprocess32.py", line 1769, in _communicate_with_poll
register_and_append(self.stdout, select_POLLIN_POLLPRI)
File "~/anaconda2/envs/test_movie/lib/python2.7/site-packages/subprocess32.py", line 1748, in register_and_append
poller.register(file_obj.fileno(), eventmask)
ValueError: I/O operation on closed file
</module>All the searches I’ve made correspond to relatively simple text write in/out operations, but not for videos. Thanks in advance for the help !
-
Sub-pixel rendering with imagettftext()
8 mars 2016, par user1661677I’m creating an image sequence, and encoding it to a video using PHP, GD library and ffmpeg. You’ll see I’m animating the two text layers inversely of each other, on the X axis. And with some simple operators
$i/2
and$i/3
, I’m trying to make their movement slower in the final animation.The problem I’m having is that when the video is rendered out, each layer’s text is only moving ever second, and third frame, respectively. This causes the animation to be a bit ’jerky’ and just not as smooth as Adobe After Effects with it’s ability to support sub-pixel rendering of elements.
Is there any way to get
imagettftext()
, or some other method of drawing on images to support sub-pixel rendering ?Thank you.
for ($i = 1; $i <= 125; $i++) {
// Text on Image
$front = imagecreatefromjpeg('front.jpg');
$white = imagecolorallocate($front, 255, 255, 255);
$text = 'some text';
$text2 = 'some other text';
$font = '/var/www/html/test/OpenSans-Bold.ttf';
// Add text
imagettftext($front, 60, 0, 1340-($i/2), 720, $white, $font, $text);
imagettftext($front, 35, 0, 1240+($i/3), 800, $white, $font, $text2);
// Write image to file
imagejpeg($front, "images/".$i.".jpg", 100);
}