Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (67)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (14781)

  • How can I avoid an ffmpeg out of memory error

    21 mars 2021, par Silentfury

    I use ffmpeg with complex filtering. Input are different sets of FULLHD surveilance camera videos each 10 to 15 seconds long. Set size (number of videos per set) varies. To remove unchanged frames I apply mpdecimate. To avoid being triggered by moving bushes but still keep objects I want to remain, I apply a complex filter :

    


      

    • split the video (the original and a dummy to detect motion/stills)
    • 


    • scale the dummy down (so the 8x8-block-metric of mpdecimate matches the size of moving objects I want to keep)
    • 


    • add white boxes to dummy to mask unintendedly moving objects
    • 


    • apply mpdecimate to dummy to remove non-changing frames
    • 


    • scale dummy back to original size
    • 


    • overlay the remaining frames of dummy with matching frames of original
    • 


    


    All this works fine if the number of input videos is small (less than 100). The memory consupmtion of the ffmpeg process varies somewhere between 2GiB and 5GiB.

    


    If the number of input files gets larger (say 200), the memory consumption suddenly jumps to insane numbers until memory (32GiB plus 33GiB swap) runs out and ffmpeg gets killed. I can not predict if and why this happens. I have one example, where a set of 340 videos worked using 6GiB. Any other set above 100 videos I tried eats all RAM in under two minutes and dies.

    


    There is no particular error message from ffmpeg.

    


    dmesg says :

    


    Out of memory: Kill process 29173 (ffmpeg)
