
Recherche avancée
Autres articles (21)
-
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes 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, parPour 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, parPHP 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 (4032)
-
ffmpeg not giving correct duration of a mp4
1er juin 2012, par oachI am working with ffmpeg to convert videos into flv files via php. The tests I have done do not work for mp4 conversions. I have a 13 second video (videos will be limited to 15 seconds), when it is uploaded and I check the "duration" of the video it comes out over 300 seconds. I have tried changing around how I process the video :
// original
exec('ffmpeg -i <path>/<filename> 2>&1', $output);
// current
exec('ffmpeg -i <path>/<filename> 2>&1 | grep "Duration" | cut -d \' \' -f 4 | sed s/,//', $output);
</filename></path></filename></path>The original method did not work for mpg files but the second does, but neither gives me the "correct" duration of a mp4 video. Is there a "special" way to process mp4 files ?
Thank you for your time and help.
Update :
Command line
ffmpeg -i ./custom_scraping.mp4 2>&1 | grep "Duration" | cut -d ' ' -f 4 | sed s/,//
00:05:15.84Complete output (formatted as best I could)
ffmpeg -i ./custom_scraping.mp4 2>&1
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 29 2012 23:55:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Seems stream 1 codec frame rate differs from container frame rate: 5994.00 (5994/1) -> 29.97 (2997/100)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './custom_scraping.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1
Duration: 00:05:15.84, start: 0.000000, bitrate: 36 kb/s
Stream #0.0(eng): Audio: aac, 44100 Hz, stereo, s16, 2 kb/s
Stream #0.1(eng): Video: h264, yuv420p, 480x360, 36 kb/s, 1.04 fps, 29.97 tbr, 2997 tbn, 5994 tbcAt least one output file must be specified
Don't know if it helps but from the listing of the file in Linux :
1432471 May 31 13:33 custom_scraping.mp4Let me know if anything else is needed.
-
How to set ffmpeg for matplotlib in mac os x
1er juillet 2023, par AlexNoirI want to animate some plots with matplotlib. The version I have is the Enthough Canopy distribution (Version : 1.1.0.1371), running in a mac os x 10.8 (Mountain Lion). I have used the FuncAnimation routine from the animation package of matplotlib. My problem comes saving the animation. I want to save in mp4 format :



anim.save('test.mp4',fps=30)




The error I get is :



UserWarning: MovieWriter ffmpeg unavailable 
warnings.warn("MovieWriter %s unavailable" % writer)




So I installed ffmpeg via Macports. But I am still having the same error. Do you know how to setup matplotlib in order to recognise ffmpeg ? Do I have to change the matplotlibrc file ?
Thanks.



EDIT : I have realized that I can manually put '/opt/local/bin' in the PYTHONPATH, but it does not change the PATH in Enthough Canopy. Do anyone know how to change the PATH in canopy ?


-
How to set ffmpeg for matplotlib in mac os x
4 février 2014, par AlexNoirI want to animate some plots with matplotlib. The version I have is the Enthough Canopy distribution (Version : 1.1.0.1371), running in a mac os x 10.8 (Mountain Lion). I have used the FuncAnimation routine from the animation package of matplotlib. My problem comes saving the animation. I want to save in mp4 format :
anim.save('test.mp4',fps=30)
The error I get is :
UserWarning: MovieWriter ffmpeg unavailable
warnings.warn("MovieWriter %s unavailable" % writer)So I installed ffmpeg via Macports. But I am still having the same error. Do you know how to setup matplotlib in order to recognise ffmpeg ? Do I have to change the matplotlibrc file ?
Thanks.EDIT : I have realized that I can manually put '/opt/local/bin' in the PYTHONPATH, but it does not change the PATH in Enthough Canopy. Do anyone know how to change the PATH in canopy ?