Recherche avancée

Médias (1)

Mot : - Tags -/publicité

Autres articles (107)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (9968)

  • how to stop a function from a button in tkinter

    11 mars 2020, par Cb9867

    I am trying to record audio from microphone in python with the help of ffmpeg.

    By using this i am able to record voice but how can i stop this function by clicking of a button.

    to stop this now i am terminating the IDLE forcefully.

    import os
    import subprocess
    import tkinter as tk
    from tkinter import *
    root = Tk()
    os.chdir('C://Users/ravir/desktop/')
    def recording_voice():
     global p
     p=subprocess.Popen('ffmpeg -f dshow -i audio="Microphone (2- High Definition Audio Device)" sample.mp3' )

    def stop_rec():  # ho to stop this ???
       p.terminate()

    rec_btn = Button(text='Start Recording', width=20, command=recording_voice)
    rec_btn.pack()

    stop_btn = Button(text='Stop Recording', width=20, command=stop_rec)
    stop_btn.pack()

    root.mainloop()
  • vp9lpf/x86 : save one register in loopfilter surface coverage.

    20 décembre 2014, par Ronald S. Bultje
    vp9lpf/x86 : save one register in loopfilter surface coverage.
    

    Signed-off-by : Anton Khirnov <anton@khirnov.net>

    • [DBH] libavcodec/x86/vp9lpf.asm
  • Although ffmpeg installed, unable to save mp4 file on disk

    2 janvier 2020, par yannis

    Although I have installed ffmpeg, matplotlib reports that MovieWriter ffmpeg is unavailable and the MP4 file created is empty.

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

    # First set up the figure, the axis, and the plot element we want to animate
    fig = plt.figure()
    ax = plt.axes(xlim=(0, 2), ylim=(-2, 2))
    line, = ax.plot([], [], lw=2)

    # initialization function: plot the background of each frame
    def init():
       line.set_data([], [])
       return line,

    # animation function.  This is called sequentially
    def animate(i):
       x = np.linspace(0, 2, 1000)
       y = np.sin(2 * np.pi * (x - 0.01 * i))
       line.set_data(x, y)
       return line,

    # call the animator.  blit=True means only re-draw the parts that have changed.
    anim = animation.FuncAnimation(fig, animate, init_func=init,
                                  frames=200, interval=20, blit=True)

    # save the animation as an mp4.  This requires ffmpeg or mencoder to be
    # installed.  The extra_args ensure that the x264 codec is used, so that
    # the video can be embedded in html5.  You may need to adjust this for
    # your system: for more information, see
    # http://matplotlib.sourceforge.net/api/animation_api.html
    anim.save('basic_animation.mp4', fps=30, extra_args=['-vcodec', 'libx264'])

    plt.show()

    I have even added the line plt.switch_backend('TkAgg') proposed in another post, nothing changed. Here is my matplotlib :

    Name: matplotlib
    Version: 2.1.0
    Summary: Python plotting package
    Home-page: http://matplotlib.org

    my ffmpeg :

    Name: ffmpeg
    Version: 1.4
    Summary: ffmpeg python package url [https://github.com/jiashaokun/ffmpeg]
    Home-page: https://github.com/jiashaokun/ffmpeg

    and my Python version :

    Python 3.6.5

    The error I get is :

    /usr/local/lib/python3.6/site-packages/matplotlib/animation.py:1218: UserWarning: MovieWriter ffmpeg unavailable
     warnings.warn("MovieWriter %s unavailable" % writer)

    This error has been reported many times on stackoverflow, each time the solution is either to install ffmpeg (mine is installed) or to add that extra line about the backend, which hasn’t changed anything for me.

    Curiously enough the plt.show()command works and I do preview an animation, but the only file format to save it is (nonanimated) PNG.