
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (39)
-
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...) -
Configuration spécifique d’Apache
4 février 2011, parModules spécifiques
Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
Création d’un (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)
Sur d’autres sites (6886)
-
FFMPEG and Matplotlib for animations - strange outputs ?
27 juin 2020, par user13132640I'm trying to create animations using FFMPEG and matplotlib. Using the below code, I am creating the FFMpeg writer, and then using a loop, writing a series of graphs to the animation. However, the outputs I'm getting are very strange ; sometimes, when I watch the .mp4 file, the first 5 seconds are blank, then the video "ends" (the playback time on my media player says that it's complete), and at that point, my animation shows up. Other times, some frames are missing or skipped. I've tried searching around, but frankly I haven't found anyone with similar issues.


I just installed the latest version of FFMpeg today.


FFMpegWriter = manimation.writers['ffmpeg']
metadata = dict(title='Animation test', artist='name')
writer = FFMpegWriter(fps=1, metadata=metadata) # 1 frames per second, each year is 1 second



Then, the plotting part...(I've excluded the code where I setup the fig, ax etc.)


with writer.saving(fig, "animation.mp4", dpi=200):
 year = "2005"
 for i in range(4):

 d1_plot = d1[d1['Year'].str.contains(year, na=False)]
 ax.scatter(d1_plot["Lat"], d1_plot["Long"], c='g', s=d1_plot["Size"], transform=ccrs.PlateCarree())
 ax.set_title(year)
 writer.grab_frame()
 year = str(int(year)+1)



-
avcodec/dstdec : Replace AC overread check by sample rate check
1er juillet 2020, par Michael Niedermayeravcodec/dstdec : Replace AC overread check by sample rate check
Real files do skip coding 0 bits at the end, thus this kind of check
does not work reliable.Fixes : Ticket 8770
Fixes : dst-256fs44-6ch-refdstencoder.dffThe samplerate is specified in ISO/IEC 14496-3:2005(E) as one of 3 fixed
values, this also can be used to limit the duration and avoid the timeoutThis reverts commit f6df99dba1ae64b05d08fba8160d13eb9795042f.
-
PHP ffmpeg convert GIF to MP4
17 août 2020, par Eduard UnruhI use this code to convert GIFs to MP4 :


$videoname = str_replace('.gif', '.mp4', $picname);
$ffmpeg = FFMpeg\FFMpeg::create(array(
 'ffmpeg.binaries' => 'ffmpeg/bin/ffmpeg.exe',
 'ffprobe.binaries' => 'ffmpeg/bin/ffprobe.exe',
 'timeout' => 6600, // The timeout for the underlying process
 'ffmpeg.threads' => 12, // The number of threads that FFMpeg should use
), $logger);

$video = $ffmpeg->open('memes/' . $folder . '/' . $picname);

$format = new \FFMpeg\Format\Video\X264('libvo_aacenc', 'libx264');
$format->setAdditionalParameters(array('-profile:v', 'baseline', '-pix_fmt', 'yuv420p'));

$video
 ->save($format, 'memes/' . $folder . '/' . $videoname);



Some GIFs are getting converted but some not, this is the error message :


[16-Aug-2020 14:47:21 Europe/Berlin] PHP Fatal error: Uncaught Alchemy\BinaryDriver\Exception\ExecutionFailureException: ffmpeg failed to execute command "ffmpeg/bin/ffmpeg.exe" -y -i "memes/38/Dr5W6yzR_gif_38.gif" -threads 12 -vcodec libx264 -acodec libvo_aacenc -b:v 1000k -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -profile:v baseline -pix_fmt yuv420p -pass 1 -passlogfile "C:\Windows\TEMP\ffmpeg-passes5f392ad8ba750qewzr/pass-5f392ad8bb9b7" "memes/38/Dr5W6yzR_gif_38.mp4":

Error Output:

 ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9.2.1 (GCC) 20200122
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --e in C:\Inetpub\vhosts\yolol.de\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Media\AbstractVideo.php on line 106



What is all this crap ?


Please help !


EDIT :


This is what I'm getting when running this code in cmd :


ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9.2.1 (GCC) 20200122
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Input #0, gif, from 'C://ttt.gif':
 Duration: 00:00:03.08, start: 0.000000, bitrate: 10411 kb/s
 Stream #0:0: Video: gif, bgra, 636x357, 14.25 fps, 14.29 tbr, 100 tbn, 100 tbc
Stream mapping:
 Stream #0:0 -> #0:0 (gif (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0000021dca771a40] height not divisible by 2 (636x357)
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!



So the error is
height not divisible by 2 (636x357)
I guess, but what would be the solution ?