Recherche avancée

Médias (1)

Mot : - Tags -/ipad

Autres articles (65)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Diogene : création de masques spécifiques de formulaires d’édition de contenus

    26 octobre 2010, par

    Diogene est un des plugins ? SPIP activé par défaut (extension) lors de l’initialisation de MediaSPIP.
    A quoi sert ce plugin
    Création de masques de formulaires
    Le plugin Diogène permet de créer des masques de formulaires spécifiques par secteur sur les trois objets spécifiques SPIP que sont : les articles ; les rubriques ; les sites
    Il permet ainsi de définir en fonction d’un secteur particulier, un masque de formulaire par objet, ajoutant ou enlevant ainsi des champs afin de rendre le formulaire (...)

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

  • Nodejs spawn - child processes

    24 février 2019, par z Eyeland

    My nodejs application is running on raspberry Pi. The program uses spawn child process to trigger bash scripts which record or compress the previous recorded file. The program records fine. After recording the user selects the compress button. This kills the recording spawn process and fires the bash script for compression. The issue I am having is that whenever the video length gets around 1min long the compression spawn process times out or something. I ran ps -ef to view all process and i noticed that the compression script is still there. She the video length is short - the compression spawn process completes its cycle and send api request to shutdown the process. Here is some code

    Api with console log that lets me know when compression is done. When the video clips are longer around 1min this GET request never logs’=

    app.get('/clovis/api/led', function (req, res){
    console.log("api activated for resetLED function");
    resetLED();
    console.log("reset was completed");
    })

    Nodejs spawns that call different bash scripts

    function setBashScript(scriptNum){
    if(scriptNum == 0){
       //do this
        child = spawn('./feedmpeg.sh');
    resetLED();
    }
    if(scriptNum == 1){
       //do this
       updatePicturePath();
        child = spawn('./feedSnapshot.sh',[pictureFilePath]);
    resetLED();
    }
    if(scriptNum == 2){
       //do this
       updateVideoPath();
       child = spawn('./feedmpegRecord.sh',[videoFilePath]);
       isRecording = true;
    resetLED();
    ledRed();
    }
    if(scriptNum == 10){
       //do this
       updateCompressedPath();
        child = spawn('./generalCompressionMP4.sh',[videoFilePath,compressedFilePath]);
        isRecording = false;
    resetLED();
    ledBlue();
     }
     }

    generalCompressionMP4.sh - The spawn process that doesnt complete if video length is too long. Generally when the process is complete, I head over to the localhost server and view the mp4 file. When this issue occures the mp4 doesnt load, the old path is not removed, and the api doesnt send.

    #!/bin/bash
    FILEPATH="$1"
    COMPRESSIONPATH="$2"
    ffmpeg -i $FILEPATH -vcodec h264 -acodec mp2 $COMPRESSIONPATH
    sudo rm $FILEPATH
    curl -H "Content-Type: application/json" -X POST
    http://localhost:3000/clovis/api/led

    Why might the process get stuck ? How can i fix this ? Should I not use spawn child process ?

  • 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

  • Gracefully closing FFMPEG child processes from node

    10 juin 2019, par Gordon

    I am trying to record numerous audio feeds using ffmpeg. Node downloads a config file with the stream URLS (HLS M3U8 playlists), parses it and starts the appropriate number of ffmpeg instances. When I go to shut them down, nothing happens and I have to kill them with task manager, resulting in corrupt files. When I am debugging and hit control-c within a minute or two of starting the program, it works without issue. When I need to record more than 5-10 minutes that I have problems.

    I found this related question from 2013, and adapted it to fit my multiple stream situation.

    The recorder processes are started with the following code (inside the http request callback) :

    config.audio_config.forEach((channel,i)=>{
    self.liveChannels++;

    console.log(`   ${channel.number}`);
    self.Channels[i] = spawn('ffmpeg', ['-i', `${channel.base_url + channel.stream_ios}`,  '-c:v', 'none', '-c:a', 'copy', `Output\\${config.folder}\\${channel.number}.m4a`]);
    self.Channels[i].stdin.setEncoding('utf8');
    self.Channels[i].chNum = channel.number;

    self.Channels[i].on('exit',(code,sig)=>{
    console.log(`   Channel ${channel.number} recorder closed.`);
    self.liveChannels--;
    if(self.liveChannels === 0){
       process.exit();
    }
    });
    });
    console.log('Press Ctl-C to start Shutdown');

    My shutdown function (triggered by SIGINT to main process) is :

    function shutdown() {
       self.Channels.forEach((chan)=>{
           chan.stdin.write('q');
           chan.stdin.end(); //I have tried both with and without this line and chan.stdin.end('q')
       });

    }

    UPDATE :
    Switching to an AAC container file (simply changed the extension on the output) removed the need for a graceful FFMPEG exit. I still would like to know why sending ’q’ to stdin only kills the FFMPEG process for the first 10 minutes.