Recherche avancée

Médias (91)

Autres articles (88)

  • 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

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (11320)

  • dca : factorize scaling in inverse ADPCM

    21 février 2014, par Janne Grunau
    dca : factorize scaling in inverse ADPCM
    

    Based on a patch from Christophe Gisquet.

    Unrolling of the m == 0 case avoids a possible use of the uninitilized
    value sum when s->predictor_history is not set. I failed to find a
    sample for it. It also reduced the cycle count from 220 to 150 on
    sandy bridge, x86_64 linux, gcc 4.8.2 compared to his patch.

    • [DH] libavcodec/dcadec.c
  • 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 :

    


    import subprocess
import threading
import time

from chromedriver_py import binary_path
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from xvfbwrapper import Xvfb


def record_video(xvfb_width, xvfb_height, xvfb_screen_num):
    subprocess.call(
        [
            'ffmpeg',
            '-f',
            'x11grab',
            '-video_size',
            f'{xvfb_width}x{xvfb_height}',
            '-i',
            xvfb_screen_num,
            '-codec:v',
            'libx264',
            '-r',
            '12',
            'videos/video.mp4',
        ]
    )


with Xvfb() as xvfb:
    '''
    xvfb.xvfb_cmd[1]) returns scren num
    :217295622
    :319294854
    :
    '''
    xvfb_width, xvfb_height, xvfb_screen_num = xvfb.width, xvfb.height, xvfb.xvfb_cmd[1]
    thread = threading.Thread(target=record_video, args=(xvfb_width, xvfb_height, xvfb_screen_num))
    thread.start()
    opts = webdriver.ChromeOptions()
    opts.add_argument('--headless')
    try:
        driver = webdriver.Chrome(service=Service(executable_path=binary_path), options=opts)
    finally:
        driver.close()
        driver.quit()



    


    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 :

    


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


    


    I also tried to use the following commands :

    


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

    


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

    


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

    


    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 ?

    


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

    


  • 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 :

    


    #!/bin/bash

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


    


    it is maintained by a systemctl service written like so :

    


    [Unit]
Description=Description
After=network.target

[Service]
Type=idle
user=pi
WorkingDirectory=/home/pi
ExecStart=/bin/bash /home/pi/notify.sh OutPath C
Restart=on-failure

[Install]
WantedBy=multi-user.target


    


    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.