Recherche avancée

Médias (91)

Autres articles (4)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

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

  • FFmpeg AVERROR(EAGAIN) error when call avcodec receive for h264

    7 mai 2019, par Ksilon

    I’m working with ffmpeg 4.1 and I’m showing live streams of multiple cameras, h264 and h265.

    My program collects packets of the same frame and then calls decodeVideo function. Actually it sends all packets of a frame at once.

    Program works well if there is no missing packets. When I remove packet in random I-frames, both h264 and h265 streams work as expected (jumps some seconds but continues streaming).

    When I remove packet in random P-frame from h265 streams, avcodec_send_packet function gives AVERROR_INVALIDDATA and streams continue.

    However when I remove packet in random P-frame from h264 streams, avcodec_send_packet function gives 0. Then avcodec_receive_frame function gives AVERROR(EAGAIN) continuously and streams freeze.

    void decodeVideo(array^ data, int length, AvFrame^ finishedFrame)
    {  
       AVPacket* videoPacket = new AVPacket();
       av_init_packet(videoPacket);
       pin_ptr<unsigned char="char"> dataPtr = &amp;data[0];
       videoPacket->data = dataPtr;
       videoPacket->size = length;            

       int retVal = avcodec_send_packet((AVCodecContext*)context, videoPacket);
       if(retVal &lt; 0)
       {
           if (retVal == AVERROR_EOF)
               Utility::Log->ErrorFormat("avcodec_send_packet() return value is AVERROR_EOF.");
           else if( retVal == AVERROR_INVALIDDATA)
               Utility::Log->ErrorFormat("avcodec_send_packet() INVALID DATA!");
           else
               Utility::Log->ErrorFormat("avcodec_send_packet() return value is negative:{0}",retVal);
       }
       else
       {                  
           int receive_frame = avcodec_receive_frame((AVCodecContext*)context, (AVFrame*)finishedFrame);

           if (receive_frame == AVERROR(EAGAIN))
               Utility::Log->ErrorFormat("avcodec_receive_frame() returns AVERROR(EAGAIN)");
           else if(receive_frame == AVERROR_EOF)
               Utility::Log->ErrorFormat("avcodec_receive_frame() returns AVERROR(AVERROR_EOF)");
           else
               Utility::Log->ErrorFormat("avcodec_receive_frame() return value is negative:{0}",receive_frame);
       }  

       av_packet_unref(videoPacket);
       delete videoPacket;
    }
    </unsigned>

    EDIT

    When I add avcodec_flush_buffers like shown, my problem is temporarily solved. However it freeze again after a while.

    if(receive_frame == AVERROR(EAGAIN))
    {
       Utility::Log->ErrorFormat("avcodec_receive_frame() returns AVERROR(EAGAIN)");
       avcodec_flush_buffers((AVCodecContext*)context);
    }

    Tested with ffmpeg version 4.1.1 same results.

    Find an ffmpeg version like 2.5 decode function is different but there is no problem when i remove packets. However I’m working with h265 streams too.

    EDIT2

    AVCodecID id = AVCodecID::AV_CODEC_ID_H264;
    AVCodec* dec = avcodec_find_decoder(id);
    AVCodecContext* decContext = avcodec_alloc_context3(dec);

    After these lines, my code included the following lines. When i delete them, there is no problem now.

    if(dec->capabilities &amp; AV_CODEC_CAP_TRUNCATED)
       decContext->flags |= AV_CODEC_FLAG_TRUNCATED;

    decContext->flags2 |= AV_CODEC_FLAG2_CHUNKS;
  • how to run ffmpeg terminal (mac) command in java

    18 avril 2016, par Hasan

    I use FFmpeg codec in order to do the video conversion. This time I have a huge number of videos, so I am trying to do the video conversion automatically.

    I am trying to do so like this in java.

    Runtime.getRuntime().exec("ffmpeg -video_size 1920x1080 -r 25 -pixel_format yuv422p -i input.yuv -vf yadif  output.yuv");

    But my java program returns the following error :

    Cannot run program "ffmpeg": error=2, No such file or directory

    Does anyone has any clue how I can do it in java ?

  • Nvidia Cuda video decoder- Purpose of CUVIDMPEG4PICPARAMS and CUVIDH264PICPARAMS

    27 octobre 2016, par Gurrala

    When I am going through the NVIDIA Cuda decoder, the cuvidDecodePicture returns a pointer to CUVIDPICPARAMS. However the CUVIDPICPARAMS contains a union which holds two separate variables for CUVIDMPEG4PICPARAMS and CUVIDH264PICPARAMS.

    When decoding H.264(AVC) video which structure should I use for the post processing ?