Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (53)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

Sur d’autres sites (7982)

  • Java - handing file deletion

    2 janvier 2016, par QQMusic

    So I am using the youtube-dl command line program within Java with simple command line execute function and coupling it with ffmpeg to convert to mp3. Now the thing I am having trouble with it the fact that after I get the .mp4 file from youtube-dl, when I convert it into a .mp3, it will create a completely separate file.

    So the way it is now :

    1. Get `.mp4`
    2. Get `.mp3`
    3. delete `.mp4'

    The issue I am facing now is that if the user was to stop the program while it was between step 1 and step 2, then they would be left with the .mp4 file which is not wanted. So is there a way to delete certain files once the user exits the process, whether it being from safely ending the program (this one should be easy), ending the process, or closing the computer ?

  • 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

  • Building and using OpenCV as a static library with Ffmpeg

    11 octobre 2016, par Matt Hammond

    I’m trying write an OpenCV application. I’ve statically built OpenCV from source as I don’t want dll files and my project compiles as long as I don’t use cv::VideoCapture, in which case I get a link error LNK2019 unresolved external symbol.

    I think this is because the cv::VideoCapture uses ffmpeg to work with video, which, because of it’s license, cannot be statically linked in my project. I would be ok with linking the ffmpeg dynamically but I’m having trouble doing this. There is a opencv_ffmpeg310_64.dll file in the %OpenCV_DIR%\bin folder, but I’m clueless about how to dynamically link it to my project. Usually I have .lib files that come with the .dll but I can’t find them anywhere.

    Is it possible to statically link OpenCV and dynamically link ffmpeg, and how should I go about doing this ?

    Additional info :

    • Windows 10
    • Visual Studio 2015
    • OpenCV 3.1.0 x64 build