Recherche avancée

Médias (0)

Mot : - Tags -/tags

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

Autres articles (53)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

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

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (8141)

  • Publish RTMP stream to Red5 Server form iOS camera

    7 septembre 2015, par Mohammad Asif

    Please look at following code, I have transformed CMSampleBufferRef into AV_CODEC_ID_H264 but I don’t know how to transmit it to Red5 server.

    Thanks,

    - (void)  captureOutput:(AVCaptureOutput *)captureOutput
     didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
        fromConnection:(AVCaptureConnection *)connection {

    //NSLog(@"This is working ....");

     // [connection setVideoOrientation: [self deviceOrientation] ];

    if( !CMSampleBufferDataIsReady(sampleBuffer) )
    {
       NSLog( @"sample buffer is not ready. Skipping sample" );
       return;
    } else {

       if (captureOutput == videoOutput) {


           CVPixelBufferRef pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
           CVPixelBufferLockBaseAddress(pixelBuffer, 0);

           // access the data
           float width = CVPixelBufferGetWidth(pixelBuffer);
           float height = CVPixelBufferGetHeight(pixelBuffer);

           //float bytesPerRow = CVPixelBufferGetBytesPerRowOfPlane(pixelBuffer, 0);
           unsigned char *rawPixelBase = (unsigned char *)CVPixelBufferGetBaseAddressOfPlane(pixelBuffer, 0);


           // Convert the raw pixel base to h.264 format

           if (codec == nil) {

               codec = 0;
               context = 0;
               frame = 0;

               fmt = avformat_alloc_context();
               //avformat_write_header(fmt, NULL);

               codec = avcodec_find_encoder(AV_CODEC_ID_H264);

               if (codec == 0) {
                   NSLog(@"Codec not found!!");
                   return;
               }

               context = avcodec_alloc_context3(codec);

               if (!context) {
                   NSLog(@"Context no bueno.");
                   return;
               }

               // Bit rate
               context->bit_rate = 400000; // HARD CODE
               context->bit_rate_tolerance = 10;
               // Resolution

               // Frames Per Second
               context->time_base = (AVRational) {1,25};
               context->gop_size = 1;
               //context->max_b_frames = 1;
               context->width = width;
               context->height = height;
               context->pix_fmt = PIX_FMT_YUV420P;

               // Open the codec
               if (avcodec_open2(context, codec, 0) < 0) {
                   NSLog(@"Unable to open codec");
                   return;
               }

               // Create the frame
               frame = av_frame_alloc();
               if (!frame) {
                   NSLog(@"Unable to alloc frame");
                   return;
               }
           }

           context->width = width;
           context->height = height;

           frame->format = context->pix_fmt;
           frame->width = context->width;
           frame->height = context->height;

           //int nbytes = avpicture_get_size(context->pix_fmt, context->width, context->height);
           //uint8_t* outbuffer = (uint8_t*)av_malloc(nbytes);
    //            AVFrame *pFrameDecoded = avcodec_alloc_frame();
    //            int num_bytes2 = avpicture_get_size(context->pix_fmt, frame->width, frame->height);
    //            uint8_t* frame2_buffer2 = (uint8_t *)av_malloc(num_bytes2 * sizeof(uint8_t));
    //            avpicture_fill((AVPicture*)pFrameDecoded, frame2_buffer2, PIX_FMT_YUVJ422P, 320, 240);

           frame->pts = (1.0 / 30) * 60 * count;
           avpicture_fill((AVPicture *) frame, rawPixelBase, context->pix_fmt, frame->width, frame->height);

           int got_output = 0;
           av_init_packet(&packet);
           //avcodec_encode_video2(context, &packet, frame, &got_output);

           do {
               avcodec_encode_video2(context, &packet, frame, &got_output);
               //avcodec_decode_video2(context, &packet, NULL, &got_output);
               //*... handle received packet*/

               if (isFirstPacket) {
                   [rtmp sendCreateStreamPacket];
                   isFirstPacket = false;
                   //av_dump_format(fmt, 0, [kRtmpEP UTF8String], 1);
                   avformat_alloc_output_context2(&ofmt_ctx, NULL, "flv", [kRtmpEP UTF8String]); //RTMP
               }

               packet.stream_index = ofmt_ctx->nb_streams;
               av_interleaved_write_frame(ofmt_ctx, &packet);
               count ++;

               //[rtmp write:[NSData dataWithBytes:packet.data length:packet.size]];


           } while(got_output);

           // Unlock the pixel data
           CVPixelBufferUnlockBaseAddress(pixelBuffer, 0);

           //[rtmp write:[NSData dataWithBytes:packet.data length:packet.size]];

       } else {

       }
    }   }  
  • FFMPEG compiled binaries don't run on XP using MinGW

    10 juin 2015, par Paul Knopf

    I am trying to build windows executables/dlls for Windows XP, and they are not working. They are the correct architecture. They run fine on my Windows 8 device machine.

    I used dependency walker to find missing DLLs, and all were present.

    Here are the compiled executables I am trying to run.

    I ran the windows build script for ffmpeg.

    Here is a dumpbin /headers ffmpeg.exe

    Microsoft (R) COFF/PE Dumper Version 10.00.30319.01
    Copyright (C) Microsoft Corporation.  All rights reserved.


    Dump of file ffmpeg.exe

    PE signature found

    File Type: EXECUTABLE IMAGE

    FILE HEADER VALUES
                14C machine (x86)
                  7 number of sections
              51A40 time date stamp Sun Jan 04 15:53:20 1970
                  0 file pointer to symbol table
                  0 number of symbols
                 E0 size of optional header
                32F characteristics
                      Relocations stripped
                      Executable
                      Line numbers stripped
                      Symbols stripped
                      Application can handle large (>2GB) addresses
                      32 bit word machine
                      Debug information stripped

    OPTIONAL HEADER VALUES
                10B magic # (PE32)
               2.25 linker version
              41400 size of code
              4FA00 size of initialized data
               1200 size of uninitialized data
               14E0 entry point (004014E0)
               1000 base of code
              43000 base of data
             400000 image base (00400000 to 00456FFF)
               1000 section alignment
                200 file alignment
               4.00 operating system version
               1.00 image version
               4.00 subsystem version
                  0 Win32 version
              57000 size of image
                400 size of headers
              597A9 checksum
                  3 subsystem (Windows CUI)
                140 DLL characteristics
                      Dynamic base
                      NX compatible
             200000 size of stack reserve
               1000 size of stack commit
             100000 size of heap reserve
               1000 size of heap commit
                  0 loader flags
                 10 number of directories
                  0 [       0] RVA [size] of Export Directory
              51000 [    36F0] RVA [size] of Import Directory
                  0 [       0] RVA [size] of Resource Directory
                  0 [       0] RVA [size] of Exception Directory
                  0 [       0] RVA [size] of Certificates Directory
                  0 [       0] RVA [size] of Base Relocation Directory
                  0 [       0] RVA [size] of Debug Directory
                  0 [       0] RVA [size] of Architecture Directory
                  0 [       0] RVA [size] of Global Pointer Directory
              56004 [      18] RVA [size] of Thread Storage Directory
                  0 [       0] RVA [size] of Load Configuration Directory
                  0 [       0] RVA [size] of Bound Import Directory
              517F0 [     6C4] RVA [size] of Import Address Table Directory
                  0 [       0] RVA [size] of Delay Import Directory
                  0 [       0] RVA [size] of COM Descriptor Directory
                  0 [       0] RVA [size] of Reserved Directory


    SECTION HEADER #1
      .text name
      412BC virtual size
       1000 virtual address (00401000 to 004422BB)
      41400 size of raw data
        400 file pointer to raw data (00000400 to 000417FF)
          0 file pointer to relocation table
          0 file pointer to line numbers
          0 number of relocations
          0 number of line numbers
    60500060 flags
            Code
            Initialized Data
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            Execute Read

    SECTION HEADER #2
      .data name
        19C virtual size
      43000 virtual address (00443000 to 0044319B)
        200 size of raw data
      41800 file pointer to raw data (00041800 to 000419FF)
          0 file pointer to relocation table
          0 file pointer to line numbers
          0 number of relocations
          0 number of line numbers
    C0700040 flags
            Initialized Data
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            Read Write

    SECTION HEADER #3
     .rdata name
       A7D8 virtual size
      44000 virtual address (00444000 to 0044E7D7)
       A800 size of raw data
      41A00 file pointer to raw data (00041A00 to 0004C1FF)
          0 file pointer to relocation table
          0 file pointer to line numbers
          0 number of relocations
          0 number of line numbers
    40700040 flags
            Initialized Data
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            Read Only

    SECTION HEADER #4
       .bss name
       1200 virtual size
      4F000 virtual address (0044F000 to 004501FF)
          0 size of raw data
          0 file pointer to raw data
          0 file pointer to relocation table
          0 file pointer to line numbers
          0 number of relocations
          0 number of line numbers
    C0700080 flags
            Uninitialized Data
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            Read Write

    SECTION HEADER #5
     .idata name
       36F0 virtual size
      51000 virtual address (00451000 to 004546EF)
       3800 size of raw data
      4C200 file pointer to raw data (0004C200 to 0004F9FF)
          0 file pointer to relocation table
          0 file pointer to line numbers
          0 number of relocations
          0 number of line numbers
    C0300040 flags
            Initialized Data
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            Read Write

    SECTION HEADER #6
       .CRT name
         3C virtual size
      55000 virtual address (00455000 to 0045503B)
        200 size of raw data
      4FA00 file pointer to raw data (0004FA00 to 0004FBFF)
          0 file pointer to relocation table
          0 file pointer to line numbers
          0 number of relocations
          0 number of line numbers
    C0300040 flags
            Initialized Data
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            Read Write

    SECTION HEADER #7
       .tls name
         20 virtual size
      56000 virtual address (00456000 to 0045601F)
        200 size of raw data
      4FC00 file pointer to raw data (0004FC00 to 0004FDFF)
          0 file pointer to relocation table
          0 file pointer to line numbers
          0 number of relocations
          0 number of line numbers
    C0300040 flags
            Initialized Data
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            Read Write

     Summary

           1000 .CRT
           2000 .bss
           1000 .data
           4000 .idata
           B000 .rdata
          42000 .text
           1000 .tls

    When I attempt to run the executable on XP, it just closes. There is no "missing dll" messages, nor anything in the event viewer.

  • FFMPEG compiled binaries don't run using MinGW

    9 juin 2015, par Paul Knopf

    I am trying to build windows executables/dlls for Windows XP, and they are not working. They are the correct architecture. They run fine on my Windows 8 device machine.

    I used dependency walker to find missing DLLs, and all were present.

    Here are the compiled executables I am trying to run.

    I ran the windows build script for ffmpeg.

    Here is a dumpbin /headers ffmpeg.exe

    Microsoft (R) COFF/PE Dumper Version 10.00.30319.01
    Copyright (C) Microsoft Corporation.  All rights reserved.


    Dump of file ffmpeg.exe

    PE signature found

    File Type: EXECUTABLE IMAGE

    FILE HEADER VALUES
                14C machine (x86)
                  7 number of sections
              51A40 time date stamp Sun Jan 04 15:53:20 1970
                  0 file pointer to symbol table
                  0 number of symbols
                 E0 size of optional header
                32F characteristics
                      Relocations stripped
                      Executable
                      Line numbers stripped
                      Symbols stripped
                      Application can handle large (>2GB) addresses
                      32 bit word machine
                      Debug information stripped

    OPTIONAL HEADER VALUES
                10B magic # (PE32)
               2.25 linker version
              41400 size of code
              4FA00 size of initialized data
               1200 size of uninitialized data
               14E0 entry point (004014E0)
               1000 base of code
              43000 base of data
             400000 image base (00400000 to 00456FFF)
               1000 section alignment
                200 file alignment
               4.00 operating system version
               1.00 image version
               4.00 subsystem version
                  0 Win32 version
              57000 size of image
                400 size of headers
              597A9 checksum
                  3 subsystem (Windows CUI)
                140 DLL characteristics
                      Dynamic base
                      NX compatible
             200000 size of stack reserve
               1000 size of stack commit
             100000 size of heap reserve
               1000 size of heap commit
                  0 loader flags
                 10 number of directories
                  0 [       0] RVA [size] of Export Directory
              51000 [    36F0] RVA [size] of Import Directory
                  0 [       0] RVA [size] of Resource Directory
                  0 [       0] RVA [size] of Exception Directory
                  0 [       0] RVA [size] of Certificates Directory
                  0 [       0] RVA [size] of Base Relocation Directory
                  0 [       0] RVA [size] of Debug Directory
                  0 [       0] RVA [size] of Architecture Directory
                  0 [       0] RVA [size] of Global Pointer Directory
              56004 [      18] RVA [size] of Thread Storage Directory
                  0 [       0] RVA [size] of Load Configuration Directory
                  0 [       0] RVA [size] of Bound Import Directory
              517F0 [     6C4] RVA [size] of Import Address Table Directory
                  0 [       0] RVA [size] of Delay Import Directory
                  0 [       0] RVA [size] of COM Descriptor Directory
                  0 [       0] RVA [size] of Reserved Directory


    SECTION HEADER #1
      .text name
      412BC virtual size
       1000 virtual address (00401000 to 004422BB)
      41400 size of raw data
        400 file pointer to raw data (00000400 to 000417FF)
          0 file pointer to relocation table
          0 file pointer to line numbers
          0 number of relocations
          0 number of line numbers
    60500060 flags
            Code
            Initialized Data
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            Execute Read

    SECTION HEADER #2
      .data name
        19C virtual size
      43000 virtual address (00443000 to 0044319B)
        200 size of raw data
      41800 file pointer to raw data (00041800 to 000419FF)
          0 file pointer to relocation table
          0 file pointer to line numbers
          0 number of relocations
          0 number of line numbers
    C0700040 flags
            Initialized Data
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            Read Write

    SECTION HEADER #3
     .rdata name
       A7D8 virtual size
      44000 virtual address (00444000 to 0044E7D7)
       A800 size of raw data
      41A00 file pointer to raw data (00041A00 to 0004C1FF)
          0 file pointer to relocation table
          0 file pointer to line numbers
          0 number of relocations
          0 number of line numbers
    40700040 flags
            Initialized Data
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            Read Only

    SECTION HEADER #4
       .bss name
       1200 virtual size
      4F000 virtual address (0044F000 to 004501FF)
          0 size of raw data
          0 file pointer to raw data
          0 file pointer to relocation table
          0 file pointer to line numbers
          0 number of relocations
          0 number of line numbers
    C0700080 flags
            Uninitialized Data
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            Read Write

    SECTION HEADER #5
     .idata name
       36F0 virtual size
      51000 virtual address (00451000 to 004546EF)
       3800 size of raw data
      4C200 file pointer to raw data (0004C200 to 0004F9FF)
          0 file pointer to relocation table
          0 file pointer to line numbers
          0 number of relocations
          0 number of line numbers
    C0300040 flags
            Initialized Data
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            Read Write

    SECTION HEADER #6
       .CRT name
         3C virtual size
      55000 virtual address (00455000 to 0045503B)
        200 size of raw data
      4FA00 file pointer to raw data (0004FA00 to 0004FBFF)
          0 file pointer to relocation table
          0 file pointer to line numbers
          0 number of relocations
          0 number of line numbers
    C0300040 flags
            Initialized Data
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            Read Write

    SECTION HEADER #7
       .tls name
         20 virtual size
      56000 virtual address (00456000 to 0045601F)
        200 size of raw data
      4FC00 file pointer to raw data (0004FC00 to 0004FDFF)
          0 file pointer to relocation table
          0 file pointer to line numbers
          0 number of relocations
          0 number of line numbers
    C0300040 flags
            Initialized Data
            RESERVED - UNKNOWN
            RESERVED - UNKNOWN
            Read Write

     Summary

           1000 .CRT
           2000 .bss
           1000 .data
           4000 .idata
           B000 .rdata
          42000 .text
           1000 .tls

    When I attempt to run the executable on XP, it just closes. There is no "missing dll" messages, nor anything in the event viewer.