Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (52)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

Sur d’autres sites (6283)

  • Opencv mask object from rtsp camera

    19 août 2016, par user3689259

    i want to add an image as mask in camera live frame after detect specific logo .
    if possible Output rtmp ://127.0.0.1:1935/live/mycamOutput ,, I have nginx-rtmp the rtmp can work if we add it in source , pls any one can help me

    //opencv
    #include "opencv2/imgcodecs.hpp"
    #include "opencv2/imgproc.hpp"
    #include "opencv2/videoio.hpp"
    #include <opencv2></opencv2>highgui.hpp>
    #include <opencv2></opencv2>video.hpp>
    //C
    #include
    //C++
    #include <iostream>
    #include <sstream>

    using namespace cv;
    using namespace std;

    // Global variables
    Mat frame; //current frame
    Mat fgMaskMOG2; //fg mask fg mask generated by MOG2 method
    Ptr<backgroundsubtractor> pMOG2; //MOG2 Background subtractor
    int keyboard; //input from keyboard

    /** Function Headers */
    void help();
    void processVideo(char* videoFilename);
    void processImages(char* firstFrameFilename);

    void help()
    {
       cout
       &lt;&lt; "--------------------------------------------------------------------------" &lt;&lt; endl
       &lt;&lt; "This program shows how to use background subtraction methods provided by "  &lt;&lt; endl
       &lt;&lt; " OpenCV. You can process both videos (-vid) and images (-img)."             &lt;&lt; endl
                                                                                       &lt;&lt; endl
       &lt;&lt; "Usage:"                                                                     &lt;&lt; endl
       &lt;&lt; "./bg_sub {-vid <video filename="filename">|-img <image filename="filename">}"                     &lt;&lt; endl
       &lt;&lt; "for example: ./bg_sub -vid video.avi"                                       &lt;&lt; endl
       &lt;&lt; "or: ./bg_sub -img /data/images/1.png"                                       &lt;&lt; endl
       &lt;&lt; "--------------------------------------------------------------------------" &lt;&lt; endl
       &lt;&lt; endl;
    }

    /**
    * @function main
    */
    int main(int argc, char* argv[])
    {
       //print help information
       help();

       //check for the input parameter correctness
       if(argc != 3) {
           cerr &lt;&lt;"Incorret input list" &lt;&lt; endl;
           cerr &lt;&lt;"exiting..." &lt;&lt; endl;
           return EXIT_FAILURE;
       }

       //create GUI windows
       namedWindow("Frame");
       namedWindow("FG Mask MOG 2");

       //create Background Subtractor objects
       pMOG2 = createBackgroundSubtractorMOG2(); //MOG2 approach

       if(strcmp(argv[1], "-vid") == 0) {
           //input data coming from a video
           processVideo(argv[2]);
       }
       else if(strcmp(argv[1], "-img") == 0) {
           //input data coming from a sequence of images
           processImages(argv[2]);
       }
       else {
           //error in reading input parameters
           cerr &lt;&lt;"Please, check the input parameters." &lt;&lt; endl;
           cerr &lt;&lt;"Exiting..." &lt;&lt; endl;
           return EXIT_FAILURE;
       }
       //destroy GUI windows
       destroyAllWindows();
       return EXIT_SUCCESS;
    }

    /**
    * @function processVideo
    */
    void processVideo(char* videoFilename) {
       //create the capture object
       VideoCapture capture(videoFilename);
       if(!capture.isOpened()){
           //error in opening the video input
           cerr &lt;&lt; "Unable to open video file: " &lt;&lt; videoFilename &lt;&lt; endl;
           exit(EXIT_FAILURE);
       }
       //read input data. ESC or 'q' for quitting
       while( (char)keyboard != 'q' &amp;&amp; (char)keyboard != 27 ){
           //read the current frame
           if(!capture.read(frame)) {
               cerr &lt;&lt; "Unable to read next frame." &lt;&lt; endl;
               cerr &lt;&lt; "Exiting..." &lt;&lt; endl;
               exit(EXIT_FAILURE);
           }
           //update the background model
           pMOG2->apply(frame, fgMaskMOG2);
           //get the frame number and write it on the current frame
           stringstream ss;
           rectangle(frame, cv::Point(10, 2), cv::Point(100,20),
                     cv::Scalar(255,255,255), -1);
           ss &lt;&lt; capture.get(CAP_PROP_POS_FRAMES);
           string frameNumberString = ss.str();
           putText(frame, frameNumberString.c_str(), cv::Point(15, 15),
                   FONT_HERSHEY_SIMPLEX, 0.5 , cv::Scalar(0,0,0));
           //show the current frame and the fg masks
           imshow("Frame", frame);
           imshow("FG Mask MOG 2", fgMaskMOG2);
           //get the input from the keyboard
           keyboard = waitKey( 30 );
       }
       //delete capture object
       capture.release();
    }

    /**
    * @function processImages
    */
    void processImages(char* fistFrameFilename) {
       //read the first file of the sequence
       frame = imread(fistFrameFilename);
       if(frame.empty()){
           //error in opening the first image
           cerr &lt;&lt; "Unable to open first image frame: " &lt;&lt; fistFrameFilename &lt;&lt; endl;
           exit(EXIT_FAILURE);
       }
       //current image filename
       string fn(fistFrameFilename);
       //read input data. ESC or 'q' for quitting
       while( (char)keyboard != 'q' &amp;&amp; (char)keyboard != 27 ){
           //update the background model
           pMOG2->apply(frame, fgMaskMOG2);
           //get the frame number and write it on the current frame
           size_t index = fn.find_last_of("/");
           if(index == string::npos) {
               index = fn.find_last_of("\\");
           }
           size_t index2 = fn.find_last_of(".");
           string prefix = fn.substr(0,index+1);
           string suffix = fn.substr(index2);
           string frameNumberString = fn.substr(index+1, index2-index-1);
           istringstream iss(frameNumberString);
           int frameNumber = 0;
           iss >> frameNumber;
           rectangle(frame, cv::Point(10, 2), cv::Point(100,20),
                     cv::Scalar(255,255,255), -1);
           putText(frame, frameNumberString.c_str(), cv::Point(15, 15),
                   FONT_HERSHEY_SIMPLEX, 0.5 , cv::Scalar(0,0,0));
           //show the current frame and the fg masks
           imshow("Frame", frame);
           imshow("FG Mask MOG 2", fgMaskMOG2);
           //get the input from the keyboard
           keyboard = waitKey( 30 );
           //search for the next image in the sequence
           ostringstream oss;
           oss &lt;&lt; (frameNumber + 1);
           string nextFrameNumberString = oss.str();
           string nextFrameFilename = prefix + nextFrameNumberString + suffix;
           //read the next frame
           frame = imread(nextFrameFilename);
           if(frame.empty()){
               //error in opening the next image in the sequence
               cerr &lt;&lt; "Unable to open image frame: " &lt;&lt; nextFrameFilename &lt;&lt; endl;
               exit(EXIT_FAILURE);
           }
           //update the path of the current frame
           fn.assign(nextFrameFilename);
       }
    }
    </image></video></backgroundsubtractor></sstream></iostream>
  • cbs_h264 : Fix writing streams with auxiliary pictures

    23 septembre 2017, par Mark Thompson
    cbs_h264 : Fix writing streams with auxiliary pictures
    

    Tested with the alphaconformanceG sample.

    Fixes CID 1419836.

    (cherry picked from commit 9ed18f302b09e444f5b1be01979cce62c4b2c04a)

    • [DH] libavcodec/cbs_h2645.c
  • ffmpeg : always use single threaded decoding for attached pictures

    6 octobre 2017, par Marton Balint
    ffmpeg : always use single threaded decoding for attached pictures
    

    Since af1761f7b5b1b72197dc40934953b775c2d951cc ffmpeg waits for a frame in each
    stream before writing the output header. If we are using threaded decoding for
    attached pictures, we have to read till EOF to be able to finally flush the
    decoder and output the decoded frame. This essentially makes ffmpeg buffer all
    non-attached picture packets, which will cause a "Too many packets buffered for
    output stream" eventually.

    By forcing single threaded decoding, we get a frame from a single packet as
    well and we can avoid the error.

    Fixes part of ticket #6375 :
    ffmpeg -i 46564100.mp3 -acodec libmp3lame -ab 128k -ac 2 out.mp3

    Reviewed-by : Hendrik Leppkes <h.leppkes@gmail.com>
    Signed-off-by : Marton Balint <cus@passwd.hu>

    • [DH] fftools/ffmpeg.c