Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

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

Autres articles (42)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Les images

    15 mai 2013
  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

Sur d’autres sites (6784)

  • Anomalie #4282 (Nouveau) : confusion debut_forum et début_forums avec et sans S

    30 janvier 2019, par jluc -

    Dans les pages de présentation des forums dans le privé de SPIP, l’argument d’url debut_forum est parfois employé pour les accés directs aux forums (avec @) alors que c’est debut_forums (avec un S) qu’il faut employer.

    Ça se produit sur toutes les listes de forum. Par exemple https://contrib.spip.net/ecrire/?exec=controler_forum&debut_forums=50#pagination_forums
     : c’est la 50eme page de forums.
    Si je clique sur "Bravo pour cette amélioration", l’url devient https://contrib.spip.net/ecrire/?exec=controler_forum&debut_forums=50&debut_forum=%40499747#forum499747
    Dans l’url il y a à la fois debut_forum et debut_forums avec un s (et l’ancre #forum499747)
    Mais l’arg sans le s, qui ici indique le @, ne sert à rien. Il aurait du y avoir un S et écraser l’autre (50)
    C’est pas gênant tant qu’on reste sur la même page car l’ancre fait le boulot mais si on revient dans 1 an, l’url ne pointera plus sur la bonne page car il y aura eu plein de forums entre temps

    On peut vérifier par l’url sans le debut_forums (correct) mais avec le debut_forum (eronnée et inutile)
    https://contrib.spip.net/ecrire/?exec=controler_forum&debut_forum=%40499747#forum499747
    Elle amène sur la première page, qui n’a pas le forum demandé puisqu’il est en page 50

    Par contre l’url avec debut_forums=@... (avec s) seulement amène direct au forum demandé
    donc https://contrib.spip.net/ecrire/?exec=controler_forum&debut_forums=%40499747#forum499747

    Idem sur les listes de forum d’un article. Exemple https://contrib.spip.net/ecrire/?exec=controler_forum&objet=article&id_objet=3364&debut_forums=50&debut_forum=%40494097#forum494097

    On trouve des occurences de debut_forum
    - dans forum/prive/modeles/forum.html
    - dans forum/prive/objets/liste/forum.html
    - dans forum/urls/generer_url_ecrire_forum.html

  • Evolution #3849 : Affiner/retirer les disallow de robots.txt qui empêchent les sites SPIP de se ré...

    28 octobre 2016, par Spipmalion Dupond

    Merci pour ta réponse
    Effectivement, je viens d’activer la compression et cela va régler la plupart des problèmes d’accès par Google

    C’est quand même embêtant pour les sites qui n’activent pas la compression puisqu’elle n’est pas obligatoire, et aussi la compression ne compresse pas 100% des fichiers chez moi : http://forum.spip.net/fr_265551.html

  • How to update a byte array in a method, without running it again ?

    18 février 2016, par AR792

    I have a class(an AsyncTask) which does image processing and generates yuv bytes continously, at around 200ms interval.

    Now I send these yuv bytes to another method where the they are recorded using FFmpeg frame recorder :

    public void recordYuvData() {

           byte[] yuv = getNV21();
           System.out.println(yuv.length + "  returned yuv bytes  ");
           if (audioRecord == null || audioRecord.getRecordingState() != AudioRecord.RECORDSTATE_RECORDING) {
               startTime = System.currentTimeMillis();
               return;
           }
           if (RECORD_LENGTH > 0) {
               int i = imagesIndex++ % images.length;
               yuvimage = images[i];
               timestamps[i] = 1000 * (System.currentTimeMillis() - startTime);
           }
           /* get video data */
           if (yuvimage != null && recording) {
               ((ByteBuffer) yuvimage.image[0].position(0)).put(yuv);

               if (RECORD_LENGTH <= 0) {
                   try {
                       long t = 1000 * (System.currentTimeMillis() - startTime);
                       if (t > recorder.getTimestamp()) {
                           recorder.setTimestamp(t);
                       }
                       recorder.record(yuvimage);
                   } catch (FFmpegFrameRecorder.Exception e) {

                       e.printStackTrace();
                   }
               }
           }
       }

    This method ; recordYuvData() is initiated on button click.

    1. If I initiate it only once , then only the initial image gets recorded, rest are not.

    2. If I initiate this each time after the end of the image processing it records but leads to ’weird’ fps count of the video ; and finally this leads to application crash after sometime.

      For above what I feel is, at the end of image processing a new instance of recordYuvData() is created without ending the previous one, accumulating many instances of recordYuvData(). [correct me if I am wrong]

    So, how do I update ’ONLY’ yuv bytes in the method without running it again ?

    Thanks....!

    Edit :

    On Click :

       record.setOnClickListener(new View.OnClickListener() {
           @Override
           public void onClick(View v) {
               recordYuvdata();
               startRecording();

    getNV21()

    byte[] getNV21(Bitmap bitmap) {

       int inputWidth = 1024;
       int inputHeight = 640;
       int[] argb = new int[inputWidth * inputHeight];

       bitmap.getPixels(argb, 0, inputWidth, 0, 0, inputWidth, inputHeight);
       System.out.println(argb.length + "@getpixels ");


       byte[] yuv = new byte[inputWidth * inputHeight * 3 / 2];
       encodeYUV420SP(yuv, argb, inputWidth, inputHeight);

       return yuv;

    }

    void encodeYUV420SP(byte[] yuv420sp, int[] argb, int width, int height) {
       final int frameSize = width * height;

       int yIndex = 0;
       int uvIndex = frameSize;
       System.out.println(yuv420sp.length + " @encoding " + frameSize);

       int a, R, G, B, Y, U, V;
       int index = 0;
       for (int j = 0; j < height; j++) {
           for (int i = 0; i < width; i++) {

               a = (argb[index] & 0xff000000) >> 24; // a is not used obviously
               R = (argb[index] & 0xff0000) >> 16;
               G = (argb[index] & 0xff00) >> 8;
               B = (argb[index] & 0xff) >> 0;

               // well known RGB to YUV algorithm

               Y = ((66 * R + 129 * G + 25 * B + 128) >> 8) + 16;
               U = ((-38 * R - 74 * G + 112 * B + 128) >> 8) + 128;
               V = ((112 * R - 94 * G - 18 * B + 128) >> 8) + 128;

               // NV21 has a plane of Y and interleaved planes of VU each sampled by a factor of 2
               //    meaning for every 4 Y pixels there are 1 V and 1 U.  Note the sampling is every other
               //    pixel AND every other scanline.
               yuv420sp[yIndex++] = (byte) ((Y < 0) ? 0 : ((Y > 255) ? 255 : Y));
               if (j % 2 == 0 && index % 2 == 0) {
                   yuv420sp[uvIndex++] = (byte) ((V < 0) ? 0 : ((V > 255) ? 255 : V));
                   yuv420sp[uvIndex++] = (byte) ((U < 0) ? 0 : ((U > 255) ? 255 : U));
               }

               index++;
           }
       }
    }