Recherche avancée

Médias (91)

Autres articles (27)

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

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

Sur d’autres sites (3553)

  • What is video timescale, timebase, or timestamp in ffmpeg ?

    28 février 2020, par Please Help

    There does not seem to be any explanation online as to what these are. People talk about them a lot. I just want to know what they are and why they are significant. Using -video_track_timescale, how would I determine a number for it ? Is it random ? Should it be 0 ?

  • How to tell if faststart for video is set using ffmpeg or ffprobe

    5 septembre 2022, par jsherk

    I am having trouble figuring out how to determine if faststart is set on an MP4 video.

    



    I understand that "moov atom" is the data that needs to be located at the beginning of the file for faststart to be enabled, instead of at the end of the file.

    



    I specifically want to use ffmpeg or ffprobe to determine if it has been moved to the beginning or not already.

    



    On a side note, I understand I can run the following command to move it from the end to the beginning (but I want to find out if it is already there) :

    



    ffmpeg -i infile.mp4 -map 0 -c:v copy -c:a copy -c:s copy -c:d copy -c:t copy -movflags +faststart outfile.mp4


    


  • OpenCV's VideoCapture::open Video Source Dialog

    13 novembre 2015, par swtdrgn

    In my current project, when I call VideoCapture::open(camera device index) and the camera is in used by another program, it shows a Video Source dialog and returns true when I select a device that is already in use.

    However, in my [previous] experiment project, when I called VideoCapture::open(camera device index), it doesn’t show this dialog.

    I want to know what is causing the Video Source dialog to show and the program to behave differently from the experimental project.

    This is the source code to the experiment project :

    int main (int argc, char *argv[])
    {

       //vars
       time_duration td, td1;
       ptime nextFrameTimestamp, currentFrameTimestamp, initialLoopTimestamp, finalLoopTimestamp;
       int delayFound = 0;
       int totalDelay= 0;

       // initialize capture on default source
       VideoCapture capture;
       std::cout << "capture.open(0): " << capture.open(0) << std::endl;
       std::cout << "NOOO" << std::endl;
       namedWindow("video", 1);

       // set framerate to record and capture at
       int framerate = 15;

       // Get the properties from the camera
       double width = capture.get(CV_CAP_PROP_FRAME_WIDTH);
       double height = capture.get(CV_CAP_PROP_FRAME_HEIGHT);

       // print camera frame size
       //cout << "Camera properties\n";
       //cout << "width = " << width << endl <<"height = "<< height << endl;

       // Create a matrix to keep the retrieved frame
       Mat frame;

       // Create the video writer
       VideoWriter video("capture.avi",0, framerate, cvSize((int)width,(int)height) );

       // initialize initial timestamps
       nextFrameTimestamp = microsec_clock::local_time();
       currentFrameTimestamp = nextFrameTimestamp;
       td = (currentFrameTimestamp - nextFrameTimestamp);

       // start thread to begin capture and populate Mat frame
       boost::thread captureThread(captureFunc, &frame, &capture);
       // loop infinitely
       for(bool q=true;q;)
       {
           if(frame.empty()){continue;}
           //if(cvWaitKey( 5 ) == 'q'){ q=false; }
           // wait for X microseconds until 1second/framerate time has passed after previous frame write
           while(td.total_microseconds() < 1000000/framerate){
               //determine current elapsed time
               currentFrameTimestamp = microsec_clock::local_time();
               td = (currentFrameTimestamp - nextFrameTimestamp);
               if(cvWaitKey( 5 ) == 'q'){
                   std::cout << "B" << std::endl;
                   q=false;
                   boost::posix_time::time_duration timeout = boost::posix_time::milliseconds(0);
                   captureThread.timed_join(timeout);
                   break;
               }
           }

           // determine time at start of write
           initialLoopTimestamp = microsec_clock::local_time();

           // Save frame to video
           video << frame;
           imshow("video", frame);

           //write previous and current frame timestamp to console
           cout << nextFrameTimestamp << " " << currentFrameTimestamp << " ";

           // add 1second/framerate time for next loop pause
           nextFrameTimestamp = nextFrameTimestamp + microsec(1000000/framerate);

           // reset time_duration so while loop engages
           td = (currentFrameTimestamp - nextFrameTimestamp);

           //determine and print out delay in ms, should be less than 1000/FPS
           //occasionally, if delay is larger than said value, correction will occur
           //if delay is consistently larger than said value, then CPU is not powerful
           // enough to capture/decompress/record/compress that fast.
           finalLoopTimestamp = microsec_clock::local_time();
           td1 = (finalLoopTimestamp - initialLoopTimestamp);
           delayFound = td1.total_milliseconds();
           cout << delayFound << endl;

           //output will be in following format
           //[TIMESTAMP OF PREVIOUS FRAME] [TIMESTAMP OF NEW FRAME] [TIME DELAY OF WRITING]
           if(!q || cvWaitKey( 5 ) == 'q'){
               std::cout << "C" << std::endl;
               q=false;
               boost::posix_time::time_duration timeout = boost::posix_time::milliseconds(0);
               captureThread.timed_join(timeout);
               break;
           }
       }

       // Exit
       return 0;
    }

    Video Source Dialog