Recherche avancée

Médias (2)

Mot : - Tags -/map

Autres articles (70)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (9124)

  • Revision 428369293d : vp9_mv_pred : quiet a static analysis warning add an assert to validate pred_mv

    18 mars 2015, par James Zern

    Changed Paths :
     Modify /vp9/encoder/vp9_rd.c



    vp9_mv_pred : quiet a static analysis warning

    add an assert to validate pred_mv array size

    Change-Id : I532b882b71e2baff3ac76e07ed133ec5a11bd0fc

  • Revision fc19243ced : Re-design rate-distortion cost tracking buffers This commit re-designs the per

    10 octobre 2013, par Jingning Han

    Changed Paths :
     Modify /vp9/encoder/vp9_block.h


     Modify /vp9/encoder/vp9_onyx_int.h


     Modify /vp9/encoder/vp9_rdopt.c



    Re-design rate-distortion cost tracking buffers

    This commit re-designs the per transformed block rate-distortion
    costs tracking buffers. It removes redundant buffer usage, makes
    the needed context memory allocation per VP9_COMP instance and
    reuses the same buffer sets inside the rate-distortion optimization
    search loop, thereby avoiding repeatedly requiring memory space.

    It reduces speed 0 runtime :

    bus at 2000 kbps from 166763ms to 158967ms,
    football at 600 kbps from 246614ms to 234257ms.

    Both about 5% speed-up. Local tests suggest about 2% to 5% speed-up
    for speed 1 and 2 settings. This does not change compression
    performance.

    Change-Id : I363514c5276b5cf9a38c7251088ffc6ab7f9a4c3

  • A process' child doesn't get killed from killing the parent process

    2 avril 2022, par Impasse

    I am developing an Electron application. In this application, I am spawning a Python process with a file's path as an argument, and the file itself is then passed to ffmpeg (through the ffmpeg-python module) and then goes through some Tensorflow functions.

    


    I am trying to handle the case in which the user closes the Electron app while the whole background process is going. From my tests though, it seems like ffmpeg's process stays up no matter what. I'm on Windows and I'm looking at the task manager and I'm not sure what's going on : when closing the Electron app's window, sometimes ffmpeg.exe will be a single process, some other times it will stay in an Electron processes group.

    


    I have noticed that if I kill Electron's process through closing the window, the python process will also close once ffmpeg has done its work, so I guess this is half-working. The problem is, ffmpeg is doing intensive stuff and if the user needs to close the window, then the ffmpeg process also NEEDS to be killed. But I can't achieve that in any way.

    


    I have tried a couple things, so I'll paste some code :

    


    main.js

    


    // retrieve video data
ipcMain.handle('get-games', async (event, arg) => {
    const spawn = require('child_process').spawn;
    const pythonProcess = spawn('python', ["./backend/predict_games.py", arg]);

    // sets pythonProcess as a global variable to be accessed when quitting the app
    global.childProcess = pythonProcess;

    return new Promise((resolve, reject) => {
        let result = "";

        pythonProcess.stdout.on('data', async (data) => {
            data = String(data);

            if (data.startsWith("{"))
                result = JSON.parse(data);
        });

        pythonProcess.on('close', () => {
            resolve(result);
        })

        pythonProcess.on('error', (err) => {
            reject(err);
        });
    })
});

app.on('before-quit', function () {
    global.childProcess.kill('SIGINT');
});


    


    predict_games.py (the ffmpeg part)

    


    def convert_video_to_frames(fps, input_file):
    # a few useful directories
    local_dir = os.path.dirname(os.path.abspath(__file__))
    snapshots_dir = fr"{local_dir}/snapshots/{input_file.stem}"

    # creates snapshots folder if it doesn't exist
    Path(snapshots_dir).mkdir(parents=True, exist_ok=True)

print(f"Processing: {Path(fr'{input_file}')}")
try:
    (
        ffmpeg.input(Path(input_file))
        .filter("fps", fps=fps)
        .output(f"{snapshots_dir}/%d.jpg", s="426x240", start_number=0)
        .run(capture_stdout=True, capture_stderr=True)
    )
except ffmpeg.Error as e:
    print("stdout:", e.stdout.decode("utf8"))
    print("stderr:", e.stderr.decode("utf8"))


    


    Does anyone have any clue ?