Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (39)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

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

Sur d’autres sites (6748)

  • How to prevent my users from installing ffmpeg themselves

    7 février 2018, par keys king

    I would like to develop a program for converting video formats based on the ffmpeg command line on mac. I should use c ++ or python. But now there is a problem that bothers me. I do not want my users to have to install the ffmpeg command themselves , before I use my program, so what should I do ? My question may be naive, I’m just a sophomore in college and I would be very grateful if you could help me.

    I should check whether there is ffmpeg in the program, and then use the command line to install it ? I hope my program can bring ffmpeg, rather than to install

    -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.

    Sorry, I did not say clearly. I hope my program can be the same as the normal mac program can be placed directly into the Application folder. And then you can open directly. I will use qt to draw the interface

  • Is there any control property to fix video playback speed problem when using ffmpeg to decode in Qt platform ?

    16 février 2019, par SoloWang

    I want to play local video file in Qt platform using ffmpeg to decode.Everything is OK except that play speed is as twice as normal.
    The first thing I think about is that there must be a sampling frequency involved.But to be a new to ffmpeg,I don’t know how to fix this problem.
    Above is my code to read frame,is anyone can tell me what’s wrong with the code ?

    void VideoThread::run()
    {
       m_pInFmtCtx = avformat_alloc_context(); //ini struct
       char path[] = "d:/test.mp4";
       // open specific file
       if(avformat_open_input(&m_pInFmtCtx, *path, NULL, NULL)){
       {
           qDebug()<<"get rtsp failed";
           return;
       }
       else
       {
           qDebug()<<"get rtsp success";
       }


       if(avformat_find_stream_info(m_pInFmtCtx, NULL) < 0)
       {
           qDebug()<<"could not find stream information";
           return;
       }
       int nVideoIndex = -1;
       for(int i = 0; i < m_pInFmtCtx->nb_streams; i++)
       {
           if(m_pInFmtCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
           {
               nVideoIndex = i;
               break;
           }
       }
       if(nVideoIndex == -1)
       {
           qDebug()<<"could not find video stream";
           return;
       }

       qDebug("---------------- File Information ---------------");
       m_pCodecCtx = m_pInFmtCtx->streams[nVideoIndex]->codec;
       m_pCodec = avcodec_find_decoder(m_pCodecCtx->codec_id);
       if(!m_pCodec)
       {
           qDebug()<<"could not find codec";
           return;
       }
       //start Decoder
       if (avcodec_open2(m_pCodecCtx, m_pCodec, NULL) < 0) {
           qDebug("Could not open codec.\n");
           return;
       }


       //malloc space for stroring frame
       m_pFrame     = av_frame_alloc();
       m_pFrameRGB  = av_frame_alloc();
       m_pOutBuf = (uint8_t*)av_malloc(avpicture_get_size(AV_PIX_FMT_RGB32, m_pCodecCtx->width, m_pCodecCtx->height));
       avpicture_fill((AVPicture*)m_pFrameRGB, m_pOutBuf, AV_PIX_FMT_RGB32, m_pCodecCtx->width, m_pCodecCtx->height);

       //for color switch,from YUV to RGB
       struct SwsContext *pImgCtx = sws_getContext(m_pCodecCtx->width, m_pCodecCtx->height, m_pCodecCtx->pix_fmt,
                                                   m_pCodecCtx->width, m_pCodecCtx->height, AV_PIX_FMT_RGB32, SWS_BICUBIC, NULL, NULL, NULL);


       int nSize = m_pCodecCtx->width * m_pCodecCtx->height;
       m_pPacket = (AVPacket *)av_malloc(sizeof(AVPacket));
       if(av_new_packet(m_pPacket, nSize) != 0)
       {
           qDebug()<<"new packet failed";
       }

       //isInterruptionRequested is a flag,determine whether the thread is over
       // read each frame from specific video file
       while (!isInterruptionRequested())
       {
           int nGotPic = 0;
           if(av_read_frame(m_pInFmtCtx, m_pPacket) >= 0)
           {
               if(m_pPacket->stream_index == nVideoIndex)
               {
                   //avcodec_decode_video2()transform from packet to frame
                   if(avcodec_decode_video2(m_pCodecCtx, m_pFrame, &nGotPic, m_pPacket) < 0)
                   {
                       qDebug()<<"decode failed";
                       return;
                   }
                   if(nGotPic)
                   {   // transform to RGB color
                       sws_scale(pImgCtx, (const uint8_t* const*)m_pFrame->data,
                                 m_pFrame->linesize, 0, m_pCodecCtx->height, m_pFrameRGB->data,
                                 m_pFrameRGB->linesize);
                       // save to QImage,for later use
                       QImage *pImage = new QImage((uchar*)m_pOutBuf, m_pCodecCtx->width, m_pCodecCtx->height, QImage::Format_RGB32);
                   }

               }
           }

           av_free_packet(m_pPacket);
           msleep(5);
       }
       exec();
    }
  • Consume RTSP stream from users browser without converting on the server

    19 août 2018, par Kazanz

    I have thousands of IP cameras that need to be displayed to various users that are all outputing RTSP streams. Right now I have a server that uses ffpmeg to convert the stream to mpeg video that is then consumed and served over websockets via a node app.

    My problem is that these two processes take up a ridiculous amount of memory. About a half a GB for each camera.

    Is there any way to offload the conversion and reading of the stream to the client’s machine in their browser, or potentially out of it ?