Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (56)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

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

Sur d’autres sites (6931)

  • How to Skip frames while decoding H264 stream ?

    16 septembre 2018, par TTGroup

    I’m using FFMPEG to decode H264 (or H265) RTSP Stream.

    My system have 2 software : Server and Client

    Server: Read frames from RTSP stream --> Forward frames to Client    
    Client: Receive frames from Server --> Decode --> Render

    I have implemented and it worked ok, but there is a case make my system work not good. That is when internet from Server - Client is slow, frames can not transfer real-time to Client.

    In present, I deal with this issue by Skip some frames (not send to Client) when the Queue is reached limit of count. The following is my summary code

    //At Server Software (include 2 threads A and B)
    //Thread A: Read AVPacket and forward to Client
    while(true)
    {
       AVPacket packet;
       av_init_packet(&packet);
       packet.size = 0;
       packet.data = NULL;
       int ret = AVERROR(EAGAIN);
       while (AVERROR(EAGAIN) == ret)
           ret = av_read_frame(pFormatCtx, &packet);
       if(packet.size > 0)
       {
           if(mySendQueue.count < 120) //limit 120 packet in queue
               mySendQueue.Enqueue(packet); ////Thread B will read from this queue, to send packets to Client via TCP socket
           else
               ;//SkipThisFrame ***: No send
       }
    }
    //Thread B: Send To Client via TCP Socket
    While(true)
    {
       AVPacket packet;
       if(mySendQueue.Dequeue(packet))
       {
           SendPacketToClient(packet);
       }
    }

    //At Server Software : Receive AVPacket from Server --> Decode --> Render
    While(true)
    {
       AVPacket packet;
       AVFrame frame;
       ReadPacketFromServer(packet);
       if (av_decode_asyn(pCodecCtx, &frame, &frameFinished, &packet) == RS_OK)
       {
           if (frameFinished)
           {
               RenderFrame(frame);
           }
       }          
    }
    UINT32 __clrcall av_decode_asyn(AVCodecContext *pCodecCtx, AVFrame *frame, int *frameFinished, AVPacket *packet)
    {
       int ret = -1;
       *frameFinished = 0;
       if (packet)
       {
           ret = avcodec_send_packet(pCodecCtx, packet);
           // In particular, we don't expect AVERROR(EAGAIN), because we read all
           // decoded frames with avcodec_receive_frame() until done.
           if (ret < 0 && ret != AVERROR_EOF)
               return RS_NOT_OK;
       }

       ret = avcodec_receive_frame(pCodecCtx, frame);
       if (ret < 0 && ret != AVERROR(EAGAIN))
       {
           return RS_NOT_OK;
       }
       if (ret >= 0)
           *frameFinished = 1;

       return RS_OK;
    }

    My question is focus in line of code SkipThisFrame ***, this algorithm skip frame continuously, so it maybe make the decoder on Client occur unexpectedly error or Crash ?

    And when skip frame like that, make Client Render frames is not normally ?

    And someone call show me the proper algorithm to skip frames in my case ?

    Thank you very much !

  • avformat/mxfenc : Set color siting to 0 for D10-MXF

    6 avril 2018, par Michael Niedermayer
    avformat/mxfenc : Set color siting to 0 for D10-MXF
    

    SMPTE 386M (D-10) lists 4 as value to be used
    SMPTE 377-1-2009 says
    "The definitions of 00h (coSiting) and 04h (Rec 601) are equivalent. The value of 04h is deprecated. New
    MXF encoders shall use the value of 00h instead."

    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavformat/mxfenc.c
  • avformat/dashenc : Set mp4 as the default format for VP9

    23 avril 2018, par Karthick Jeyapal
    avformat/dashenc : Set mp4 as the default format for VP9
    

    There is a separate muxer(webmdashenc.c) for supporting VP9+webm output in DASH.
    Hence in this muxer we will focus on supporting VP9 in MP4
    Have verified playout support of VP9+MP4 in Chrome and Firefox.

    • [DH] libavformat/dashenc.c