Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (38)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

Sur d’autres sites (7116)

  • Updating SDL yuv Texture

    15 juin 2015, par madprogrammer2015

    I am receiving an H.264 video stream and successfully decoding it with FFMPEG. It can display the first frame of data but then after that the screen never updates. It just appears to become a static image. I am using YUV pixel format, and I am receiving it in that format as well. Also I am using SDL_UpdateYUVTexture().

    Here is my code :

    int main()
    {
       WORD wVersionRequested;
       WSADATA wsaData;
       int wsaerr;

       if (SDL_Init(SDL_INIT_EVERYTHING)) {
           fprintf(stderr, "Could not initialize SDL - %s\n", SDL_GetError());
           exit(1);
       }

       // Using MAKEWORD macro, Winsock version request 2.2
       wVersionRequested = MAKEWORD(2, 2);

       wsaerr = WSAStartup(wVersionRequested, &wsaData);

       if (wsaerr != 0)
       {
           /* Tell the user that we could not find a usable */
           /* WinSock DLL.*/
           printf("The Winsock dll not found!\n");
           return 0;
       }
       else
       {
           printf("The Winsock dll found!\n");
           printf("The status: %s.\n", wsaData.szSystemStatus);
       }

       /* Confirm that the WinSock DLL supports 2.2.*/
       /* Note that if the DLL supports versions greater    */
       /* than 2.2 in addition to 2.2, it will still return */
       /* 2.2 in wVersion since that is the version we      */
       /* requested.                                        */
       if (LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 2)
       {
           /* Tell the user that we could not find a usable */
           /* WinSock DLL.*/
           printf("The dll do not support the Winsock version %u.%u!\n", LOBYTE(wsaData.wVersion), HIBYTE(wsaData.wVersion));
           WSACleanup();
           return 0;
       }
       else
       {
           printf("The dll supports the Winsock version %u.%u!\n", LOBYTE(wsaData.wVersion), HIBYTE(wsaData.wVersion));
           printf("The highest version this dll can support: %u.%u\n", LOBYTE(wsaData.wHighVersion), HIBYTE(wsaData.wHighVersion));
       }

       ULONG              localif;
       /*INT Ret;
       HANDLE ThreadHandle;
       DWORD ThreadId;
       WSAEVENT AcceptEvent;
       char               buf[1024];
       int                buflen = 1024, rc, err;*/

       SOCKET s;
       SOCKET ns;
       SOCKADDR_IN        multi, safrom;
       int fromlen;

       int totalSize = 0;

       AVCodec *codec;
       AVCodecContext *codecContext;
       int frame;
       int got_picture;
       AVFrame *picture;
       AVPacket packet;
       SwsContext* convertContext;
       uint16_t i = 1;
       //std::queue<madproto> queue;
       //std::list<madproto> list;
       AVCodecParserContext *parser;
       std::vector buffer;
       //moodycamel::ConcurrentQueue<madproto> protoQueue;

       SDL_Window *window;
       SDL_Renderer *renderer;
       SDL_Texture *bmp;
       SDL_Rect rect;

       file.open("log.txt");

       s = socket(AF_INET, SOCK_STREAM, IPPROTO_RM);

       multi.sin_family = AF_INET;
       multi.sin_port = htons(5150);
       multi.sin_addr.s_addr = inet_addr("234.5.6.7");
       int bindResult = bind(s, (PSOCKADDR)&amp;multi, sizeof(multi));

       if (bindResult &lt; 0)
       {
           std::cout &lt;&lt; "bindResult: " &lt;&lt; WSAGetLastError() &lt;&lt; std::endl;
       }

       listen(s, 10);

       //if ((AcceptEvent = WSACreateEvent()) == WSA_INVALID_EVENT)
       //{
       //  printf("WSACreateEvent() failed with error %d\n", WSAGetLastError());
       //  return 1;
       //}
       //else
       //  printf("WSACreateEvent() is OK!\n");

       //// Create a worker thread to service completed I/O requests
       //if ((ThreadHandle = CreateThread(NULL, 0, WorkerThread, (LPVOID)AcceptEvent, 0, &amp;ThreadId)) == NULL)
       //{
       //  printf("CreateThread() failed with error %d\n", GetLastError());
       //  return 1;
       //}
       //else
       //  printf("CreateThread() should be fine!\n");

       localif = inet_addr("192.168.1.2");
       setsockopt(s, IPPROTO_RM, RM_ADD_RECEIVE_IF, (char *)&amp;localif, sizeof(localif));

       fromlen = sizeof(safrom);
       ns = accept(s, (SOCKADDR *)&amp;safrom, &amp;fromlen);

       closesocket(s);  // Don't need to listen anymore

       std::string received;

       av_register_all();

       int horizontal = 0;
       int vertical = 0;

       GetDesktopResolution(horizontal, vertical);

       codec = avcodec_find_decoder(CODEC_ID_H264);
       if (!codec) {
           std::cout &lt;&lt; "codec not found" &lt;&lt; std::endl;
           std::cin.get();
       }

       codecContext = avcodec_alloc_context3(codec);

       /*if (codec->capabilities &amp; CODEC_CAP_TRUNCATED)
           codecContext->flags |= CODEC_FLAG_TRUNCATED;*/

       //codecContext->flags |= CODEC_FLAG_LOW_DELAY;
       codecContext->flags2 |= CODEC_FLAG2_CHUNKS;

       codecContext->width = horizontal;
       codecContext->height = vertical;
       codecContext->codec_id = CODEC_ID_H264;
       codecContext->codec_type = AVMEDIA_TYPE_VIDEO;
       codecContext->pix_fmt = PIX_FMT_YUV420P;
       codecContext->thread_type = 0;

       if (avcodec_open2(codecContext, codec, NULL) &lt; 0) {
           std::cout &lt;&lt; "could not open codec" &lt;&lt; std::endl;
           std::cin.get();
       }

       convertContext = sws_getContext(
           codecContext->width,
           codecContext->height,
           PIX_FMT_RGB32,
           codecContext->width,
           codecContext->height,
           PIX_FMT_YUV420P,
           SWS_BICUBIC,
           NULL,
           NULL,
           NULL
           );

       parser = av_parser_init(CODEC_ID_H264);

       picture = av_frame_alloc();

       if (ns == INVALID_SOCKET)
       {
           std::cout &lt;&lt; "accept didn't work!" &lt;&lt; std::endl;
           std::cin.get();
       }

       /*if (WSASetEvent(AcceptEvent) == FALSE)
       {
           printf("WSASetEvent() failed with error %d\n", WSAGetLastError());
           return 1;
       }
       else
           printf("WSASetEvent() should be working!\n");*/

       window = SDL_CreateWindow("YUV", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, codecContext->width, codecContext->height, SDL_WINDOW_SHOWN);
       renderer = SDL_CreateRenderer(window, -1, 0);
       bmp = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_IYUV, SDL_TEXTUREACCESS_STREAMING, codecContext->width, codecContext->height);

       //receive = SDL_CreateThread(receiveThread, "ReceiveThread", (void *)NULL);
       bool quit = false;

       rect.x = 0;
       rect.y = 0;
       rect.w = codecContext->width;
       rect.h = codecContext->height;

       while (!quit)
       {
           while (true)
           {
               MadProto proto;
               int result = recvfrom(ns, (char *)&amp;proto, sizeof(MadProto), 0, (struct sockaddr *)&amp;multi, &amp;fromlen);

               if (result &lt; 0)
               {
                   std::cout &lt;&lt; "receive failed! error: " &lt;&lt; WSAGetLastError() &lt;&lt; std::endl;
                   break;
               }
               else
               {
                   std::cout &lt;&lt; "receive successful, received " &lt;&lt; result &lt;&lt; " bytes" &lt;&lt; std::endl;

                   if (ntohs(proto.frame_end) == 1)
                   {
                       uint8_t *outbuffer = NULL;
                       int outBufSize = 0;
                       int rc = av_parser_parse2(parser, codecContext, &amp;outbuffer, &amp;outBufSize, buffer.data(), buffer.size(), 0, 0, 0);

                       if (outBufSize &lt;= 0)
                       {
                           std::cout &lt;&lt; "parsing failed!" &lt;&lt; std::endl;
                           std::cout &lt;&lt; "outBufSize: " &lt;&lt; outBufSize &lt;&lt; std::endl;
                           break;
                       }

                       if (rc)
                       {
                           std::cout &lt;&lt; "rc: " &lt;&lt; rc &lt;&lt; std::endl;
                           std::cout &lt;&lt; "parsing successful!" &lt;&lt; std::endl;
                           //std::cin.get();

                           av_init_packet(&amp;packet);
                           packet.size = outBufSize;
                           packet.data = outbuffer;

                           frame = avcodec_decode_video2(codecContext, picture, &amp;got_picture, &amp;packet);

                           if (frame &lt; 0)
                           {
                               std::cout &lt;&lt; "decoding was unsuccessful!" &lt;&lt; std::endl;
                               break;
                           }

                           if (got_picture)
                           {
                               std::cout &lt;&lt; "decoding was successful!" &lt;&lt; std::endl;
                               std::cout &lt;&lt; "decoded length was: " &lt;&lt; frame &lt;&lt; std::endl;
                               buffer.empty();

                               //std::cin.get();
                               int code = SDL_UpdateYUVTexture(bmp, NULL, picture->data[0], picture->linesize[0],
                                   picture->data[1], picture->linesize[1],
                                   picture->data[2], picture->linesize[2]);

                               if (code &lt; 0)
                               {
                                   std::cout &lt;&lt; "unable to update texture " &lt;&lt; SDL_GetError() &lt;&lt; std::endl;
                                   std::cin.get();
                               }

                               code = SDL_RenderClear(renderer);

                               if (code &lt; 0)
                               {
                                   std::cout &lt;&lt; "renderer clear failed " &lt;&lt; SDL_GetError() &lt;&lt; std::endl;
                                   std::cin.get();
                               }

                               code = SDL_RenderCopy(renderer, bmp, NULL, &amp;rect);

                               if (code &lt; 0)
                               {
                                   std::cout &lt;&lt; "renderer copy failed " &lt;&lt; SDL_GetError() &lt;&lt; std::endl;
                                   std::cin.get();
                               }

                               SDL_RenderPresent(renderer);

                               SDL_Delay(40);
                           }

                           av_free_packet(&amp;packet);
                       }
                   }
                   else
                   {
                       std::copy(proto.payload, proto.payload + ntohs(proto.nal_length), std::back_inserter(buffer));
                       std::cout &lt;&lt; "frame is continuing!" &lt;&lt; std::endl;

                       //queue.push(proto);
                       //list.push_front(proto);
                   }
               }
           }

           SDL_WaitEvent(&amp;event);
           switch (event.type)
           {
           case SDL_QUIT:
               quit = true;
               break;
           }
       }

       std::cout &lt;&lt; "closing everything!" &lt;&lt; std::endl;
       av_frame_free(&amp;picture);
       closesocket(ns);
       fclose(f);
       std::cin.get();
       return 0;
    }
    </madproto></madproto></madproto>
  • French CNIL recommends Piwik : the only analytics tool that does not require Cookie Consent

    29 octobre 2014, par Matthieu Aubry — Press Releases

    There has been recent and important changes in France regarding data privacy and the use of cookies. This blog post will introduce you to these changes and explain how you make your website compliant.

    Cookie Consent in the data freedom law

    Since the adoption of the EU Directive 2009/136/EC “Telecom Package”, Internet users must be informed and provide their prior consent to the storage of cookies on their computer. The use of cookies for advertising, analytics and social share buttons require the user’s consent :

    It is necessary to inform users of the presence, purpose and duration of the cookies placed in their browsers, and the means at their disposal to oppose it.

    What is a cookie ?

    Cookies are tracers placed on Internet users’ hard drives by the web hosts of the visited website. They allow the website to identify a single user across multiple visits with a unique identifier. Cookies may be used for various purposes : building up a shopping cart, storing a website’s language settings, or targeting advertising by monitoring the user’s web-browsing.

    Which cookies are exempt from the Cookie Consent rule ?

    France has exempted certain cookies from the cookie consent rule : for those cookies that are strictly necessary to offer the service sought after by the user you do not need to ask consent to user. Examples of such cookies are :

    • the shopping cart cookie,
    • authentication cookies,
    • short lived session cookies,
    • load balancer cookies,
    • certain first party analytics (such as Piwik cookies),
    • persistent cookies for interface personalisation.

    Asking users for consent for Analytics (tracking) Cookies

    For all cookies that are not exempted from the Cookie Consent then you will need to :

    • obtain consent from web users before placing or reading cookies and similar technologies,
    • clearly inform web users of the different purposes for which the cookies and similar technologies will be used,
    • propose a real choice to web users between accepting or refusing cookies and similar technologies.

    You don’t need Cookie Consent with Piwik

    The excellent news is that there is a way to bypass the Cookie Consent banner on your website :

    If you are using another analytics solution other than Piwik then you will need to ask users for consent. If you do not want to ask for consent then download and install Piwik or signup to Piwik Cloud to get started.

    If you are already using Piwik you need to do two simple things : (1) anonymise visitor IP addresses (at least two bytes) and (2) include the opt-out iframe solution in your website (learn more).

    Note that these recommendations currently only apply in France, but because the law is European we can expect similar findings in other European countries.

    CNIL recommends Piwik

    We are proud that the CNIL has identified Piwik as the only tool that respects all privacy requirements set by the European Telecom law.

    About the CNIL

    The CNIL is an independent administrative body that operates in accordance with the French data protection legislation. The CNIL has been entrusted with the general duty to inform people of the rights that the data protection legislation allows them.

    The role and responsabilities of the CNIL are :

    • to protect citizens and their data
    • to regulate and control processing of personal data
    • to inspect the security of data processing systems and applications, and impose penalties

    Piwik and Privacy

    At Piwik we love Privacy – our open analytics platform comes with built-in Privacy.

    Future of Privacy at Piwik

    Piwik is already the leader when it comes to respecting user privacy but we plan to continue improving privacy within the open analytics platform. For more information and specific ideas see Privacy enhancing issues in our issue tracker.

    References

    Learn more in these articles in French [fr] or English :

    Contact

    To learn more about Piwik, please visit piwik.org,

    Get in touch with the Piwik team : Contact information,

    For professional support contact Piwik PRO.

  • French CNIL recommends Piwik : the only analytics tool that does not require Cookie Consent

    29 octobre 2014, par Matthieu Aubry — Press Releases

    There has been recent and important changes in France regarding data privacy and the use of cookies. This blog post will introduce you to these changes and explain how you make your website compliant.

    Cookie Consent in the data freedom law

    Since the adoption of the EU Directive 2009/136/EC “Telecom Package”, Internet users must be informed and provide their prior consent to the storage of cookies on their computer. The use of cookies for advertising, analytics and social share buttons require the user’s consent :

    It is necessary to inform users of the presence, purpose and duration of the cookies placed in their browsers, and the means at their disposal to oppose it.

    What is a cookie ?

    Cookies are tracers placed on Internet users’ hard drives by the web hosts of the visited website. They allow the website to identify a single user across multiple visits with a unique identifier. Cookies may be used for various purposes : building up a shopping cart, storing a website’s language settings, or targeting advertising by monitoring the user’s web-browsing.

    Which cookies are exempt from the Cookie Consent rule ?

    France has exempted certain cookies from the cookie consent rule : for those cookies that are strictly necessary to offer the service sought after by the user you do not need to ask consent to user. Examples of such cookies are :

    • the shopping cart cookie,
    • authentication cookies,
    • short lived session cookies,
    • load balancer cookies,
    • certain first party analytics (such as Piwik cookies),
    • persistent cookies for interface personalisation.

    Asking users for consent for Analytics (tracking) Cookies

    For all cookies that are not exempted from the Cookie Consent then you will need to :

    • obtain consent from web users before placing or reading cookies and similar technologies,
    • clearly inform web users of the different purposes for which the cookies and similar technologies will be used,
    • propose a real choice to web users between accepting or refusing cookies and similar technologies.

    You don’t need Cookie Consent with Piwik

    The excellent news is that there is a way to bypass the Cookie Consent banner on your website :

    If you are using another analytics solution other than Piwik then you will need to ask users for consent. If you do not want to ask for consent then download and install Piwik or signup to Piwik Cloud to get started.

    If you are already using Piwik you need to do two simple things : (1) anonymise visitor IP addresses (at least two bytes) and (2) include the opt-out iframe solution in your website (learn more).

    Note that these recommendations currently only apply in France, but because the law is European we can expect similar findings in other European countries.

    CNIL recommends Piwik

    We are proud that the CNIL has identified Piwik as the only tool that respects all privacy requirements set by the European Telecom law.

    About the CNIL

    The CNIL is an independent administrative body that operates in accordance with the French data protection legislation. The CNIL has been entrusted with the general duty to inform people of the rights that the data protection legislation allows them.

    The role and responsabilities of the CNIL are :

    • to protect citizens and their data
    • to regulate and control processing of personal data
    • to inspect the security of data processing systems and applications, and impose penalties

    Piwik and Privacy

    At Piwik we love Privacy – our open analytics platform comes with built-in Privacy.

    Future of Privacy at Piwik

    Piwik is already the leader when it comes to respecting user privacy but we plan to continue improving privacy within the open analytics platform. For more information and specific ideas see Privacy enhancing issues in our issue tracker.

    References

    Learn more in these articles in French [fr] or English :

    Contact

    To learn more about Piwik, please visit piwik.org,

    Get in touch with the Piwik team : Contact information,

    For professional support contact Piwik PRO.