Recherche avancée

Médias (0)

Mot : - Tags -/interaction

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (44)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (7722)

  • Scaling YUV420P with libswscale - getting gray image out

    3 mai 2013, par spartygw

    I've got a basic understanding of the format of YUV420p data. I understand it's in planes and that the Y data is basically black & white luma and should be width*height pixels in length.

    The U and V planes I believe to be width*height/4 in size for each plane.

    So with all that knowledge, I'm trying to scale a yuv420p imag using libswscale. The output image is gray, like I'm missing the U and V planes.

    Here's what I'm doing :

     int src_stride[3] = {0, 0, 0};
     src_stride[0] = mInputWidth;
     src_stride[1] = mInputWidth / 4;
     src_stride[2] = mInputWidth / 4;


     const uint8_t *input_planes[3];
     input_planes[0] = input.GetData(); // returns pointer to image data
     input_planes[1] = input_planes[0] + (mInputWidth * mInputHeight);
     input_planes[2] = input_planes[0] + (mInputWidth * mInputHeight) + (mInputWidth * mInputHeight / 4);


     int scale_rc = sws_scale(mSwsEncodeContext, input_planes,
                          src_stride, 0, mInputHeight, mEncodeAvFrame->data,
                          mEncodeAvFrame->linesize);

    Any idea if I'm botching the src_stride or the input_planes ?

  • sh file imagemagick modification

    16 avril 2013, par Love

    I have an .sh script that generate thumbnail sprites' images from video. The below codes in the script will output the image similar this : http://s1-www.ltvimg.com/cdn/farfuture/7NO-FuBvaWJK_v34cJrAmHi6L3ywPn1YtImQNzXgTic/mtime:1362848979/sites/default/files/tooltipthumbs-sprite.jpg

    For now, the dimension of each thumbnail is 108x60, maximum 25 thumbnails(5x5) per image and per image dimension is 540x300. The thumbnail is capture every second of the video, which mean if i have a 75 seconds of video, it will output 75 thumbnails with 3 images.

    What i need now, i want the script generate only 1 image per video. Which mean 75 thumbnails all in 1 image. What i need to change on the below codes to make this works ?

    mogrify -verbose -resize 108x60 -gravity center -quality 100 -background black
    -extent 108x60 MONTAGE*.png

    numimages=`ls -1 *.png | wc -l | cut -d " " -f1`

    montage -verbose MONTAGE*.png -geometry +0+0 -tile 5x5 -quality 100 -background
    black "$basename"-%04d.jpg

    mogrify -verbose -resize 540x300 -gravity north -extent 540x300 -quality 100
    -background black "$basename"-*.jpg
  • Saving scatterplot animations with matplotlib produces blank video file

    1er avril 2013, par user2175850

    I am having a very similar problem to this question

    but the suggested solution doesn't work for me.

    I have set up an animated scatter plot using the matplotlib animation module. This works fine when it is displaying live. I would like to save it to an avi file or something similar. The code I have written to do this does not error out but the video it produces just shows a blank set of axes or a black screen. I've done several checks and the data is being run and figure updated it's just not getting saved to video...

    I tried removing "animated=True" and "blit=True" as suggested in this question but that did not fix the problem.

    I have placed the relevant code below but can provide more if necessary. Could anyone suggest what I should do to get this working ?

    def initAnimation(self):
           rs, cfgs = next(self.jumpingDataStreamIterator)    
           #self.scat = self.axAnimation.scatter(rs[0], rs[1], c=cfgs[0], marker='o')
           self.scat = self.axAnimation.scatter(rs[0], rs[1], c=cfgs[0], marker='o', animated=True)
           return self.scat,


    def updateAnimation(self, i):
       """Update the scatter plot."""
       rs, cfgs = next(self.jumpingDataStreamIterator)
       # Set x and y data...
       self.scat.set_offsets(rs[:2,].transpose())
       #self.scat = self.axAnimation.scatter(rs[0], rs[1], c=cfgs[0], animated=True)
       # Set sizes...
       #self.scat._sizes = 300 * abs(data[2])**1.5 + 100
       # Set colors..
       #self.scat.set_array(cfgs[0])
       # We need to return the updated artist for FuncAnimation to draw..
       # Note that it expects a sequence of artists, thus the trailing comma.
       matplotlib.pyplot.draw()
       return self.scat,

    def animate2d(self, steps=None, showEvery=50, size = 25):
       self.figAnimation, self.axAnimation = matplotlib.pyplot.subplots()
       self.axAnimation.set_aspect("equal")
       self.axAnimation.axis([-size, size, -size, size])
       self.jumpingDataStreamIterator = self.jumpingDataStream(showEvery)

       self.univeseAnimation = matplotlib.animation.FuncAnimation(self.figAnimation,
                               self.updateAnimation, init_func=self.initAnimation,
                               blit=True)
       matplotlib.pyplot.show()

    def animate2dVideo(self,fileName=None, steps=10000, showEvery=50, size=25):
       self.figAnimation, self.axAnimation = matplotlib.pyplot.subplots()
       self.axAnimation.set_aspect("equal")
       self.axAnimation.axis([-size, size, -size, size])
       self.Writer = matplotlib.animation.writers['ffmpeg']
       self.writer = self.Writer(fps=1, metadata=dict(artist='Universe Simulation'))
       self.jumpingDataStreamIterator = self.jumpingDataStream(showEvery)

       self.universeAnimation = matplotlib.animation.FuncAnimation(self.figAnimation,
                               self.updateAnimation, scipy.arange(1, 25), init_func=self.initAnimation)

       self.universeAnimation.save('C:/universeAnimation.mp4', writer = self.writer)