Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (26)

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

  • 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

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

Sur d’autres sites (5507)

  • Cloaked Archive Wiki

    16 mai 2011, par Multimedia Mike — General

    Google’s Chrome browser has made me phenomenally lazy. I don’t even attempt to type proper, complete URLs into the address bar anymore. I just type something vaguely related to the address and let the search engine take over. I saw something weird when I used this method to visit Archive Team’s site :



    There’s greater detail when you elect to view more results from the site :



    As the administrator of a MediaWiki installation like the one that archiveteam.org runs on, I was a little worried that they might have a spam problem. However, clicking through to any of those out-of-place pages does not indicate anything related to pharmaceuticals. Viewing source also reveals nothing amiss.

    I quickly deduced that this is a textbook example of website cloaking. This is when a website reports different content to a search engine than it reports to normal web browsers (humans, presumably). General pseudocode :

    C :
    1. if (web_request.user_agent_string == CRAWLER_USER_AGENT)
    2.  return cloaked_data ;
    3. else
    4.  return real_data ;

    You can verify this for yourself using the wget command line utility :

    <br />
    $ wget --quiet --user-agent="<strong>Mozilla/5.0</strong>" \<br />
     http://www.archiveteam.org/index.php?title=Geocities -O - | grep \&lt;title\&gt;<br />
    &lt;title&gt;GeoCities - Archiveteam&lt;/title&gt;

    $ wget —quiet —user-agent="Googlebot/2.1"
    http://www.archiveteam.org/index.php?title=Geocities -O - | grep \<title\>
    <title>Cheap xanax | Online Drug Store, Big Discounts</title>

    I guess the little web prank worked because the phaux-pharma stuff got indexed. It makes we wonder if there’s a MediaWiki plugin that does this automatically.

    For extra fun, here’s a site called the CloakingDetector which purports to be able to detect whether a page employs cloaking. This is just one humble observer’s opinion, but I don’t think the site works too well :



  • Custom buffer for FFMPEG

    3 décembre 2015, par nmarevic

    I have a question regarding buffer read with ffmpeg.
    Idea is as it follows : an outside module (can not change it) is providing me video stream in chunks of data and it is giving me input data and it’s size in bytes ("framfunction" function input parameters). I have to copy input data to a buffer and read it with ffmpeg (Zeranoe) and extract video frames. Each time I receive new data, my function "framfunction" will be called. All unprocessed data from a first run will be moved at the beginning of the buffer followed by a new data on the second run and so on. It is essentially based on source and Dranger tutorials. My current attempt is like this and just look at comments (I’ve left only ones regarding current buffer function) in code to get a picture what I want to do(I know it is messy and it works - sort of ; skipping some frames. Any suggestions around ffmpeg code and buffer design are welcome) :

    #include <iostream>
    #include <string>

    extern "C"
    {
    #include <libavformat></libavformat>avformat.h>
    #include <libavcodec></libavcodec>avcodec.h>
    #include <libswscale></libswscale>swscale.h>
    #include <libavformat></libavformat>avio.h>
    #include <libavutil></libavutil>file.h>
    }
    struct buffer_data {
      uint8_t *ptr;
      size_t size;
    };

    static int read_packet(void *opaque, uint8_t *buf, int buf_size)
    {
      struct buffer_data *bd = (struct buffer_data *)opaque;
      buf_size = FFMIN(buf_size, bd->size);
      memcpy(buf, bd->ptr, buf_size);
      bd->ptr += buf_size;
      bd->size -= buf_size;
      return buf_size;
    }

    class videoclass
    {
    private:
      uint8_t* inputdatabuffer;
      size_t offset;

    public:
      videoclass();
      ~videoclass();
      int framfunction(uint8_t* inputbytes, int inputbytessize);
    };

    videoclass::videoclass()
      : inputdatabuffer(nullptr)
      , offset(0)
    {
      inputdatabuffer = new uint8_t[8388608]; //buffer where the input data will be stored
    }

    videoclass::~videoclass()
    {
      delete[] inputdatabuffer;
    }


    int videoclass::framfunction(uint8_t* inputbytes, int inputbytessize)
    {
      int i, videoStream, numBytes, frameFinished;
      AVFormatContext *pFormatCtx = NULL;
      AVCodecContext *pCodecCtx = NULL;
      AVIOContext   *avio_ctx = NULL;
      AVCodec   *pCodec = NULL;
      AVFrame   *pFrame = NULL;
      AVFrame   *pFrameRGB = NULL;
      AVPacket packet;
      uint8_t   *buffer = NULL;
      uint8_t   *avio_ctx_buffer = NULL;
      size_t   avio_ctx_buffer_size = 4096;
      size_t   bytes_processed = 0;
      struct buffer_data bd = { 0 };

      //if (av_file_map("sample.ts", &amp;inputbytes, &amp;inputbytessize, 0, NULL) &lt; 0)//
      //   return -1;

      memcpy(inputdatabuffer + offset, inputbytes, inputbytessize);//copy new data to buffer inputdatabuffer with offset calculated at the end of previous function run. In other words - cope new data after unprocessed data from a previous call
      offset += inputbytessize; //total number of bytes in buffer. Size of an unprocessed data from the last run + size of new data (inputbytessize)

      bd.ptr = inputdatabuffer;
      bd.size = offset;

      if (!(pFormatCtx = avformat_alloc_context()))
         return -1;
      avio_ctx_buffer = (uint8_t *)av_malloc(avio_ctx_buffer_size);
      avio_ctx = avio_alloc_context(avio_ctx_buffer, avio_ctx_buffer_size,0, &amp;bd, &amp;read_packet, NULL, NULL);
      pFormatCtx->pb = avio_ctx;

      av_register_all();
      avcodec_register_all();

      pFrame = av_frame_alloc();
      pFrameRGB = av_frame_alloc();

      if (avformat_open_input(&amp;pFormatCtx, NULL, NULL, NULL) != 0)
         return -2;
      if (avformat_find_stream_info(pFormatCtx, NULL) &lt; 0)
         return -3;

      videoStream = -1;
      for (i = 0; i &lt; pFormatCtx->nb_streams; i++)
         if (pFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
            videoStream = i;
            break;
         }
      if (videoStream == -1)
         return -4;

      pCodecCtx = pFormatCtx->streams[videoStream]->codec;

      pCodec = avcodec_find_decoder(pCodecCtx->codec_id);
      if (pCodec == NULL){
         std::cout &lt;&lt; "Unsupported codec" &lt;&lt; std::endl;
         return -5;
      }

      if (avcodec_open2(pCodecCtx, pCodec, NULL) &lt; 0)
         return -6;

      numBytes = avpicture_get_size(PIX_FMT_BGR24, pCodecCtx->width, pCodecCtx->height);
      buffer = (uint8_t *)av_malloc(numBytes*sizeof(uint8_t));

      avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_BGR24, pCodecCtx->width, pCodecCtx->height);

      while (av_read_frame(pFormatCtx, &amp;packet) >= 0){
         if (packet.stream_index == videoStream){
            avcodec_decode_video2(pCodecCtx, pFrame, &amp;frameFinished, &amp;packet);
            if (frameFinished){
               std::cout &lt;&lt; "Yaay, frame found" &lt;&lt; std::endl;
               }

         }
         av_free_packet(&amp;packet);

         bytes_processed = (size_t)pFormatCtx->pb->pos; //data which is processed so far (x bytes out of inputbytessize)??????????????????????????????
      }

      offset -= bytes_processed; //size of unprocessed data

      av_free(buffer);
      av_free(pFrameRGB);
      av_free(pFrame);

      avcodec_close(pCodecCtx);

      av_freep(&amp;avio_ctx->buffer);
      av_freep(&amp;avio_ctx);


      avformat_close_input(&amp;pFormatCtx);


      memmove(inputdatabuffer, inputdatabuffer + bytes_processed, offset);//move unprocessed data to begining of the main buffer

         return 0;
    }
    </string></iostream>

    Call of my function would be something like this

    WHILE(VIDEO_INPUT)
    {
       READ VIDEO DATA FROM INPUT BUFFER
       STORE DATA FROM INPUT BUFFER AND SIZE OP THAT DATA TO VARIABLES NEW_DATA AND NEW_DATA_SIZE
       CALL FUNCTION FRAMMUNCTION AND PASS NEW_DATA AND NEW_DATA_FUNCTION
       DO OTHER THINGS
    }

    What I would like to know is what is exact size of unprocessed data. Comments in code are showing my attempt but I think it is not good enough so I need some help with that issue.

    EDIT : magic question is how to get correct "bytes_processed" size. I’ve also made an pdf with explanation how my buffer should work pdf file
    Thanks

  • Museum of Multimedia Software, Part 2

    16 août 2010, par Multimedia Mike — Software Museum

    This installment includes a bunch of old, discontinued Adobe software as well as some Flash-related mutlimedia software.

    Screen Time for Flash Screen Saver Factory
    "Create High Impact Screen Savers Using Macromedia Flash."



    Requirements include Windows 3.1, 95 or NT 3.5.1. A 486 computer is required to play the resulting screensavers which are Flash projectors using Macromedia Flash 3.0.

    Monster Interactive Instant GUI 2
    Create eye-popping GUIs more easily for use in Flash. Usability experts would argue that this is not a good thing.



    Adobe Dimensions 3.0
    "The Easy Yet Powerful 3D Rendering Tool." This software was end-of-life’d in late 2004-early 2005 (depending on region).



    Adobe ImageStyler
    "Instantly add style to your Web site." Wikipedia claims that this product was sold from 1998 to 2000 when it was superseded by Adobe LiveMotion (see below).



    Google is able to excavate a link to the Latin American site for Adobe ImageStyler, a page that doesn’t seem to be replicated in any other language.

    Adobe LiveMotion
    "Professional Web graphics and animation." This is version 1, where the last version was #2, released in 2002.



    Adobe Streamline 4.0
    "The most powerful way to convert images into line art." This was discontinued in mid-2005.



    Adobe SuperATM
    "The magic that maintains the look of your documents." This is the oldest item in my collection. A close examination of the back of the box reveals an old Adobe logo. The latest copyright date on the box is 1992.