Recherche avancée

Médias (91)

Autres articles (44)

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (8751)

  • Running subprocess.Popen in a compiled script has a significant delay

    6 mai 2022, par thisismy-stackoverflow

    Edit : In this specific example, Python 3.8 is being used on Windows 10.

    


    I need to run FFprobe through subprocess.Popen so I can capture and parse the output. If I do this in a script, it runs almost instantly, but if I compile my script with PyInstaller and do the same thing, it takes over 0.8 seconds to complete. Is there a trick or any way I can execute it faster from the compiled script ? I'm willing to hear FFprobe-specific answers if they exist.

    


    This is what I'm using currently. The extra code is for ensuring FFprobe doesn't flash a console window while running (removing the console window actually made it 0.1 seconds faster on average).

    


    startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
p = subprocess.Popen(f'ffprobe -show_format -show_streams -of json "{file}"', startupinfo=startupinfo, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()


    


  • Running matplotlib animation on Mac using Spyder : says to install ffmpeg

    28 avril 2017, par Addem

    I installed Anaconda on a new Mac, made a simple animation with matplotlib like

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

    fig = plt.figure()
    ax = plt.axes(xlim=(0, 2), ylim=(-2, 2))
    line, = ax.plot([], [], lw=2)

    def init():
       line.set_data([], [])
       return line,

    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,

    anim = animation.FuncAnimation(fig, animate, init_func=init,
                                  frames=200, interval=20, blit=True)


    anim.save('basic_animation.mp4', fps=30, extra_args=['-vcodec', 'libx264'])

    plt.show()

    When I run it, it tells me to install ffmpeg. I tried using these instructions : http://stephenjungels.com/jungels.net/articles/ffmpeg-howto.html But the instructions were unclear about what I was supposed to download, especially when it got to the part about a "patch". This also just feels insanely complicated for something that seems like it should be much simpler. I also tried following some instructions for installing ffmpeg using Homebrew but the instructions were again poorly written so that some of the buttons it said should be there weren’t. I tried to figure it out by guessing what I should do, and it seemed to work but with a lot of warning messages. By the end of the process, when I type into a terminal

    which ffmpeg

    it returns /usr/local/bin/ffmpeg. However, even after restarting Spyder and re-running the code, it still tells me to install ffmpeg. I also navigated to /usr/local/bin and it doesn’t have a folder ffmpeg. So my guess is that ffmpeg didn’t install.

    I read in the matplotlib documentation that Anaconda doesn’t give a build for Python that is appropriate, something about a "framework" build (http://matplotlib.org/faq/osx_framework.html). But it says that in Anaconda you can install it easily by running conda install python.app which I did and it worked. It then says to use pythonw rather than python. I’m not really sure what this means, because in Spyder I don’t run scripts from the terminal. I tried navigating to the file anyway and running it with

    pythonw anim.py

    and it mysteriously gave me an I/O error.

    Do I really need to install ffmpeg or is there some simpler fix ?

    If I do need to install ffmpeg, where get I get up-to-date instructions that make the process clear ?

  • C# app - running FFMpeg from the command line is not working

    11 avril 2017, par Dan Kahn

    I’m trying to run FFMpeg from the Command Line in C#. Previously I was running it from "CMD.exe" and it was working, but that requires a local installation of ffmpeg with configuring my System environmental variables. So I wanted to run it directly from "ffmpeg.exe". I’m using the following code (all the paths are correct), and nothing happens :

    string programToRun = "C:\\Users\\dkahn\\Documents\\PlaybackTool\\PlaybackTool\\Desktop\\Source\\Player\\Player\\ffmpeg\\ffmpeg.exe";

    string directoryName = "C:\\Users\\dkahn\\Documents\\PlaybackTool\\PlaybackTool\\Desktop\\Source\\Player\\test\\test1-1.mp4";

    string command = "@ffmpeg -i test1-1.mp4 -r 1  -s 180x101 test1-1\\output_%04d.png";

    Process cmd = new Process();
    cmd.StartInfo.FileName = programToRun;
    cmd.StartInfo.RedirectStandardInput = true;
    cmd.StartInfo.RedirectStandardOutput = true;
    cmd.StartInfo.CreateNoWindow = true;
    cmd.StartInfo.UseShellExecute = false;
    cmd.StartInfo.WorkingDirectory = directoryName;
    cmd.Start();
    cmd.StandardInput.WriteLine(command);
    cmd.StandardInput.Flush();
    cmd.StandardInput.Close();
    cmd.WaitForExit();

    Does anybody have any insight ?