Killed process 29173 (ffmpeg) total-vm:66707800kB


    


    My ffmpeg command :

    


    ffmpeg -f concat -safe 0 -i vidlist -vf 'split=2[full][masked];[masked]scale=w=iw/4:h=ih/4,drawbox=w=51:h=153:x=101:y=0:t=fill:c=white,drawbox=w=74:h=67:x=86:y=49:t=fill:c=white,drawbox=w=51:h=149:x=258:y=0:t=fill:c=white,drawbox=w=13:h=20:x=214:y=103:t=fill:c=white,drawbox=w=29:h=54:x=429:y=40:t=fill:c=white,drawbox=w=35:h=49:x=360:y=111:t=fill:c=white,drawbox=w=26:h=54:x=304:y=92:t=fill:c=white,drawbox=w=48:h=27:x=356:y=105:t=fill:c=white,drawbox=w=30:h=27:x=188:y=124:t=fill:c=white,drawbox=w=50:h=54:x=371:y=7:t=fill:c=white,drawbox=w=18:h=38:x=248:y=107:t=fill:c=white,drawbox=w=21:h=51:x=242:y=33:t=fill:c=white,mpdecimate=hi=64*80:lo=64*40:frac=0.001,scale=w=iw*4:h=ih*4[deduped];[deduped][full]overlay=shortest=1,setpts=N/(15*TB),mpdecimate=hi=64*80:lo=64*50:frac=0.001,setpts=N/(15*TB)' -r 15 -c:v libx265 -preset slower -crf 37 -pix_fmt yuv420p -an result.mkv


    


    ffmpeg version 4.1.6

    


    Debian 4.19.171-2

    


    I hope that my filter can be tuned in some way that achieves the same result but doesn't eat RAM that much - but I have no clue how. Within reasonable limits, I wouldn't mind if processing time suffers. Any hints appreciated.

    


  • Crop video scale square to round shape -Android

    13 septembre 2019, par Adil

    Currently I’m developing video editing app, in which i want to overlay video to image i used FFMPEG library and use overlay command and export video to video.mp4 format

    Here is done with overlay command :

    private void extractImagesVideo() {
       File moviesDir = Environment.getExternalStoragePublicDirectory(
       Environment.DIRECTORY_PICTURES
    );

    String filePrefix = "extract_picture";
    String fileExtn = ".mp4";

    File dir = new File(moviesDir, "VideoEditor");
    int fileNo = 0;
    while (dir.exists()) {
    fileNo++;
    dir = new File(moviesDir, "VideoEditor" + fileNo);

    }
    dir.mkdir();
    File dest = new File(dir, filePrefix + "%03d" + fileExtn);

    Log.d(TAG, "startTrim: dest: " + dest.getAbsolutePath());

    // String complexCommand[]={"-y","-i",mStrImagePath,"-i",mStrVideoPath,"-filter_complex","[0]scale=720:1280:force_original_aspect_ratio=decrease,drawbox=x=10:y=10:w=100:h=100:color=pink@0.5:t=max: (ow-iw)/2:(oh-ih)/2,setsar=1[backd],[backd][1] overlay=x=(main_w-overlay_w)/(main_w-overlay_w):y=(main_h-overlay_h)","-acodec","copy",dest.getAbsolutePath()};

    String complexCommand[]={"-y","-i",mStrVideoPath,"-f","lavfi","-i","color=c=black:s=1920x1080","-filter_complex","[0:v]scale=w=0.80*iw:h=0.80*ih[scaled],[1:v][scaled]overlay=x=0.10*main_w:y=0.10*main_h:eof_action=endall[out]","-acodec","copy",dest.getAbsolutePath()};


    // String complexCommand[]={"-y","-i",mStrImagePath,"-i",mStrVideoPath,"-filter_complex","[1:v] scale=200:200 [ovr1], [1:v] scale=200:200 [ovrl2], [0:v][ovr1] overlay=25:25:enable='between(t,0,20)' [temp1], [temp1][ovrl2] overlay=50:50:enable='between(t,20,40)'","-acodec","copy",dest.getAbsolutePath()};
    // String complexCommand[]={"-y","-i",mStrImagePath,"-i",mStrVideoPath,"-filter_complex","[0]scale=1024:1280:force_original_aspect_ratio=decrease,pad=1024:1280:(ow-iw)/2:(oh-ih)/2,setsar=1[backd],[backd][1] overlay=x=(main_w-overlay_w)/(main_w-overlay_w):y=(main_h-overlay_h):shortest=1","-acodec","copy",dest.getAbsolutePath()};

    /* Remove -r 1 if you want to extract all video frames as images from the specified time duration.*/
    execFFmpegBinary(complexCommand);
    }

    Issue is video showing square shape i want to crop video into rounded shape, i check almost solutions and check also FFMPEG commands , i found mask overlay on video but isn’t a proper solution

  • How to solve error : "cvCreateFileCaptureWithPreference : backend FFMPEG doesn't support legacy API anymore"

    24 octobre 2018, par Sarvin

    I am trying to build and run an OpenCV project from Github using OpenCV 3.4.2, Cmake 3.13.0-rc1 and VS 2017. The project builds successfully as I understand from the build output but it throws the above warning after I run the program. The video I want to load is in a .AVI format and uses cvCaptureFromAVI function. Just trying to learn OpenCV, your help and kindness is appreciated.

    Source :

    #include <iostream>
    #include <opencv2></opencv2>opencv.hpp>

    #include "package_bgs/PBAS/PixelBasedAdaptiveSegmenter.h"
    #include "package_tracking/BlobTracking.h"
    #include "package_analysis/VehicleCouting.h"

    using namespace cv;

    int main(int argc, char **argv)
    {
     std::cout &lt;&lt; "Using OpenCV " &lt;&lt; CV_MAJOR_VERSION &lt;&lt; "." &lt;&lt;
     CV_MINOR_VERSION &lt;&lt; "." &lt;&lt; CV_SUBMINOR_VERSION &lt;&lt; std::endl;

     /* Open video file */
     CvCapture *capture = 0;

     capture = cvCaptureFromAVI("video.avi");
     if(!capture){
       std::cerr &lt;&lt; "Cannot open video ting tong!" &lt;&lt; std::endl;
       return 1;
     }

     /* Background Subtraction Algorithm */
     IBGS *bgs;
     bgs = new PixelBasedAdaptiveSegmenter;

     /* Blob Tracking Algorithm */



    cv::Mat img_blob;
     BlobTracking* blobTracking;
     blobTracking = new BlobTracking;

     /* Vehicle Counting Algorithm */
     VehicleCouting* vehicleCouting;
     vehicleCouting = new VehicleCouting;

     std::cout &lt;&lt; "Press 'q' to quit..." &lt;&lt; std::endl;
     int key = 0;
     IplImage *frame;
     while(key != 'q')
     {
       frame = cvQueryFrame(capture);
       if(!frame) break;

       cv::Mat img_input = cv::cvarrToMat(frame);
       cv::imshow("Input", img_input);

       // bgs->process(...) internally process and show the foreground mask image
       cv::Mat img_mask;
       bgs->process(img_input, img_mask);

       if(!img_mask.empty())
       {
         // Perform blob tracking
         blobTracking->process(img_input, img_mask, img_blob);

         // Perform vehicle counting
         vehicleCouting->setInput(img_blob);
         vehicleCouting->setTracks(blobTracking->getTracks());
         vehicleCouting->process();
       }

       key = cvWaitKey(1);
     }

     delete vehicleCouting;
     delete blobTracking;
     delete bgs;

     cvDestroyAllWindows();
     cvReleaseCapture(&amp;capture);

     return 0;
    }
    </iostream>

    Error :

    backend FFMPEG doesn't support legacy API anymore