Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (70)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (9950)

  • ffmpeg installation on macOS for MoviePy fails with SSL error

    26 juillet 2018, par shmible

    I’m trying to write a Python program that uses MoviePy on Mac OS 10.11.16 to convert an MP4 file to GIF. I use :

    import moviepy.editor as mp

    and I get an error saying I need to call imageio.plugins.ffmpeg.download() so I can download ffmpeg. I use :

    import imageio
    imageio.plugins.ffmpeg.download()

    which gives me the following error :

    Imageio: 'ffmpeg.osx' was not found on your computer; downloading it now.
    Error while fetching file: <urlopen error="error" certificate="certificate" verify="verify" failed="failed">.
    Error while fetching file: <urlopen error="error" certificate="certificate" verify="verify" failed="failed">.
    Error while fetching file: <urlopen error="error" certificate="certificate" verify="verify" failed="failed">.
    Error while fetching file: <urlopen error="error" certificate="certificate" verify="verify" failed="failed">.
    Traceback (most recent call last):
     File "", line 1, in <module>
       imageio.plugins.ffmpeg.download()
     File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/imageio/plugins/ffmpeg.py", line 55, in download
       get_remote_file('ffmpeg/' + FNAME_PER_PLATFORM[plat])
     File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/imageio/core/fetching.py", line 121, in get_remote_file
       _fetch_file(url, filename)
     File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/imageio/core/fetching.py", line 177, in _fetch_file
       os.path.basename(file_name))
    OSError: Unable to download 'ffmpeg.osx'. Perhaps there is a no internet connection? If there is, please report this problem.
    </module></urlopen></urlopen></urlopen></urlopen>

    I definitely have an internet connection. I found this link, and tried installing with Homebrew and Static builds, but neither have worked. It seems like compiling it myself would be a little too advanced for me (I’ve only briefly looked into it). I used imageio.plugins.ffmpeg.download() on IDLE. I read something about using PyCharm to run the MoviePy code, but I get the same initial error. ffmpeg is currently in my /usr/local/bin folder. Any suggestions are welcome. Thank for your help.

    Edit : I’m using Python 3.6.1

  • inotifywait -m does not process more than 1 file after long running process

    2 mai 2022, par Yllier123

    I have a script that detects files on close_write and runs an 5 minute process on them. These files are written to the directory in batches of up to 100. The issue is that inotifywait only detects the first file in the batch and does not process the subsequent files unless they are removed from the directory by hand and put back. Here is my script :

    &#xA;

    #!/bin/bash&#xA;&#xA;inotifywait -r -e close_write -e moved_to --format "%f" $TARGET -m | while read file&#xA;    do&#xA;        if [[ "$file" =~ .*mp4$ ]]; then&#xA;            echo "Detected $file"&#xA;            /usr/bin/python3 LongRunningProgram.py -i $TARGET/$file -o $PROCESSED -u $UPLOADPATH -c $C&#xA;        fi&#xA;    done&#xA;

    &#xA;

    it is maintained by a systemctl service written like so :

    &#xA;

    [Unit]&#xA;Description=Description&#xA;After=network.target&#xA;&#xA;[Service]&#xA;Type=idle&#xA;user=pi&#xA;WorkingDirectory=/home/pi&#xA;ExecStart=/bin/bash /home/pi/notify.sh OutPath C&#xA;Restart=on-failure&#xA;&#xA;[Install]&#xA;WantedBy=multi-user.target&#xA;

    &#xA;

    I am confused as to why it only seems to recognize the first file but not subsequent files when run like this, however if I replace the long running program with sleep 300 it seems to work fine.

    &#xA;

  • Record video with Xvfb + FFmpeg using Selenium in headless mode

    12 mars 2024, par ifdef14

    I am trying to record video using Selenium in headless mode. I am using Xvfb and FFmpeg bindings for Python. I've already tried :

    &#xA;

    import subprocess&#xA;import threading&#xA;import time&#xA;&#xA;from chromedriver_py import binary_path&#xA;from selenium import webdriver&#xA;from selenium.webdriver.chrome.service import Service&#xA;from xvfbwrapper import Xvfb&#xA;&#xA;&#xA;def record_video(xvfb_width, xvfb_height, xvfb_screen_num):&#xA;    subprocess.call(&#xA;        [&#xA;            &#x27;ffmpeg&#x27;,&#xA;            &#x27;-f&#x27;,&#xA;            &#x27;x11grab&#x27;,&#xA;            &#x27;-video_size&#x27;,&#xA;            f&#x27;{xvfb_width}x{xvfb_height}&#x27;,&#xA;            &#x27;-i&#x27;,&#xA;            xvfb_screen_num,&#xA;            &#x27;-codec:v&#x27;,&#xA;            &#x27;libx264&#x27;,&#xA;            &#x27;-r&#x27;,&#xA;            &#x27;12&#x27;,&#xA;            &#x27;videos/video.mp4&#x27;,&#xA;        ]&#xA;    )&#xA;&#xA;&#xA;with Xvfb() as xvfb:&#xA;    &#x27;&#x27;&#x27;&#xA;    xvfb.xvfb_cmd[1]) returns scren num&#xA;    :217295622&#xA;    :319294854&#xA;    :&#xA;    &#x27;&#x27;&#x27;&#xA;    xvfb_width, xvfb_height, xvfb_screen_num = xvfb.width, xvfb.height, xvfb.xvfb_cmd[1]&#xA;    thread = threading.Thread(target=record_video, args=(xvfb_width, xvfb_height, xvfb_screen_num))&#xA;    thread.start()&#xA;    opts = webdriver.ChromeOptions()&#xA;    opts.add_argument(&#x27;--headless&#x27;)&#xA;    try:&#xA;        driver = webdriver.Chrome(service=Service(executable_path=binary_path), options=opts)&#xA;    finally:&#xA;        driver.close()&#xA;        driver.quit()&#xA;&#xA;

    &#xA;

    As much as I understand xvfb.xvfb_cmd[1] returns an information about virtual display isn't it ? When I executed this script, I got the error message :

    &#xA;

    [x11grab @ 0x5e039cfe2280] Failed to query xcb pointer0.00 bitrate=N/A speed=N/A    &#xA;:1379911620: Generic error in an external library&#xA;

    &#xA;

    I also tried to use the following commands :

    &#xA;

    xvfb-run --listen-tcp --server-num 1 --auth-file /tmp/xvfb.auth -s "-ac -screen 0 1920x1080x24" python main.py &amp;

    &#xA;

    ffmpeg -f x11grab -video_size 1920x1080 -i :1 -codec:v libx264 -r 12 videos/video.mp4

    &#xA;

    In the commands above, there are used xvfb-run --server-num 1 and ffmpeg -i :1, why ?

    &#xA;

    Overall, when Selenium is running in the headless mode what's going on behind the scenes ? Is it using virtual display ? If yes, how can I detect display id of this, etc. Am I on the right path ?

    &#xA;

    I am not using Docker or any kind of virtualization. All kind of tests are running on my local Ubuntu machine.

    &#xA;