Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (21)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les 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, par

    Pour 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, par

    PHP 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 Draw Text Like Animation

    24 juin 2019, par Zakir_SZH

    I am trying to draw text on my video using ffmpeg.

    Text is :
    "Please Wait, System Is Loading..."

    here is the code i used :

    ffmpeg -i "input.mp4" -vf drawtext="fontfile=1.ttf: \text='Please Wait, System Is Loading...': fontcolor=0x0080FF: fontsize=48: box=1: boxcolor=white@0.1: \boxborderw=5: x=(w-text_w)/2: y=(h-(text_h+25))" -codec:a copy "output.mp4"

    that worked good, but what i like is to make the text look like animated :
    So, every 0.5 second it should change to following lines and loop it :

    Please Wait, System Is Loading.

    Please Wait, System Is Loading..

    Please Wait, System Is Loading...

    Please Wait, System Is Loading...!

    i know it’s possible i just can figure out it how :(

    thanks in advance
    best regards

  • how to add multi animation for one image when create video using ffmpeg

    6 octobre 2018, par Pham Hai

    I are using ffmpeg to create video from many images.
    Example I’m using command below to create 1 video.

    Sample Command.
    ffmpeg \
     -loop 1 -t 5 -i img001.jpeg \
     -loop 1 -t 5 -i img002.jpeg \
     -loop 1 -t 5 -i img003.jpeg \
     -loop 1 -t 5 -i img004.jpeg \
     -loop 1 -t 5 -i img005.jpeg \
     -filter_complex \
    "[0:v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=t=out:st=4:d=1[v0]; \
    [1:v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v1]; \
    [2:v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v2]; \
    [3:v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v3]; \
    [4:v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v4]; \
    [v0][v1][v2][v3][v4]concat=n=5:v=1:a=0,format=yuv420p[v]" -map "[v]" out.mp4

    But I’m having a problem. For example, image001.png, I only know add single animation for this image when creating the video.

    How do I add multi animation to an image ? For example, rotate, move from top to center, then from center to right.

    Thankyou very much.

  • How do I properly enable ffmpeg for matplotlib.animation ?

    9 novembre 2018, par spanishgum

    I have covered a lot of ground on stack so far trying to get ffmpeg going so I can make a timelapse video.

    I am on a CentOS 7 machine, running python3.7.0a0.

    python3
    >>> import numpy as np
    >>> np.__version__
    '1.12.0'
    >>> import matplotlib as mpl
    >>> mpl.__version__
    '2.0.0'
    >>> import mpl_toolkits.basemap as base
    >>> base.__version__
    '1.0.7'

    I found this github gist on installing ffmpeg. I used the chromium source, and installed without a prefix option (using the default).

    I have confirmed that ffmpeg is installed, although I don’t know anything about testing whether it works.

    which ffmpeg
    /usr/local/bin/ffmpeg

    ffmpeg -version
    ffmpeg version N-83533-gada281d Copyright (c) 2000-2017 the FFmpeg dev elopers
    built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11
    configuration:
    libavutil      55. 47.100 / 55. 47.100
    libavcodec     57. 80.100 / 57. 80.100
    libavformat    57. 66.102 / 57. 66.102
    libavdevice    57.  2.100 / 57.  2.100
    libavfilter     6. 73.100 /  6. 73.100
    libswscale      4.  3.101 /  4.  3.101
    libswresample   2.  4.100 /  2.  4.100

    I tried to run a few sample examples I found online :

    [1] http://matplotlib.org/examples/animation/basic_example_writer.html

    [2] https://stackoverflow.com/a/23098090/3454650

    Everything works fine up until I try to save the animation file.

    [1]

    anim.save('basic_animation.mp4', writer = FFwriter, fps=30, extra_args=['-vcodec', 'libx264'])

    [2]

    im_ani.save('im.mp4', writer=writer)

    I found here that explictly setting the path to ffmpeg might be necessary so I added this to the top of the test scripts :

    plt.rcParams['animation.ffmpeg_path'] = '/usr/local/bin/ffmpeg'

    I tried a few more tweaks in the code but always get the same response, which I do not know how to begin deciphering :

    Traceback (most recent call last):
     File "testanim.py", line 27, in <module>
       writer.grab_frame()
     File "/usr/local/lib/python3.7/contextlib.py", line 100, in __exit__
       self.gen.throw(type, value, traceback)
     File "/usr/local/lib/python3.7/site-packages/matplotlib/animation.py", line 256, in saving
       self.finish()
     File "/usr/local/lib/python3.7/site-packages/matplotlib/animation.py", line 276, in finish
       self.cleanup()
     File "/usr/local/lib/python3.7/site-packages/matplotlib/animation.py", line 311, in cleanup
       out, err = self._proc.communicate()
     File "/usr/local/lib/python3.7/subprocess.py", line 836, in communicate
       stdout, stderr = self._communicate(input, endtime, timeout)
     File "/usr/local/lib/python3.7/subprocess.py", line 1474, in _communicate
       selector.register(self.stdout, selectors.EVENT_READ)
     File "/usr/local/lib/python3.7/selectors.py", line 351, in register
       key = super().register(fileobj, events, data)
     File "/usr/local/lib/python3.7/selectors.py", line 237, in register
       key = SelectorKey(fileobj, self._fileobj_lookup(fileobj), events, data)
     File "/usr/local/lib/python3.7/selectors.py", line 224, in _fileobj_lookup
       return _fileobj_to_fd(fileobj)
     File "/usr/local/lib/python3.7/selectors.py", line 39, in _fileobj_to_fd
       "{!r}".format(fileobj)) from None
    ValueError: Invalid file object: &lt;_io.BufferedReader name=6>
    </module>

    Is there something with my configuration that is malformed ? I searched google for this error for some time but never found anything relevant to animations / ffmpeg. Any help would be greatly appreciated.


    UPDATE :

    @LordNeckBeard pointed me here : https://trac.ffmpeg.org/wiki/CompilationGuide/Centos

    I ran into problems with installing the x264 encoding dependency. Some files in libavcodec/*.c (in the make output) were reporting undefined references to several functions. After a wild goose chase found this : https://mailman.videolan.org/pipermail/x264-devel/2015-February/010971.html

    To fix the x264 installation, I simply added some configure flags :

    ./configure --enable-static --enable-shared --extra-ldflags="-lswresample -llzma"

    UPDATE :

    So everything installed fine after fixing the libx264 problems. I went ahead and copied the ffmpeg binary from the ffmpeg_build folder into /usr/local/bin/ffmpeg.

    After running the script I was getting problems where ffmpeg could not find the libx264 shared object. I think I will have to recompile everything using different prefixes. My intuition tells me there are old files laying around after I have messed with everything, using some configuration that is broken.

    So I decided maybe I should just try to use NUX : http://linoxide.com/linux-how-to/install-ffmpeg-centos-7/
    I installed ffmpeg using the new rpm, but to no avail. I still was not able to run ffmpeg because of a missing shared object.

    Finally, instead of usiong files copied into my /usr/local/bin folder, I ran ffmpeg directly from the build bin directory. Turns out that this does work properly !

    So in essence, if I want to install ffmpeg system wide, I need to manually compile from sources again but using a nonlocal prefix.