Recherche avancée

Médias (1)

Mot : - Tags -/stallman

Autres articles (12)

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

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

  • Initialisation de MediaSPIP (préconfiguration)

    20 février 2010, par

    Lors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
    Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
    Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
    Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)

Sur d’autres sites (2302)

  • H264 streamed video stutter and freeze with MediaCodec, Android 4.1.2

    5 mars 2015, par Wajih

    I have been trying my heart out to remove the stutter from an android RTSP client.
    Here is my setup

    1. FFMPEG server streams a live video on Win7. The video is 1200x900 in size. The video streamed is in H264 format.
    2. I receive the video packets on android (4.1.2) clinet under JNI which pushes the packet to java - Device is a Samsung Tab4
    3. Packets are decoded using MediaCodec. Once call from JNI to push the packets into MediaCodec, another thread in Java tries to de-queue the data and display them to a SurfaceView (its a GLSurfaceView)

    Despite my efforts of using queue to buffer the packets, changing wait times to 0,-1, 1000000, i am unable to get a clean streamed video. I understand that there is some packet loss (1% to 10%), but I am getting a broken video, with stutter (some call it even jitter). Green patches, pink screens, gray slices. You name it, it is there, the problem seems to be exaggerated when there is a fast movement in the video.
    At the moment I am not sure where the problem lies, I tried a windows version of the client (with ffmpeg decoding) and it works smoothly despite the packet loss.

    What am I doing wrong ? Any guidance is appreciated.
    Below is the client end code for Android and the server end FFMPEG settings I read from a config file.

    // Function called from JNI
       public int decodeVideo(byte[] data, int size, long presentationTimeUs, boolean rtpMarker, int flag)
           {
               if(vdecoder == null)
                   return -1;
               if(currVInbufIdx == -1) {
                   vdecoderInbufIdx = vdecoder.dequeueInputBuffer(1000000); //1000000/*1s*/
                   if(vdecoderInbufIdx < 0) {
                       Log.d("log","decodeVideo@1: frame dropped");
                       vdecoderRet = -1;
                       return vdecoderRet;
                   }
                   currVInbufIdx = vdecoderInbufIdx;
                   currVPts = presentationTimeUs;
                   currVFlag = flag;
                   inputVBuffers[currVInbufIdx].clear();
               }

               vdecoderPos = inputVBuffers[currVInbufIdx].position();
               vdecoderRemaining = inputVBuffers[currVInbufIdx].remaining();
               if(flag==currVFlag && vdecoderRemaining >= size && currVPts == presentationTimeUs
                       && rtpMarker == false
                       /*&&(pos < vbufferLevel || vbufferLevel<=0)*/)
               {
                   /* Queue without decoding */
                   inputVBuffers[currVInbufIdx].put(data, 0,size);
               }
               else
               {

                   if(flag==currVFlag && vdecoderRemaining >= size && currVPts == presentationTimeUs
                           && rtpMarker)
                   {
                       inputVBuffers[currVInbufIdx].put(data, 0, size);
                       queued = true;
                   }
                   Log.d("log", "decodeVideo: submit,"
                           + " pts=" + Long.toString(currVPts)
                           + " position="+inputVBuffers[currVInbufIdx].position()
                           + " capacity="+inputVBuffers[currVInbufIdx].capacity()
                           + " VBIndex="+currVInbufIdx
                           );
                   vdecoder.queueInputBuffer(currVInbufIdx, 0, inputVBuffers[currVInbufIdx].position(), currVPts, currVFlag);

                   //
                   vdecoderInbufIdx = vdecoder.dequeueInputBuffer(1000000);//1000000/*1s*/
                   if(vdecoderInbufIdx >= 0)
                   {
                       currVInbufIdx = vdecoderInbufIdx;
                       currVPts = presentationTimeUs;
                       currVFlag = flag;
                       inputVBuffers[currVInbufIdx].clear();
                       //if(queued == false)
                       {
                           inputVBuffers[vdecoderInbufIdx].put(data, 0, size);

                       }

                   }
                   else
                   {
                       currVInbufIdx = -1;
                       currVPts = -1;
                       vdecoderRet = -1;
                       Log.d("log","decodeVideo@2: frame dropped");                        
                   }
               }              
               return vdecoderRet;
           }

    And here we have the thread that calls for a render

    // Function at android. Called by a separate thread.
       private void videoRendererThreadProc() {

               if(bufinfo == null)
                   bufinfo = new MediaCodec.BufferInfo();
               videoRendered = false;

               Log.d("log", "videoRenderer started.");

               while(!Thread.interrupted() && !quitVideoRenderer)
               {

                   Log.d("log", "videoRendererThreadProc");

                   outbufIdx = vdecoder.dequeueOutputBuffer(bufinfo,1000000);//500000
                   switch (outbufIdx)
                   {
                   case MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED:
                       Log.d("log", "decodeVideo: output buffers changed.");
                       // outputBuffers = vdecoder.getOutputBuffers();
                       break;
                   case MediaCodec.INFO_OUTPUT_FORMAT_CHANGED:
                       Log.d("log", "decodeVideo: format changed - " + vdecoder.getOutputFormat());
                       break;
                   case MediaCodec.INFO_TRY_AGAIN_LATER:
                       // Log.d("log", "decodeVideo: try again later.");
                       break;
                   default:

                       // decoded or rendered
                       videoRendered = true;
                       vdecoder.releaseOutputBuffer(outbufIdx, true);
                       //Log.d("log", "decodeVideo: Rendering...!!!.");    
                   }
               }

               // flush decoder
               //vdecoder.queueInputBuffer(0, 0, 0, 0, MediaCodec.BUFFER_FLAG_END_OF_STREAM);

               outbufIdx = vdecoder.dequeueOutputBuffer(bufinfo, 1000000);//10000
               if(outbufIdx >= 0)
               {
                   vdecoder.releaseOutputBuffer(outbufIdx, true);      
               }  
               bufinfo = null;
               videoRendered = false;
               //
               Log.d("log", "videoRenderer terminated.");
           }

    And the ffmpeg setting at server at as follows.

    [slices] =  4       # --slices
    [threads] = 4       # --threads  
    [profile] = high        # --profile main|baseline
    [preset] = faster       # --preset faster|ultrafast
    [tune] = zerolatency    # --tune
  • Anomalie #3209 : Permettre de supprimer les fusions (group by) explicitement

    29 juin 2016, par RastaPopoulos ♥

    Bon, 2 ans que je l’utilise régulièrement de temps à autre, je l’ai ajouté à Bonux pour le moment, du coup :
    http://zone.spip.org/trac/spip-zone/changeset/98598

  • Anomalie #3763 (Nouveau) : Rendre cohérent et simplifier l’appel à sa propre page d’auteur

    29 mars 2016, par touti touti

    Pour le moment il y a deux pages différentes qui répercutent presque les mêmes infos
    - ?exec=infos_perso qui possède en sus un menu de 3 onglets : Mes informations | Ma langue | Mes préférences) cette page serait à supprimer
    - ?exec=auteur&id_auteur=xx il faudrait juste ajouter ces 3 onglets lorsque l’auteur est reconnu en session

    Ça résoudrait aussi le fait que l’on ne sait pas quel est son propre identifiant auteur à moins de cliquer sur son nom pour ouvrir la page ?exec=infos_perso