Recherche avancée

Médias (0)

Mot : - Tags -/configuration

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (45)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

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

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (5377)

  • Convert video to hequirect while setting the background black and blur the transitional area [closed]

    11 février 2024, par Zurechtweiser

    I am using

    


    ffmpeg -i input.mp4 -vf "v360=input=fisheye:ih_fov=122.6:iv_fov=94.4:output=hequirect:h_fov=180:v_fov=180:in_stereo=2d:out_stereo=sbs,format=yuv420p" -b:v 25M -maxrate 60M -bufsize 25M output.mp4


    


    Which works as advertised to convert a fisheye to hequirect except for two problems :

    


      

    1. The background is not black but seems to try and set it to the average color of the video. It should be black throughout.

      


    2. 


    3. The corners are not blurred but should be, there should be a soft transition from the corner of the video into black.

      


    4. 


    


  • How to speed up black video creation with FFMPEG ?

    2 décembre 2017, par Rick Sullivan

    I have been generating static black videos as backgrounds using FFMPEG’s color source. This works fine for smaller and shorter videos, but I need to be able to generate long 1080p black videos quickly.

    For example, I can generate a two hour long 1080p@30fps video using :

    ffmpeg -f lavfi -i color=black:s=1920x1080:r=30 -t 7200 test.mp4

    But this will take over 45 minutes to run.

    There are options that speed up runtime, like using the ultrafast preset :

    ffmpeg -f lavfi -i color=black:s=1920x1080:r=30 -preset ultrafast -t 7200 test.mp4

    Which will take around 20 minutes to run. Better, but not good enough for doing this en masse.

    Are there any other options to drastically speed up runtime ?

    Intuitively, I am generating a static video where only video duration varies, so it seems like there should be an approach that is restricted only by disk write speed. All of these options are very CPU intensive and seem to be doing more processing than is necessary for my use case.

  • Output black when I decode h264 720p with ffmpeg

    6 décembre 2017, par José Marqueses Saxo

    First, sorry for my english. When I decode h264 720p in ardrone2.0 my output is black and I cant see anything.

    I have try to change the value of pCodecCtx->pix_fmt = AV_PIX_FMT_BGR24; to pCodecCtx->pix_fmt = AV_PIX_FMT_YUV420P; and the value of pCodecCtxH264->pix_fmt = AV_PIX_FMT_BGR24; to pCodecCtxH264->pix_fmt = AV_PIX_FMT_YUV420P; but my program crash. What am I doing wrong ?. Thank you, see part of my code :

    av_register_all();
    avcodec_register_all();
    avformat_network_init();

    // 1.2. Open video file
    if(avformat_open_input(&pFormatCtx, drone_addr, NULL, NULL) != 0) {
     mexPrintf("No conecct with Drone");
     EndVideo();
     return;
    }

    pCodec    = avcodec_find_decoder(AV_CODEC_ID_H264);

    pCodecCtx = avcodec_alloc_context3(pCodec);
    pCodecCtx->pix_fmt = AV_PIX_FMT_BGR24;
    pCodecCtx->skip_frame = AVDISCARD_DEFAULT;
    pCodecCtx->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK;
    pCodecCtx->err_recognition = AV_EF_CAREFUL;
    pCodecCtx->skip_loop_filter = AVDISCARD_DEFAULT;
    pCodecCtx->workaround_bugs = FF_BUG_AUTODETECT;
    pCodecCtx->codec_type = AVMEDIA_TYPE_VIDEO;
    pCodecCtx->codec_id = AV_CODEC_ID_H264;
    pCodecCtx->skip_idct = AVDISCARD_DEFAULT;
    pCodecCtx->width = 1280;
    pCodecCtx->height = 720;

    pCodecH264 = avcodec_find_decoder(AV_CODEC_ID_H264);
    pCodecCtxH264 = avcodec_alloc_context3(pCodecH264);


    pCodecCtxH264->pix_fmt = AV_PIX_FMT_BGR24;
    pCodecCtxH264->skip_frame = AVDISCARD_DEFAULT;
    pCodecCtxH264->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK;
    pCodecCtxH264->err_recognition = AV_EF_CAREFUL;
    pCodecCtxH264->skip_loop_filter = AVDISCARD_DEFAULT;
    pCodecCtxH264->workaround_bugs = FF_BUG_AUTODETECT;
    pCodecCtxH264->codec_type = AVMEDIA_TYPE_VIDEO;
    pCodecCtxH264->codec_id = AV_CODEC_ID_H264;
    pCodecCtxH264->skip_idct = AVDISCARD_DEFAULT;

    if(avcodec_open2(pCodecCtxH264, pCodecH264, &optionsDict) < 0)
    {
      mexPrintf("Error opening H264 codec");
      return ;
    }

    pFrame_BGR24 = av_frame_alloc();


    if(pFrame_BGR24 == NULL) {
      mexPrintf("Could not allocate pFrame_BGR24\n");
      return ;
    }

    // Determine required buffer size and allocate buffer

    buffer_BGR24 =
    (uint8_t *)av_mallocz(av_image_get_buffer_size(AV_PIX_FMT_BGR24,
    pCodecCtx->width, ((pCodecCtx->height == 720) ? 720 : pCodecCtx->height) *
    sizeof(uint8_t)*3,1));

    // Assign buffer to image planes

    av_image_fill_arrays(pFrame_BGR24->data, pFrame_BGR24->linesize,
    buffer_BGR24,AV_PIX_FMT_BGR24, pCodecCtx->width, pCodecCtx->height,1);

    // format conversion context
    pConvertCtx_BGR24 = sws_getContext(pCodecCtx->width, pCodecCtx->height,
    pCodecCtx->pix_fmt, pCodecCtx->width, pCodecCtx->height,  AV_PIX_FMT_BGR24,
                                    SWS_BILINEAR | SWS_ACCURATE_RND, 0, 0, 0);

    // 1.6. get video frames
    pFrame = av_frame_alloc();

    av_init_packet(&packet);
    packet.data = NULL;
    packet.size = 0;
    }

    //Captura un frame
    void video::capture(mxArray *plhs[]) {

     if(av_read_frame(pFormatCtx, &packet) < 0){
         mexPrintf("Error al leer frame");
         return;
     }
      do {
          do {
             rest = avcodec_send_packet(pCodecCtxH264, &packet);
          } while(rest == AVERROR(EAGAIN));

          if(rest == AVERROR_EOF || rest == AVERROR(EINVAL)) {
                   printf("AVERROR(EAGAIN): %d, AVERROR_EOF: %d,
                   AVERROR(EINVAL): %d\n", AVERROR(EAGAIN), AVERROR_EOF,
                   AVERROR(EINVAL));
               printf("fe_read_frame: Frame getting error (%d)!\n", rest);
               return;
          }

          rest = avcodec_receive_frame(pCodecCtxH264, pFrame);
      } while(rest == AVERROR(EAGAIN));

      if(rest == AVERROR_EOF || rest == AVERROR(EINVAL)) {

       // An error or EOF occured,index break out and return what
       // we have so far.
         printf("AVERROR(EAGAIN): %d, AVERROR_EOF: %d, AVERROR(EINVAL): %d\n",
         AVERROR(EAGAIN), AVERROR_EOF, AVERROR(EINVAL));
           printf("fe_read_frame: EOF or some othere decoding error (%d)!\n",
           rest);
           return;
      }


      // 2.1.1. convert frame to GRAYSCALE [or BGR] for OpenCV
      sws_scale(pConvertCtx_BGR24,   (const uint8_t* const*)pFrame->data,
          pFrame->linesize, 0,pCodecCtx->height,   pFrame_BGR24->data,  
                pFrame_BGR24->linesize);
    //}
      av_packet_unref(&packet);
      av_init_packet(&packet);
      mwSize dims[] = {(pCodecCtx->width)*((pCodecCtx->height == 720) ? 720 :
      pCodecCtx->height)*sizeof(uint8_t)*3};
      plhs[0] = mxCreateNumericArray(1,dims,mxUINT8_CLASS, mxREAL);
       //plhs[0]=mxCreateDoubleMatrix(pCodecCtx->height,pCodecCtx-
       >width,mxREAL);
      point=mxGetPr(plhs[0]);
      memcpy(point, pFrame_BGR24->data[0],(pCodecCtx->width)*(pCodecCtx-
       >height)*sizeof(uint8_t)*3);
    }