Recherche avancée

Médias (0)

Mot : - Tags -/configuration

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

Autres articles (64)

  • 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

  • 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

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

Sur d’autres sites (8560)

  • Streaming video written using FFmpeg (C# using AutoGen) sends multiple data requests

    26 juin 2016, par williamtroup

    I’ve written a video generator that rights a video in h264 format (mp4). When I stream the video from my azure service, i’m seeing the following network traffic :

    enter image description here

    The AVCodecContext layout I’m using is as follows :

    AVCodec* videoCodec = ffmpeg.avcodec_find_encoder(AVCodecID.AV_CODEC_ID_H264)
    AVCodecContext* videoCodecContext = ffmpeg.avcodec_alloc_context3(videoCodec);
    videoCodecContext->bit_rate = 400000;
    videoCodecContext->width = 1280;
    videoCodecContext->height = 720;
    videoCodecContext->gop_size = 12;
    videoCodecContext->max_b_frames = 1;
    videoCodecContext->pix_fmt = videoCodec->pix_fmts[0];
    videoCodecContext->codec_id = videoCodec->id;
    videoCodecContext->codec_type = videoCodec->type;
    videoCodecContext->time_base = new AVRational
    {
       num = 1,
       den = 30
    };

    ffmpeg.av_opt_set(videoCodecContext->priv_data, "preset", "ultrafast");

    I cannot figure out how to solve this problem. Videos generating using Windows Movie Maker stream perfectly.

    Also, this appears to only happening in Google Chrome.

  • QTRLE is supported by ffmpeg ?

    22 avril 2016, par Sagar
    • I am trying to create video using QTRLE format with RGB24 or ARGB pixel format in ffmpeg library.But video is not played.
    • But is i use H264 format with yuv format then it’s working fine.
    • Is QTRLE is not supported by ffmpeg or i m doing any mistake ?

      static void video_encode_example(const char *filename, int codec_id)
      {
             AVCodec *codec;
             AVCodecContext *c = NULL;
             int i, ret, x, y, got_output;
             FILE *f;
             AVFrame *frame;
             AVPacket pkt;
             uint8_t endcode[] = { 0, 0, 1, 0xb7 };

             printf("Encode video file %s\n", filename);

             /* find the mpeg1 video encoder */

             codec = avcodec_find_encoder((AVCodecID) codec_id);
             //  codec = 28;
             if (!codec) {
                 fprintf(stderr, "Codec not found : %d\n", codec_id);
                 exit(1);
             }

             c = avcodec_alloc_context3(codec);

             if (!c) {
                 fprintf(stderr, "Could not allocate video codec context\n");
                 exit(1);
             }

             /* put sample parameters */
             c->bit_rate = 400000;
             /* resolution must be a multiple of two */
             c->width = 352;
             c->height = 288;
             /* frames per second */
             c->time_base = (AVRational ) { 1, 25 };
             /* emit one intra frame every ten frames
              * check frame pict_type before passing frame
              * to encoder, if frame->pict_type is AV_PICTURE_TYPE_I
              * then gop_size is ignored and the output of encoder
              * will always be I frame irrespective to gop_size
              */
             c->gop_size = 10;
             c->max_b_frames = 1;
             c->pix_fmt = AV_PIX_FMT_RGB24;

             if (codec_id == AV_CODEC_ID_H264)
                 av_opt_set(c->priv_data, "preset", "slow", 0);

             /* open it */
             if (avcodec_open2(c, codec, NULL) < 0) {
                 fprintf(stderr, "Could not open codec\n");
                 exit(1);
             }

             f = fopen(filename, "wb");
             if (!f) {
                 fprintf(stderr, "Could not open %s\n", filename);
                 exit(1);
             }

             frame = av_frame_alloc();
             if (!frame) {
                 fprintf(stderr, "Could not allocate video frame\n");
                 exit(1);
             }
             frame->format = c->pix_fmt;
             frame->width = c->width;
             frame->height = c->height;

             /* the image can be allocated by any means and av_image_alloc() is
              * just the most convenient way if av_malloc() is to be used */
             ret = av_image_alloc(frame->data, frame->linesize, c->width, c->height,
                     c->pix_fmt, 32);
             if (ret < 0) {
                 fprintf(stderr, "Could not allocate raw picture buffer\n");
                 exit(1);
             }
             ////////////////////////////////////
             cv::Mat input = imread("image for creating video(image.png)");
             Mat output;
             resize(input, input, Size(c->width, c->height));
             cvtColor(input, input, CV_BGR2RGB);

             av_image_fill_arrays(frame->data, frame->linesize, input.data,
                     c->pix_fmt, c->width, c->height, 1);

             ////////////////////////////////////

             for (i = 0; i < 250; i++) {
                 av_init_packet(&pkt);
                 pkt.data = NULL;    // packet data will be allocated by the encoder
                 pkt.size = 0;

                 fflush(stdout);

                 frame->pts = i;

                 /* encode the image */
                 ret = avcodec_encode_video2(c, &pkt, frame, &got_output);
                 if (ret < 0) {
                     fprintf(stderr, "Error encoding frame\n");
                     exit(1);
                 }

                 if (got_output) {
                     printf("Write frame %3d (size=%5d)\n", i, pkt.size);
                     fwrite(pkt.data, 1, pkt.size, f);
                     av_packet_unref(&pkt);
                 }
             }

             /* get the delayed frames */
             for (got_output = 1; got_output; i++) {
                 fflush(stdout);

                 ret = avcodec_encode_video2(c, &pkt, NULL, &got_output);
                 if (ret < 0) {
                     fprintf(stderr, "Error encoding frame\n");
                     exit(1);
                 }

                 if (got_output) {
                     printf("Write frame %3d (size=%5d)\n", i, pkt.size);
                     fwrite(pkt.data, 1, pkt.size, f);
                     av_packet_unref(&pkt);
                 }
             }

             /* add sequence end code to have a real mpeg file */
             fwrite(endcode, 1, sizeof(endcode), f);
             fclose(f);

             avcodec_close(c);
             av_free(c);
         //  av_freep(&frame->data[0]);
             av_frame_free(&frame);
             printf("\n");
      }

      int main() {
         av_register_all();
         video_encode_example("test.mov", AV_CODEC_ID_QTRLE);
      }
  • Streaming video (C# using FFmpeg AutoGen) sends multiple data requests

    14 juillet 2016, par williamtroup

    I’ve written a video generator that rights a video in h264 format (mp4). When I stream the video from my azure service, i’m seeing the following network traffic :

    enter image description here

    The AVCodecContext layout I’m using is as follows :

    AVCodec* videoCodec = ffmpeg.avcodec_find_encoder(AVCodecID.AV_CODEC_ID_H264)
    AVCodecContext* videoCodecContext = ffmpeg.avcodec_alloc_context3(videoCodec);
    videoCodecContext->bit_rate = 400000;
    videoCodecContext->width = 1280;
    videoCodecContext->height = 720;
    videoCodecContext->gop_size = 12;
    videoCodecContext->max_b_frames = 1;
    videoCodecContext->pix_fmt = videoCodec->pix_fmts[0];
    videoCodecContext->codec_id = videoCodec->id;
    videoCodecContext->codec_type = videoCodec->type;
    videoCodecContext->time_base = new AVRational
    {
       num = 1,
       den = 30
    };

    ffmpeg.av_opt_set(videoCodecContext->priv_data, "preset", "ultrafast");

    I’m also tried setting the "movflags" option for avformat_write_header() via an AVDictionary, but then av_write_trailer() returns -2, cause the file to not finish writing.

    I cannot figure out how to solve this problem. Videos generating using Windows Movie Maker stream perfectly.

    I know this has something to do with mdat and mov positions.

    Also, this appears to only happening in Google Chrome.