Recherche avancée

Médias (91)

Autres articles (49)

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

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

Sur d’autres sites (7053)

  • How to open .mp4 file using JavaCV's FFmpegGrabber in Android ?

    20 août 2015, par 7bitex

    I’m using JavaCV’s FFmpegFrameGrabber to open an mp4 file and grab frames for processing later. The mp4 file is chosen with an ACTION_GET_CONTENT intent which returns a file URI. Here is my code :

    FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(mFileUri.getPath());
    grabber.setFormat("mp4");

    AndroidFrameConverter converter = new AndroidFrameConverter();
    try {
       grabber.start();
       Frame frame;
       while ((frame = grabber.grabFrame()) != null) {
           mImageResult.setImageBitmap(converter.convert(frame));
       }

       grabber.stop();
    } catch (FrameGrabber.Exception ex) {
       Log.e("Detector", ex.getLocalizedMessage());
    }

    But an error occurs saying avformat_open_input() error -13: Could not open input "/storage/emulated/0/DCIM/Camera/VID_20150820_152542.mp4". (Has setFormat() been called?). So where is wrong with my code ?

  • How to set a timeout for FFmpegFrameGrabber grab() method in JavaCV

    18 janvier 2019, par Null Pointer

    I’m trying to create a player in Java using JavaCV. But .grab() method takes different amounts of time for each grab. How can I discard a grab() operation when it takes too much time ?

    In detail : I’m working on a project to display rtsp streams. To do this, I use JavaCV and its FFmpegFrameGrabber class. Inside a loop I call its .grab() method to grab frames and then I print them on a panel.
    (Not knowing the reason) grab() method takes much more time in some calls. For example :

    1. grab : 15ms,
    2. grab : 13ms,
    3. grab : 14ms,
    4. grab : 95ms,
    5. grab : 12ms, ...

    I wish not to wait for a grab, in case it is taking too long like in this fourth call.

    (Sorry for not providing a working code, it’s all over different huge classes)

    I use the following grabber options (selected by some other colleague) :

    grabber.setImageHeight(480);
    grabber.setImageWidth(640);
    grabber.setOption("reconnect", "1");
    grabber.setOption("reconnect_at_eof", "1");
    grabber.setOption("reconnect_streamed", "1");
    grabber.setOption("reconnect_delay_max", "2");
    grabber.setOption("preset", "veryfast");
    grabber.setOption("probesize", "192");
    grabber.setOption("tune", "zerolatency");
    grabber.setFrameRate(30.0);
    grabber.setOption("buffer_size", "" + this.bufferSize);
    grabber.setOption("max_delay", "500000");
    grabber.setOption("stimeout", String.valueOf(6000000));
    grabber.setOption("loglevel", "quiet");
    grabber.start();

    Also I tried to do the grab() in another thread and not wait for that to end in case it takes too long. But this time I get an EXCEPTION_ACCESS_VIOLATION when I call .grab() method before the previous one did not end yet. "Calling .release() ; and .restart() ; methods before trying to grab again" also did not solve the access violation.

    Is there a setting option to cancel unordinarily long grabs ? (Or wouldn’t it work without these frames (because of a reason that I don’t know))

    Thanks

  • Trim video length in Android with javacv and ffmpeg

    11 juillet 2017, par Morya Yaroslav

    I’m trying to trim video length with ffmpeg implementation of FrameGrabber and FrameRecorder, but getting corrupted file of smaller size then it’s going to be. Maybe there is other way to trim video from start time to end time, also updating trim progress. Seems like it’s not recording changes between frames. Maybe there are some other ways to trim videos of different formats like mp4, flv and others. Here is code snippet :

           FrameGrabber grabber = new FFmpegFrameGrabber(mClip.getPath());
           grabber.start();
           grabber.setTimestamp(mClip.getClipStartMs()); // Write from specific moment

           File out = new File(mClip.getOutPutPath(params[0])); // Set destination to write
           FrameRecorder recorder = new FFmpegFrameRecorder(out, grabber.getImageWidth(), grabber.getImageHeight());


           recorder.setFormat(grabber.getFormat());
           recorder.setFrameRate(grabber.getFrameRate());
           recorder.setSampleRate(grabber.getSampleRate());
           recorder.setAspectRatio(grabber.getAspectRatio());
           recorder.setSampleFormat(grabber.getSampleFormat());

           recorder.setAudioCodec(grabber.getAudioCodec());
           recorder.setAudioBitrate(grabber.getAudioBitrate());
           recorder.setAudioChannels(grabber.getAudioChannels());

           recorder.setVideoCodec(grabber.getVideoCodec());
           recorder.setVideoBitrate(grabber.getVideoBitrate());

           recorder.start();

           Frame frame;
           Long timestamp;
           Long fullLength = mClip.getClipEndMs() - mClip.getClipStartMs();
           double percent = 0d, oldPercent = 0d;

           while ((frame = grabber.grabFrame()) != null && (timestamp = grabber.getTimestamp()) <= mClip.getClipEndMs()) {
               Log.d(ASYNC_SAVE_TAG, "Started command : ffmpeg " + mClip.toString());

               if (timestamp != 0d) {
                   oldPercent = percent;
                   percent = timestamp.doubleValue() / fullLength.doubleValue();
                   if (MathUtil.compare(percent, oldPercent) != 0) {
                       publishProgress(percent);
                   }
               }

               recorder.setTimestamp(grabber.getTimestamp() - mClip.getClipStartMs());
               recorder.record(frame);
           }

           grabber.close();
           recorder.close();