Recherche avancée

Médias (2)

Mot : - Tags -/rotation

Autres articles (106)

  • 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

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (12346)

  • avcodec/hevcdec : Add pointers to logctx and parent ctx to HEVCLocalCtx

    29 juin 2022, par Andreas Rheinhardt
    avcodec/hevcdec : Add pointers to logctx and parent ctx to HEVCLocalCtx
    

    It is safe for a slice thread to read the main context
    and therefore it is safe to add a pointer to const HEVCContext
    (namely the parent context) to each HEVCLocalContext.
    It is also safe (and actually redundant) to add a pointer
    to a logcontext to HEVCLocalContext.

    Doing so allows to pass the HEVCLocalContext as context in
    the parts of the code that is run slice-threaded when slice-threading
    is in use (currently these parts of the code use ordinary
    HEVCContext*). This way one is not tempted to modify
    the main context from the slice contexts.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

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

    &#xA;

    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.

    &#xA;

    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.

    &#xA;

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

    &#xA;

    main.js

    &#xA;

    // retrieve video data&#xA;ipcMain.handle(&#x27;get-games&#x27;, async (event, arg) => {&#xA;    const spawn = require(&#x27;child_process&#x27;).spawn;&#xA;    const pythonProcess = spawn(&#x27;python&#x27;, ["./backend/predict_games.py", arg]);&#xA;&#xA;    // sets pythonProcess as a global variable to be accessed when quitting the app&#xA;    global.childProcess = pythonProcess;&#xA;&#xA;    return new Promise((resolve, reject) => {&#xA;        let result = "";&#xA;&#xA;        pythonProcess.stdout.on(&#x27;data&#x27;, async (data) => {&#xA;            data = String(data);&#xA;&#xA;            if (data.startsWith("{"))&#xA;                result = JSON.parse(data);&#xA;        });&#xA;&#xA;        pythonProcess.on(&#x27;close&#x27;, () => {&#xA;            resolve(result);&#xA;        })&#xA;&#xA;        pythonProcess.on(&#x27;error&#x27;, (err) => {&#xA;            reject(err);&#xA;        });&#xA;    })&#xA;});&#xA;&#xA;app.on(&#x27;before-quit&#x27;, function () {&#xA;    global.childProcess.kill(&#x27;SIGINT&#x27;);&#xA;});&#xA;

    &#xA;

    predict_games.py (the ffmpeg part)

    &#xA;

    def convert_video_to_frames(fps, input_file):&#xA;    # a few useful directories&#xA;    local_dir = os.path.dirname(os.path.abspath(__file__))&#xA;    snapshots_dir = fr"{local_dir}/snapshots/{input_file.stem}"&#xA;&#xA;    # creates snapshots folder if it doesn&#x27;t exist&#xA;    Path(snapshots_dir).mkdir(parents=True, exist_ok=True)&#xA;&#xA;print(f"Processing: {Path(fr&#x27;{input_file}&#x27;)}")&#xA;try:&#xA;    (&#xA;        ffmpeg.input(Path(input_file))&#xA;        .filter("fps", fps=fps)&#xA;        .output(f"{snapshots_dir}/%d.jpg", s="426x240", start_number=0)&#xA;        .run(capture_stdout=True, capture_stderr=True)&#xA;    )&#xA;except ffmpeg.Error as e:&#xA;    print("stdout:", e.stdout.decode("utf8"))&#xA;    print("stderr:", e.stderr.decode("utf8"))&#xA;

    &#xA;

    Does anyone have any clue ?

    &#xA;

  • avcodec/h264dec : Constify slices' pointer to the parent context

    24 mars 2022, par Andreas Rheinhardt
    avcodec/h264dec : Constify slices' pointer to the parent context
    

    Modifying the main context by a slice thread is racy ;
    so constify the pointer to it in H264SliceContext.
    The code itself was already compatible with this change.

    Reviewed-by : Michael Niedermayer <michael@niedermayer.cc>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/h264dec.h