Recherche avancée

Médias (1)

Mot : - Tags -/berlin

Autres articles (62)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • Configuration spécifique d’Apache

    4 février 2011, par

    Modules spécifiques
    Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
    Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
    Création d’un (...)

Sur d’autres sites (7726)

  • FFMPEGmediametadataretriever not getting all frames from video

    25 décembre 2019, par Zain Aftab

    I am developing an application that takes a local video file and extracts its frames and write on disk. I am using ffmpegmediametadataretriever to extract frames from videos. I have done the following code

      retriever.setDataSource(activity, uri);
      Log.e("duration -> ", retriever.extractMetadata(FFmpegMediaMetadataRetriever.METADATA_KEY_DURATION));
      long duration = Long.parseLong(retriever.extractMetadata(FFmpegMediaMetadataRetriever.METADATA_KEY_DURATION));
      int everyNFrame = 1;
      double frameRate = Double.parseDouble(retriever.extractMetadata(FFmpegMediaMetadataRetriever.METADATA_KEY_FRAMERATE));
      Log.e("all metadata", retriever.getMetadata().getAll().toString());
      long sec = Math.round(1000 * 1000 / (frameRate));
      Bitmap bitmap;
    // Bitmap bitmap2;
    // Log.e(" timeskip ", sec + "   -----------   " + (frameRate * 1000));
      for (long i = 1000; i < duration * 1000; i += sec)
    // for (long i = sec; i < duration * 1000 && !stopWorking; i += sec)//30*sec)
    // for(int i=1000000;iimg_" + (i) + ".jpg");
                     Log.e("filename->", path + "/img_" + i + ".jpg");
                     bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);
                     bitmap.recycle();
                     Thread.sleep(75);
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
             }
          }
       }

    It is not extracting all the frames from the video. for some videos frames extracted are repeated. Random number of frames are extracted for different videos. for some videos, 70-80% frames are extracted and for some only 15-20 frames are extracted.

    I have gone through all the answers I could find on StackOverflow and other websites to find a solution but the issue is there.

  • How to create an animated GIF using FFMPEG with an interval ?

    26 octobre 2014, par Jeff Wilbert

    Hello fellow overflowers,

    A brief overview of what I’m trying to accomplish ; I have a site that will accept video uploads, uploads get converted into the mp4 format to be uniformed and playable on the web using one of the many available players. That part is all fine and dandy.

    The problem now is I want to show the user a short scaled preview (animated gif) of the video before they click to play it. The code I’m working with now is

    ffmpeg -i test.mp4 -vf scale=150:-1 -t 10 -r 1 test.gif

    Which works for creating a scaled animated gif with a fixed width of 150px at a rate of 1 frame per second but its only an animation of the first 10 seconds of the video. I’m trying to do something that spreads out the frame gap to cover the whole video length but create an animated gift that’s no more then 10 seconds long.

    For example say I have a video that’s 30 seconds I want the gif to be 10 seconds long but cover frames of the entire 30 seconds so it might start at frame 3 or 3 seconds in and create a frame in the gif, then at 6 seconds in the video create another frame, then 9 seconds in another, and so forth where the final outcome is

       example video 30 seconds long          example video 1 minute 45 second long

    video position - gif frame/per second      video position - gif frame/per second
         00:03:00   1                               00:10:50   1
         00:06:00   2                               00:21:00   2
         00:09:00   3                               00:31:50   3
         00:12:00   4                               00:42:00   4
         00:15:00   5                               00:52:50   5
         00:18:00   6                               01:03:00   6
         00:21:00   7                               01:13:50   7
         00:24:00   8                               01:24:00   8
         00:27:00   9                               01:34:50   9
         00:30:00   10                              01:45:00   10

     3 second interval between frames         10.5 second interval between frames

    Where you end up with an animated gif that’s 10 seconds long showing a preview of the entire video no matter the length of it. Which basically just boils down to
    video length / 10 (length of desired animated gif) = interval to use between frames but I don’t know how I can use that data to accomplish my problem...

    So does anyone have an idea or suggestion on how this can be accomplished with relative ease ? I can probably do it by calculating the length through code and running a command to extract each individual frame from the video that’s needed then generate a gif from the images but I’d like to be able to do it all with just one command. Thanks.

  • Can I know the exact timestamps of a ffmpeg trim ?

    17 juin 2021, par Vincent Garcia

    I want to trim very long video (e.g. >20h long) and I use ffmpeg this way :

    


    ffmpeg -ss 7200 -i /path/to/my/video.mp4 -t 600 -codec copy out.mp4


    


    This is supposed to provide a trim of 10 minutes starting 2 hours in the input video.
As I read online, by placing -ss before the -i option, I'll get an approximate trim.

    


    Is there a way to know precisely when the trim actually started ?

    


    Thank you.