Recherche avancée

Médias (0)

Mot : - Tags -/content

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (32)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

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

  • 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 (4675)

  • I am trying to save frames from a webcam via Python and ffmpeg, but the video becomes way to fast

    10 mai 2022, par Matthias

    I get a stream of cv2 images from my webcam and want to save it to a video file. After playing a bit with cv2.VideoWriter() it turned out that using ffmpeg would provide more options and - apparently, following a few threads here on SO - lead to better results. So I gave the VidGear Python library a try, and it seems to work fine.

    


    There is one catch though : My webcam provides a variable framerate, most of the time between 10 and 30 FPS. When saving these frames the video file becomes way too fast, like watching in fast-forward. One real-time minute becomes only a few seconds in the video.

    


    I tried to play with various combinations of the ffmpeg's -framerate and/or -r parameters, but without luck. Here is the command I am using right now :

    


    ffmpeg -y -f rawvideo -vcodec rawvideo -s 1920x1080 -pix_fmt bgra -framerate 25.0 -i - -vcodec libx265 -crf 25 -r 25 -preset fast 


    


    For the records, I am creating the WriteGear class from the VidGear library like this :

    


    video_params = {
    "-vcodec": "libx265",
    "-crf": 25,
    "-input_framerate": 25,
    "-r": 25,
}
WriteGear(output_filename=video_file, logging=True, **video_params)


    


    Any ideas what I am doing wrong here and how I need to call ffmpeg ?

    


  • Free music recognition API

    12 mars 2014, par AmirH

    I'm developing an application to recognize the music played by speakers. It records 32 seconds of the sound played and send a request via an API of music recognition. So far I used Echonest. But my api_key has been banned because of to many requests since I published my freeware, used by more than 200 users.

    So I looked for MusicBrainz but it needs the exact duration of the entire song to receive a acceptable response, duration that my application can't guess.

    So I'm looking for a free music recognition API so my freeware works. Do you know one ?

    Note : I used Echonest by :

    I tried to use MusicBrainz by :

    • capturing 32 seconds with ffmpeg
    • generating the fingerprint using Chromaprint with this command :

      fpcalc sound.mp3 > fingerprint.txt

    • sending this command via cURL :

      curl -F "client=XXX" -F "meta=recordings" -F "duration=32" -F "fingerprint=ABC" "http://api.acoustid.org/v2/lookup" > info.txt

  • ctrl+c doesn't wait for child process (background process) to finish with trap

    11 avril 2019, par phisch

    I have a script which registers a SIGINT trap and starts a ffmpeg background process that records part of the screen. The SIGINT trap sends a SIGINT signal to the background ffmpeg process to get it to gracefully stop and finish the recording.

    When this script is run in a terminal, and terminated from a separate terminal with kill -INT [SCRIPT_PID], the ffmpeg background process terminates gracefully and outputs confirmation in terminal 1.

    When the script is run in a terminal and stopped with ctrl+c the background process just dies instantly. (even if ctrl+c should just send a SIGINT signal)

    Why does ctrl+c behave differently than killing the script with kill -INT in this case ?
    How can i make sure the ffmpeg background process ends gracefully when ending the script with ctrl+c ?

    #!/bin/bash

    exit_script() {
       kill -INT $ffmpeg_pid
       wait $ffmpeg_pid
       printf "\n\nffmpeg should say 'exiting normally, received signal 2' before this message is printed!\n\n"
    }

    trap exit_script SIGINT

    ffmpeg -f x11grab -s 500x500 -i :0.0+0,0 ~/video_`date +%s`.webm &
    ffmpeg_pid=$!

    wait

    edit : it seems like ffmpeg receives 2 int signals in the case of ctrl+c, but i don’t know why