Recherche avancée

Médias (0)

Mot : - Tags -/xml-rpc

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

Autres articles (62)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (9885)

  • Reading a File while it is being written by FFMPEG

    29 mai 2014, par Haris Tasawar

    As the title suggests, i am in the process of creating a client/server application where the server(PHP) reads a file which is being written on by ffmpeg and then outputs it to the client(JAVA). I have succeeded in writing the server script in php which initiates the ffmpeg and then after a while starts to read the file and concurrently sends it to the JAVA client, the problem is that after a while the client stops to receive any sort of data and then just quits, For example if i have a 5MB file, it would read only 12KB and then it quits. Could someone tell what can be the issue here ? Is it on the server side or on the client side.
    For References i am attaching both the reading of file code in php and the client side code.

    Code For Reading the file while FFMPEG converts the file(PHP) :

    $file = 'D:\\'.$destination;
    $fp = @fopen($file, 'r');
    //ob_end_clean();  
    header('Content-Description: File Transfer');
    header('Content-Type: application/octet-stream');
    header("Cache-control: private");
    header('Pragma: private');
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    header('Content-Length: ' . filesize($file));

    $buffer = 4096;
    while(!feof($fp)) {

    usleep(300000);
    echo fread($fp, $buffer);
    ob_flush();
    flush();


    }
    fclose($fp);
    exit();

    Code For reading the File transferred by PHP (JAVA) :

    URL u = new URL(streamURL);

                   clientSocket = (HttpURLConnection) u.openConnection();

                   if( clientSocket.getResponseCode() == HttpURLConnection.HTTP_OK ){
                   //clientSocket.setReadTimeout(0);
                   inRemoteStream = clientSocket.getInputStream();


                   while (((count = inRemoteStream.read(buf)) != -1)) {
                       offset += count;
                       System.out.println(offset);
                       fileOutputStream.write(buf, 0, count);
                       setVideoOffset(offset, contentLength);
                   }

    I`ll be very happy if someone can solve this problem for me :) .

  • Real-time video render

    21 août 2014, par Max Grigoriev

    We’re staring a new project where we should be able to modify on the fly video - add text, insert image.
    Project is planing to be written in Java.
    I’m a newbie in video processing so I want to understand.
    What is the best and fast solution to modify video and return to client (web browser).
    I can easy do it using ffmpeg but mp4 is not streamable. And I should write it to file first and then return to client - it’s not fast.
    Maybe my question is very abstract but I should to start from somewhere :)

    Thanks

  • 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 !