Recherche avancée

Médias (91)

Autres articles (63)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (6173)

  • OpenCV : in search for less CPU intensive frame capture+resize and into buffer way : how to optimize my code ?

    18 septembre 2014, par Rella

    So I created a function (C++)

    void CaptureFrame(char* buffer, int w, int h, int bytespan)
    {
    /* get a frame */
    if(!cvGrabFrame(capture)){              // capture a frame
     printf("Could not grab a frame\n\7");
     //exit(0);
    }
    CVframe =cvRetrieveFrame(capture);           // retrieve the captured frame

    /* always check */
    if (!CVframe)
    {
     printf("No CV frame captured!\n");
     cin.get();
    }

    /* resize buffer for current frame */
    IplImage* destination = cvCreateImage(cvSize(w, h), CVframe->depth, CVframe->nChannels);

    //use cvResize to resize source to a destination image
    cvResize(CVframe, destination);

    IplImage* redchannel = cvCreateImage(cvGetSize(destination), 8, 1);
    IplImage* greenchannel = cvCreateImage(cvGetSize(destination), 8, 1);
    IplImage* bluechannel = cvCreateImage(cvGetSize(destination), 8, 1);

    cvSplit(destination, bluechannel, greenchannel, redchannel, NULL);
    for(int y = 0; y < destination->height; y++)
    {
     char* line = buffer + y * bytespan;
     for(int x = 0; x < destination->width; x++)
     {
      line[0] = cvGetReal2D(redchannel, y, x);
      line[1] = cvGetReal2D(greenchannel, y, x);
      line[2] = cvGetReal2D(bluechannel, y, x);
      line += 3;
     }
    }
    cvReleaseImage(&redchannel);
    cvReleaseImage(&greenchannel);
    cvReleaseImage(&bluechannel);
    cvReleaseImage(&destination);
    }

    So generally it captures a frame from device, creates a frame to resize into and copies it into buffer (RGB or YUV420P is requirement for me).

    So I wonder what I do wrong, because my function is way 2 cpu intensive, and what can be done to fix it ?

    Update :

    My function is runed in thread :

        void ThreadCaptureFrame()
       {
           while(1){
           t.restart();
           CaptureFrame((char *)frame->data[0], videoWidth, videoHeight, frame->linesize[0]);
           AVFrame* swap = frame;
           frame = readyFrame;
           readyFrame = swap;
           spendedTime = t.elapsed();
           if(spendedTime < desiredTime){
               Sleep(desiredTime - spendedTime);
           }
       }
    }

    which is started at the beginning of int main ( after some initialization) :

    boost::thread workerThread(ThreadCaptureFrame);

    So if it can it runs 24 times per second, it eats 28% of core quad. cam resolution I capture is like 320x240. So : how to optimize it ?

  • avfilter : Add blue and violet noise generation filters

    19 juillet 2017, par George Boyle
    avfilter : Add blue and violet noise generation filters
    

    For the blue and violet noise, I took the pink and brown noise
    respectively and subtracted the offsets instead of adding them. When I
    eyeball the frequency spectrum of the resulting outputs it looks correct
    to me, i.e. the blue graph appears to be a mirror image of the pink, and
    the same can be said of the violet and the brown. I did not do anything
    else to confirm the correctness.

    • [DH] doc/filters.texi
    • [DH] libavfilter/asrc_anoisesrc.c
  • Anomalie #2884 : un modèle doc dans une liste, interrompt l’énumération

    24 octobre 2012, par Bertrand Marne

    Je me rends compte que mon exemple est mal choisi, car en fait c’est avec le modèle doc (et non img) que je rencontre le souci : -# premier point -# second point -# troisième point