Recherche avancée

Médias (0)

Mot : - Tags -/api

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

Autres articles (17)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • 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 (5026)

  • How to get the latest frames in ffmpeg, not the next frame

    6 novembre 2014, par LawfulEvil

    I have an application which connects to an RTSP camera and processes some of the frames of video. Depending on the camera resolution and frame rate, I don’t need to process all the frames and sometimes my processing takes a while. I’ve designed things so that when the frame is read, its passed off to a work queue for another thread to deal with. However, depending on system load/resolution/frame rate/network/file system/etc, I occasionally will find cases where the program doesn’t keep up with the camera.

    I’ve found that with ffmpeg(I’m using the latest git drop from mid october and running on windows) that being a couple seconds behind is fine and you keep getting the next frame, next frame, etc. However, once you get, say, 15-20 seconds behind that frames you get from ffmpeg occasionally have corruption. That is, what is returned as the next frame often has graphical glitches (streaking of the bottom of the frame, etc).

    What I’d like to do is put in a check, somehow, to detect if I’m more than X frames behind the live stream and if so, flush the caches frames out and start fetching the latest/current frames.

    My current snippet of my frame buffer reading thread (C++) :

    while(runThread)
    {
       av_init_packet(&(newPacket));

       int errorCheck = av_read_frame(context, &(newPacket));
       if (errorCheck < 0)
       {
           // error
       }
       else
       {

           int frameFinished = 0;
           int decodeCode = avcodec_decode_video2(ccontext, actualFrame, &frameFinished, &newPacket);

           if (decodeCode <0)
           {
               // error
           }
           else
           if (decodeCode == 0)
           {
               // no frame could be decompressed / decoded / etc
           }
           else
           if ((decodeCode > 0) && (frameFinished))
           {
               // do my processing / copy the frame off for later processing / etc
           }
           else
           {
               // decoded some data, but frame was not finished...
               // Save data and reconstitute the pieces somehow??
               // Given that we free the packet, I doubt there is any way to use this partial information
           }
           av_free_packet(&(newPacket));
       }
    }

    I’ve google’d and looked through the ffmpeg documents for some function I can call to flush things and enable me to catch up but I can’t seem to find anything. This same sort of solution would be needed if you wanted to only occasionally monitor a video source(eg, if you only wanted to snag one frame per second or per minute). The only thing I could come up with is disconnecting from the camera and reconnecting. However, I still need a way to detect if the frames I am receiving are old.

    Ideally, I’d be able to do something like this :

    while(runThread)
    {
       av_init_packet(&(newPacket));

       // Not a real function, but I'd like to do something like this
       if (av_check_frame_buffer_size(context) > 30_frames)
       {
           // flush frame buffer.
           av_frame_buffer_flush(context);
       }

       int errorCheck = av_read_frame(context, &(newPacket));

       ...
       }
    }
  • minimum set of required Atoms/Boxes for mpeg-4 container with H.264 (one stream, progressive video, without audio)

    3 juin 2022, par goe1zorbey

    I need to encapsulate H.264 video into a mpeg-4 container. What are the absolute minimum set of boxes/atoms do I need to have ? 
Contained H.264 video is progressive, containing 30fps video, YUV420p, without audio, no subtitles, no program information. Only one stream. No performance or file size optimization required.
It will be non-fragmented mp4 for the time being. 
Would it make things simpler to have it fragmented ? performance can be modest.

    


  • Play a Video from MemoryStream, Using FFMpeg

    7 juin 2014, par Delphi.Boy

    I’m having a hard time, searching how to play a video file from a TMemoryStream (or a similar buffer in memory) using FFMpeg. I’ve seen many things, including UltraStarDX, expensive FFMpeg components for Delphi and so on.

    One component called FFMpeg Vcl Player claims to play video formats from a memory stream. I downloaded the trial version and I guess it uses CircularBuffer.pas for that matter (maybe).

    Does any one know how to do this ?

    Edit :
    Now the better question is how to play an encrypted video file, using FFMpeg or similar libraries.