Recherche avancée

Médias (0)

Mot : - Tags -/content

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (43)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

Sur d’autres sites (8882)

  • Reduce write time in stdin stream

    20 décembre 2020, par گورو سینی

    I'm trying to record the web page with puppeteer. For that I'm using the same approach as puppeteer-recorder ie taking the screenshot for each frame and writing to the spawned ffmpeg's stdin stream with slight modifications.

    


    The average time taken for screenshot per frame comes between 1-2ms but the average time to write the screenshot data into stream comes to be 290-300ms per frame.

    


    const ffmpeg = spawn(ffmpegPath, ffmpegArgs(30));

for (let i = 1; i <= totalFrames; i++) {
  let screenshot = await page.screenshot({ omitBackground: true });  --> 1ms
  await write(ffmpeg.stdin, screenshot);                             --> 290ms
}

ffmpeg.stdin.end();


const write = (stream, buffer) =>
 new Promise((resolve, reject) => {
   stream.write(buffer, error => {
     if (error) reject(error);
     else resolve();
 });
});


const ffmpegArgs = fps => [
  '-y', '-f', 'image2pipe',
  '-r', `${+fps}`,
  '-i', '-',
  '-c:v', 'libx264',
  '-auto-alt-ref', '0',
  '-s:v', '1280x720',
  '-crf', '20',
  '-pix_fmt', 'yuv420p',
  '-metadata:s:v:0', 'alpha_mode="1"',
  '-tune', 'stillimage', 
  '-movflags', '+faststart', 'output.avi'
];


    


    Is there any way to reduce the time taken while writing ? Thanks.

    


  • What kind of library can I use to edit video in real time ? [closed]

    14 avril 2020, par DepressingUtopian

    I am developing a video editor on Android (Java). For video encoding, I use a third-party library built on FFMPEG.

    



    https://github.com/tanersener/mobile-ffmpeg

    



    The problem is that everything that happens in FFMPEG is saved to disk ... For example, you cannot apply a filter to real-time video, you have to wait until the result of applying the filter is reset to disk and counted and displayed on VideoView. Tell the library with which you can apply a filter to a piece of video and see it in real time. Or for example, change the contrast of the video and see it on the VideoView.

    



    Perhaps there is a way to redirect the output stream of encoded video using FFMPEG directly to VideoView ?

    


  • ffmpeg Get time of frames from trimmed video

    17 novembre 2017, par TheOtherguyz4kj

    I am using FFmpeg in my application to extract frames from a video, the frames will be added to a trim video view where you get an illustration as to what is happening in the video at a specific time within the video. So each frame needs to represent some time within the video.

    I dont quite understand how FFmpeg is producing the frames. Here is my code :

    "-i",
    videoCroppedFile.getAbsolutePath(),
    "-vf",
    "fps=1/" + frameSeperation,
    mediaStorageDir.getAbsolutePath() +
    "/%d.jpg"

    My app allows you to record a video at a max length of 20s. The number of frames extracted from the video depnds on how long the captured video is. frameSeperation is calculated doing the below code.

    String time = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION);
       long videoLength = Long.parseLong(time) / 1000;
       double frameSeperationDouble = (double) videoLength;
       // Divide by 11 because there is a maximum of 11 frames on trim video view
       frameSeperationDouble /= 11;
       frameSeperationDouble = Math.ceil(frameSeperationDouble);
       int frameSeperation = (int) frameSeperationDouble;

    Maybe the above logic is very bad, if there is a better way please can somebody tell me.

    Anyway I run the code and below are a few test cases :

    • A video captured with a length of 6 seconds has 7 frames.
    • A video captured with a length of 2 seconds has 3 frames.
    • A video captured with a length of 10 seconds has 12 frames.
    • A video captured with a length of 15 seconds has 9 frames.
    • A video captured with a length of 20 seconds has 11 frames.

    There is no consistency, and I find it hard to put timestamps against each frame because of this. I feel like my logic is wrong or im not understanding. Any help is much appreciated

    Update 1

    So I did what you said in comments :

    final FFmpeg ffmpeg = FFmpeg.getInstance(mContext);
           final File mediaStorageDir = new File(Environment.getExternalStorageDirectory()
                   + "/Android/data/"
                   + mContext.getPackageName()
                   + "/vFrames");

       if (!mediaStorageDir.exists()){
           mediaStorageDir.mkdirs();
       }

       MediaMetadataRetriever retriever = new MediaMetadataRetriever();
       retriever.setDataSource(mContext, Uri.fromFile(videoCroppedFile));
       String time = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION);
       long videoLength = Long.parseLong(time) / 1000;
       double frameSeperationDouble = (double) videoLength / 8;

       retriever.release();

       final String cmd[] = {

               "-i",
               videoCroppedFile.getAbsolutePath(),
               "-vf",
               "fps=1/" + frameSeperationDouble,
               "-vframes," + 8,
               mediaStorageDir.getAbsolutePath() +
               "/%d.jpg"
       };

    I also tried "-vframes=" + 8 at the same point where I put vFrames in cmd. It doesnt seem to work at all now no frames are being extracted from the video