Recherche avancée

Médias (91)

Autres articles (112)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

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

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (12562)

  • Failed to capture a avi file using opencv

    30 avril 2017, par Wei

    I am quite new to c++ compilation. I am trying to work on a simple problem using opencv where I read a video file and display it.

    My code looks like :

    #include <opencv></opencv>cv.h>
    #include <opencv></opencv>highgui.h>
    #include "opencv2/opencv.hpp"
    #include <opencv2></opencv2>core/core.hpp>
    #include <opencv2></opencv2>highgui/highgui.hpp>


    #include
    #include

    #include <algorithm>
    #include
    #include
    #include
    #include <fstream>
    #include <iostream>
    #include <vector>
    #include <list>
    #include <string>


    using namespace cv;

    IplImage* image = 0;
    IplImage* prev_image = 0;

    int show = 1;

    int main( int argc, char** argv )
    {
       int frameNum = 0;

       char* video = argv[1];
       VideoCapture capture(video);

       if( !capture.isOpened() ) {
           printf( "Could not initialize capturing..\n" );
           return -1;
       }

       if( show == 1 )
           cvNamedWindow( "Video", 0 );

       while( true ) {
           IplImage* frame = 0;
           int i, j, c;

           // get a new frame
           //frame = cvQueryFrame( capture );
           Mat mat_img;
           capture >> mat_img;
           IplImage frame1 = mat_img.operator IplImage();
           frame = &amp;frame1;
           if( !frame )
               break;

           if( !image ) {
               image =  cvCreateImage( cvSize(frame->width,frame->height), 8, 3 );
               image->origin = frame->origin;
           }

           cvCopy( frame, image, 0 );

           if( show == 1 ) {
               cvShowImage( "Video", image);
               c = cvWaitKey(3);
               if((char)c == 27) break;
           }

           std::cerr &lt;&lt; "The " &lt;&lt; frameNum &lt;&lt; "-th frame" &lt;&lt; std::endl;
           frameNum++;
       }

       if( show == 1 )
           cvDestroyWindow("Video");

       return 0;
    }
    </string></list></vector></iostream></fstream></algorithm>

    Then I compile it like :

    g++ test.cpp -o Video -pipe -D __STDC_CONSTANT_MACROS -D STD=std -Wall -I. -I/usr/local/ -O3 -DNDEBUG -ggdb -L/usr/local/ -lopencv_core -lopencv_highgui -lopencv_video -lopencv_imgproc -lavformat -lavdevice -lavutil -lavcodec -lswscale

    Compilation works fine and no errors returned.

    However, when I was running it, I got :

    (Video:5651): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
    Could not initialize capturing..

    Some other information :
    1. I test my opencv and ffmpeg by running simple examples, which work well.
    2. I can stream frames from my camera and display it using opencv.

    Anyone has idea of what causes this ?

    Any idea is appreciated.

  • FFMPEG : extracting jpegs at 1 fps rate with "-r 1" or "vf fps=fps=1" causes first three frames to be wrong [closed]

    11 avril 2013, par Stefan

    I need to use ffmpeg to extract video stills from a video, one picture per second, starting with second 0. I created a 4min test video with a running timecode (25fps, starting with 00:00:00 running to 03:59:24) If I use either

    ffmpeg -i input.mp4 -f image2 -r 1 still-%d.jpeg

    or

    ffmpeg -i input.mp4 -f image2 -vf fps="fps=1" still-%d.jpeg

    I fail because the first three images do not display expected time codes 00:00:00, 00:01:00, 00:02:00, but 00:00:00, 00:00:01, 00:00:13, and all subsequent images show having frame 13 in their timecode (and not :00). This causes my video preview to be off by 1-2 seconds.

    I had to resort to invoke ffmpeg for each frame, using -ss 0..240 and -vframes 1 to extract exactly one frame at the exact time. This works perfectly, all output files show the timecode of the first frame of that second.

    This method is considerably slower, however, and I'd rather not use it.

    Is there something I missed with the -r option or fps filter ? I tried specifying fps=fps=1:round=zero, but I got an error saying that the key "round" was not found.

    Thank you in advance !

  • Unable to find a suitable output format for "ffmpeg" [duplicate]

    25 mars 2020, par deva

    I’m trying to convert video to mp3 using ffmpeg library. when i execute the commands its fail and logs says :
    Unable to find a suitable output format for "ffmpeg".

    There is my code :

       try {

    String[] cmd = new String[]{"ffmpeg", "-i", selectedVideo.get(i),"-y", dstto};

           if (cmd.length!=0){
               fFmpeg.execute(cmd, new ExecuteBinaryResponseHandler(){

                   @Override

                   public  void onSuccess(String s){

                       Toast.makeText(getApplicationContext(),"success"+ s, Toast.LENGTH_SHORT).show();

                   }



                   @Override

                   public  void onFailure(String s){

                       Toast.makeText(getApplicationContext(),"fail"+ s, Toast.LENGTH_SHORT).show();

                       log.setText(s);

                   }

               });

           }

       } catch (FFmpegCommandAlreadyRunningException e) {

           e.printStackTrace();

       } ```