Recherche avancée

Médias (9)

Mot : - Tags -/soundtrack

Autres articles (99)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

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

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (15041)

  • Kill child process only after readFile() Node js Electron

    14 mai 2021, par Radespy

    I'm using an imported ffmpeg binary ffmpeg-static-electronin an Electron-React app (on Windows Pro 10) and want to delete a saved cropped video and then kill the child process afterwards from my Main process.

    


    The overall aim is to crop a video of the whole screen following capture and then send the cropped video to a renderer.

    


    const fsPromises = require('fs').promises
const ffmpeg = require('ffmpeg-static-electron')
const { execFile } = require("child_process")


ipcMain.on("windoze_capture_screen:video_buffer", async (event, buffer) => {
    const temp_directory =  await fsPromises.mkdtemp(await fsPromises.realpath(os.tmpdir()) + path.sep)
    const capture_screen_video_path = path.join(temp_directory, "screen_capture_video.mp4")

    child_object = execFile(`${ffmpeg.path}`, 

            ['-i', `${capture_screen_video_path}`, '-vf', `crop=${width}:${height}:${x_pos}:${y_pos}`, `${path.join(temp_directory,'cropped_video.mp4')}`])
            
    child_object.on("exit", async () => {

        // child_object.kill()
        console.log("?Killed -1", child_object.killed)
        
        try { 
            databasePayload.video_buffer = await fsPromises.readFile(path.join(temp_directory, "cropped_video.mp4"), {encoding: 'base64'})
            mainWindow.webContents.send("main_process:video_buffer", databasePayload.video_buffer)
        } catch (error) {
            console.log(error)
        } finally {

            // child_object.kill()
            console.log("?Killed - 2", child_object.killed)
            
            // noASAR required to be set to 'true' in order to remove temp directory in build
            process.noAsar = true 
            fs.rmdir(temp_directory, {recursive: true}, (error) => {if (error) {log(error)}})
            process.noASAR = false
            }

            // 3rd scenario
            // child_object.kill()
            console.log("?Killed -3", child_object.killed)   
        })

        // 4th scenario
        console.log("?Killed-4", child_object.killed)   
    })



    


    When running each of these scenarios, I get the following outputs.

    


    Scenario's 1, 2 and 3 - Successfully sends cropped video to renderer but doesn't kill process.

    


    Output :

    


    ?Killed-4 false
?Killed -1 false
[ffmpeg version 3.0.1 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.3.0 (GCC).... etc. ]
?Killed-2 false
?Killed -3 false


    


    Scenario 4 - Doesn't crop video

    


    ?Killed-4 true
?Killed -1 true
Command failed: C:\Users\XXX\Desktop\windows-electron-forge\node_modules\ffmpeg-static-electron\bin\win\x64\ffmpeg.exe -i C:\Users\XXX\AppData\Local\Temp\4WgnUw\screen_capture_video.mp4 -vf crop=796:763:462:509 C:\Users\XXX\AppData\Local\Temp\4WgnUw\cropped_video.mp4

[Error: ENOENT: no such file or directory, open 'C:\Users\XXX\AppData\Local\Temp\4WgnUw\cropped_video.mp4'] {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\Users\\XXX\\AppData\\Local\\Temp\\4WgnUw\\cropped_video.mp4'
}
?Killed - 2 true
?Killed -3 true


    


    The last scenario has been tried out of desperation.

    


    Question : Where am I going wrong with this ? I suspect it's something to do with ipc between child and parent process but not sure where to place the code.

    


    Any help will be much appreciated !!!

    


  • Revert "avformat/hls : copy rw_timeout from parent to child AVIOContexts."

    17 avril 2018, par Steven Liu
    Revert "avformat/hls : copy rw_timeout from parent to child AVIOContexts."
    

    This reverts commit 36deec010cc87c8990477e1703dbf785212992b5.

    • [DH] libavformat/hls.c
  • how to get the output of a child process in a variable c#

    4 août 2022, par Dokoa

    I want to get width, height information into a variable after ffprobe is finished.

    


    int width, height;   
Process pr = new Process();
                pr.StartInfo.FileName = "ffprobe";
                pr.StartInfo.Arguments = $"- v error - select_streams v: 0 - show_entries stream = width,height - of default = nw = 1 input.mp4";
                pr.StartInfo.UseShellExecute = false;
                pr.StartInfo.CreateNoWindow = true;
                pr.EnableRaisingEvents = true;
                pr.Start();


    


    example of ffprobe console output

    


    width=320
height=180