Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

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

Autres articles (49)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • 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 (6252)

  • ffmpeg tile screenshot file with uniform distribution over video length

    23 octobre 2017, par Michael Yousef

    I’m trying to take a video and create a screenshot file for it. I want it to cover the entire duration of the video and be uniformly distributed over the video. I have a command right now that I found online, it can produce a screenshot file, but it doesn’t cover the entire duration

    ffmpeg -ss 00:05:00 -i video.mp4 -frames 1 -vf "select=not(mod(n\,8000)),scale=320:240,tile=4x8" out.png

    Instead of having it cap every 80 seconds, I want it to determine what the duration is use that. It should cap the first screen at my initial offset, then however far ahead as necessary.

    Also, if anyone knows how to add information to the outputted file at the top, like filename, duration, bitrate, etc., that’s also something I want to output.

  • Matplotlib : Live animation works fine but displays a blank plot when being saved

    18 juillet 2017, par Loïc Poncin

    I made a little forest fire animation. My code is at the end of the question.

    Here is some information before I ask my question :

    • No tree : forest[i,j] = 0
    • A tree : forest[i,j] = 1
    • A tree on fire : forest[i,j] = 2

    Basically what happens is that constructforest creates a 2 dimensional array called forest of size n by m with a probability of tree occupancy called p. After that setonfire sets on fire the forest and while the forest can burn spreadfire spread the fire.

    When I run forestfire with the Python prompt or the IPython prompt I get a nice animation but when I go check the video file that I saved I only see a blank plot.

    I did some research, I found many questions about this issue but none of the advice I read was helpful :

    Can someone tell me what is going on please ?

    forestfire.py

    from random import random

    import numpy as np

    import matplotlib.pylab as plt
    import matplotlib.colors as mcolors
    import matplotlib.animation as animation


    def hazard(p):
       r=random()
       assert p>=0 and p<=1
       return r <= p


    def constructforest(n,m,p):
       forest = np.zeros((n,n))
       for i in xrange(n):
           for j in xrange(m):
               if hazard(p):
                   forest[i,j] = 1
       return forest


    def setfire(forest,i,j):
       forest[i,j] = 2
       return forest


    def spreadfire(forest):    

       n,m=forest.shape
       c = np.copy(forest)

       for i in xrange(n):
           for j in xrange(m):

               if c[i,j] == 1:

                   Y, X = xrange(max(0,i-1),min(n,i+2)), xrange(max(0,j-1),min(m,j+2))

                   for y in Y:
                       for x in X:

                           if c[y,x] == 2:
                               forest[i,j] = 2                        
       return forest


    def canburn(forest):    

       n,m=forest.shape
       c = np.copy(forest)

       for i in xrange(n):
           for j in xrange(m):

               if c[i,j] == 1:

                   Y, X = xrange(max(0,i-1),min(n,i+2)), xrange(max(0,j-1),min(m,j+2))

                   for y in Y:
                       for x in X:

                           if c[y,x] == 2:
                               return True                      
       return False


    def forestfire(forest):

       fig, ax = plt.subplots()

       movie = []    

       # Colormap
       red, green, blue = [(1,0,0,1)], [(0,1,0,1)], [(0,0,1,1)]  

       colors = np.vstack((blue, green, red))
       mycmap = mcolors.LinearSegmentedColormap.from_list('my_colormap', colors)

       # Initialization
       k = 0

       forest = spreadfire(forest)

       im = plt.imshow(forest, animated=True, cmap = mycmap, interpolation="none", origin='lower')
       movie.append([im])

       # Fire propagation
       while canburn(forest):
           k += 1
           print k

           forest = spreadfire(forest)

           im = plt.imshow(forest, animated=True, cmap = mycmap, interpolation="none", origin='lower')
           movie.append([im])

       return animation.ArtistAnimation(fig, movie, blit=True, repeat_delay=100)



    ani = forestfire(setfire(constructforest(101,101,0.4),50,50))

    ani.save("forestfire_test.mp4", writer = 'ffmpeg', fps=5, dpi=500)

    EDIT

    As requested by @Y.Luo by @ImportanceOfBeingErnest in the comments I downgraded matplotlib to 2.0.0 and I changed the framerate of the animation but forestfire_test.mp4 still displays a blank plot.

    Here are my settings :
    enter image description here
    enter image description here

  • Cannot rotate / transcode video with any tool

    14 juin 2019, par hyperapps19

    I have a video captured from Android Virtual Device (Android Emulator). Its format is WebM. I need to rotate it 90 degrees counterclockwise. But I can’t do this : I have tried FFMpeg - it drops ALL frames except 1-2, several online converters - no result. Then, I"ve tried to encode this video to H.264... no result. Whole video is black (there can be 1-2 frames, again). How can I rotate or reencode this video ?

    Video : https://dropmefiles.com/nhy0H (untitled.webm - video needs to be rotated ; out_example.webm - output video from FFMpeg).