Recherche avancée

Médias (91)

Autres articles (66)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • 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

Sur d’autres sites (14470)

  • PHP exec() function command finished but last function not execute

    12 juin 2018, par Noeeka

    The PHP file should execute FFmpeg command after this command finished it should take data into the database. However, I found that the exec($command--FFmpeg) has been completed and it run pretty well but the data is not in the database.

    I have set php.ini ignore_user_abort = On

    It could run the PHP process in the background

    my could is as follows

    set_time_limit(0);
    $tumbfileName = time();
    $filepath = dirname(dirname(dirname(__FILE__))) . "/files/video/";
    $cmd = 'ffmpeg -i ' . dirname(dirname(dirname(__FILE__))).$content . ' -c:v libx264 -strict -2 ' . $filepath . "post_" . $tumbfileName . '.mp4';
    exec($cmd, $output, $error);

    $cmdImg="ffmpeg -y -ss 2 -i ".dirname(dirname(dirname(__FILE__))).$content." -vframes 1 -f image2 -s 400*300 ".$filepath . "notice_thumb_" . $tumbfileName . '.jpg';
    //$cmdImg = "ffmpeg -i " . dirname(dirname(dirname(__FILE__))).$content . " -f image2 -ss 10 -s 400*300 -vframes 10 " . $filepath . "notice_thumb_" . $tumbfileName . '.jpg';
    exec($cmdImg, $outputImg, $errorImg);
    $data = array(
           'content' => "/files/video/"."post_" . $tumbfileName . '.mp4',
           'author' => 'management',
           'deadline' => $deadline,
           'type' => $type,
           'datetime' => time(),
           'thumb' => "/files/video/"."notice_thumb_" . $tumbfileName . '.jpg'
    );                                                          
    $flag = $this->db->insert('notice_info', $data);
  • System.AccessViolationException on avcodec_open2 using FFMpeg.AutoGen

    5 décembre 2024, par forlayo

    I am using FFMpeg.AutoGen (v6.0.0.2) with hwencode support for Nvidia cards, and in few devices (for example on NVIDIA GeForce MX350) when I am doing fffmpeg.avcodec_open2 I got the following ffmpeg message in logs :

    


    [h264_nvenc @ 000001f473fcc480] OpenEncodeSessionEx failed: unsupported device (2): (no details)



    


    And then it crashes with the following crash :

    


    Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.&#xA;   at FFmpeg.AutoGen.DynamicallyLoadedBindings&#x2B;&lt;>c.<initialize>b__2_494(FFmpeg.AutoGen.AVCodecContext*, FFmpeg.AutoGen.AVCodec*, FFmpeg.AutoGen.AVDictionary**)&#xA;   at FFmpeg.AutoGen.ffmpeg.avcodec_open2(FFmpeg.AutoGen.AVCodecContext*, FFmpeg.AutoGen.AVCodec*, FFmpeg.AutoGen.AVDictionary**)&#xA;   at GraphicsCheck.FfmpegChecker.StartEncoder(Omni.Platforms.Windows.Services.AV.CodecInfo, Int32, Int32, Int32)&#xA;   at GraphicsCheck.FfmpegChecker.CheckConfig(CodecConfig)&#xA;   at Program.<main>$(System.String[])&#xA;</main></initialize>

    &#xA;

    I created a sample app to demo this issue. And following the path of the calls..

    &#xA;

      &#xA;
    1. That happens at nvenc_open_session and is called here
    2. &#xA;

    3. That would cause going to fail2 routine, which is this one :
    4. &#xA;

    &#xA;

    fail2:&#xA;    CHECK_CU(dl_fn->cuda_dl->cuCtxDestroy(ctx->cu_context_internal));&#xA;    ctx->cu_context_internal = NULL;&#xA;

    &#xA;

      &#xA;
    1. ctx->cu_context_internal comes from (in same method) then I suppose it was created properly (as otherwise wouldn't continue).
    2. &#xA;

    &#xA;

        ret = CHECK_CU(dl_fn->cuda_dl->cuCtxCreate(&amp;ctx->cu_context_internal, 0, cu_device));&#xA;    if (ret &lt; 0)&#xA;        goto fail;&#xA;

    &#xA;

      &#xA;
    1. ctx in that method is the priv_data of AVCodecContext as we can see here :
    2. &#xA;

    &#xA;

    static av_cold int nvenc_check_device(AVCodecContext *avctx, int idx)&#xA;{&#xA;    NvencContext *ctx = avctx->priv_data;&#xA;

    &#xA;

      &#xA;
    1. Also the act of printing the error message, on nvenc_print_error, is interacting with context.
    2. &#xA;

    &#xA;

    static int nvenc_print_error(AVCodecContext *avctx, NVENCSTATUS err,&#xA;                             const char *error_string)&#xA;{&#xA;    const char *desc;&#xA;    const char *details = "(no details)";&#xA;    int ret = nvenc_map_error(err, &amp;desc);&#xA;&#xA;#ifdef NVENC_HAVE_GETLASTERRORSTRING&#xA;    NvencContext *ctx = avctx->priv_data;&#xA;    NV_ENCODE_API_FUNCTION_LIST *p_nvenc = &amp;ctx->nvenc_dload_funcs.nvenc_funcs;&#xA;&#xA;    if (p_nvenc &amp;&amp; ctx->nvencoder)&#xA;        details = p_nvenc->nvEncGetLastErrorString(ctx->nvencoder);&#xA;#endif&#xA;&#xA;    av_log(avctx, AV_LOG_ERROR, "%s: %s (%d): %s\n", error_string, desc, err, details);&#xA;&#xA;    return ret;&#xA;}&#xA;

    &#xA;

      &#xA;
    1. av_log is executed as we can see the error message on logs then the other lines shouldn't be a problem.

      &#xA;

    2. &#xA;

    3. Seeing the other calls, when nvenc_check_device fails the error is going up to nvenc_check_device -> nvenc_setup_device but we aren't seeing more logs then the issue may be on nvenc_check_device on fail2 routine or on nvenc_print_error

      &#xA;

    4. &#xA;

    &#xA;

    Any thoughts ?

    &#xA;

  • Revision ae14b37431 : Merge "Remove claims of universal target support from the build system."

    13 mai 2015, par Tom Finegan

    Merge "Remove claims of universal target support from the build system."