Recherche avancée

Médias (91)

Autres articles (70)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (10564)

  • Fix Iframe Transport form submit for Safari 13.

    19 avril 2020, par blueimp
    Fix Iframe Transport form submit for Safari 13.
    

    Fixes #3633

  • Video portal web form site having issues on Azure server

    18 septembre 2015, par Ahmed Mujtaba

    I have a website built on ASP.NET web forms that works as a media portal for users to upload videos. I’m using ffmpeg encoders to produce video contents to be streamed in the browser. I’m using the web deploy method to publish the site on the Azure server. The website get’s deployed properly however I get following issues in the live site.

    1. Video never get’s encoded and published. I get some sort of error.

    2. Video get’s published but the process of uploading and encoding the video is way too slow on the web server.

    3. The home page of the website has a video wallpaper. The video reference is in the directory videowall that is in the root directory of the project. The video plays fine on the local server but the web server says it couldn’t find the file to play even though it’s present in the ftp root directory.

    My project solution contains upload.ashx that handles the upload requests and makes the call to encode.ashx which is responsible for the encoding and publishing of the videos. I tried to remotely debug the site but the debugger never get’s to encode.ashx.

    I was wondering if these issues can be resolved by having the website deployed with a VM ?

  • 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 {

       }
    }   }