Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (99)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

Sur d’autres sites (6287)

  • Speedup matplotlib animation to video file

    20 mai 2022, par gaggio

    On Raspbian (Raspberry Pi 2), the following minimal example stripped from my script correctly produces an mp4 file :

    



    import numpy as np
import matplotlib.pyplot as plt
from matplotlib import animation

def anim_lift(x, y):

    #set up the figure
    fig = plt.figure(figsize=(15, 9))

    def animate(i):
        # update plot
        pointplot.set_data(x[i], y[i])

        return  pointplot

    # First frame
    ax0 = plt.plot(x,y)
    pointplot, = ax0.plot(x[0], y[0], 'or')

    anim = animation.FuncAnimation(fig, animate, repeat = False,
                                   frames=range(1,len(x)), 
                                   interval=200,
                                   blit=True, repeat_delay=1000)

    anim.save('out.mp4')
    plt.close(fig)

# Number of frames
nframes = 200

# Generate data
x = np.linspace(0, 100, num=nframes)
y = np.random.random_sample(np.size(x))

anim_lift(x, y)


    



    Now, the file is produced with good quality and pretty small file size, but it takes 15 minutes to produce a 170 frames movie, which is not acceptable for my application. i'm looking for a significant speedup, video file size increase is not a problem.

    



    I believe the bottleneck in the video production is in the temporary saving of the frames in png format. During processing I can see the png files apprearing in my working directory, with the CPU load at 25% only.

    



    Please suggest a solution, that might also be based on a different package rather than simply matplotlib.animation, like OpenCV (which is anyway already imported in my project) or moviepy.

    



    Versions in use :

    



      

    • python 2.7.3
    • 


    • matplotlib 1.1.1rc2
    • 


    • ffmpeg 0.8.17-6:0.8.17-1+rpi1
    • 


    


  • If conditions in a loop breaking ffmpeg zoom command

    6 mai 2017, par Sulli

    I have built a bash script where I am trying to zoom in an image with ffmpeg, for 10s :

    ffmpeg -r 25 -i image0.jpg -filter_complex "scale=-2:10*ih,zoompan=z='min(zoom+0.0015,1.5)':d=250:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)',scale=-2:720"  -y -shortest -c:v libx264 -pix_fmt yuv420p temp_1.mp4

    This command is included in a while loop, with two "if" conditions at the beginning of the loop :

    first=1017
    i=0
    while read status author mySource myFormat urlIllustration credit shot_id originalShot categories title_EN length_title_EN text_EN tags_EN title_FR length_title_FR text_FR tags_FR title_BR length_title_BR text_BR tags_BR; do

       if [ $myFormat != "diaporama" ]; then
           let "i = i + 1"
           continue
       fi

       if [ "$shot_id" -lt "$first" ]; then
           let "i = i + 1"
           continue
       fi

       rm temp_1.mp4
       ffmpeg -r 25 -i image0.jpg -filter_complex "scale=-2:10*ih,zoompan=z='min(zoom+0.0015,1.5)':d=250:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)',scale=-2:720"  -y -shortest -c:v libx264 -pix_fmt yuv420p temp_1.mp4


       let "i = i + 1"
    done <../data.tsv
    echo "All done."

    (I have removed stuff in the loop, this is the minimal code that is able to capture the problem).

    Now the weird bug : if I run this code like that, the video I am trying to generate will not be 10s long, only 1-2s long. ffmpeg exits with error "[out_0_0 @ 0x2fa4c00] 100 buffers queued in out_0_0, something may be wrong."

    Now if I remove one of the "if" conditions at the beginning of my loop (the first or the second, it doesn’t matter), the video will be generated fine and be 10s long.

    What could be the cause of this problem ?

  • avfilter/af_afir : adjust min partition size

    5 janvier 2019, par Paul B Mahol
    avfilter/af_afir : adjust min partition size
    

    Minimal value allowed by our FFT is 16 thus min partition size is 8.

    • [DH] doc/filters.texi
    • [DH] libavfilter/af_afir.c