Recherche avancée

Médias (91)

Autres articles (53)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • D’autres logiciels intéressants

    12 avril 2011, par

    On ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
    La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
    On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
    Videopress
    Site Internet : (...)

Sur d’autres sites (6585)

  • How do I download a list mpd with ffmpeg

    13 mai 2016, par Don Donllei

    I did download the video from a site that used M3U8 but he moved to mpd and do not know how do I download it.

    <mpd type="static" minbuffertime="PT1S" mediapresentationduration="PT0H1M56.320S" profiles="urn:mpeg:dash:profile:full:2011"><programinformation moreinformationurl="http://gpac.sourceforge.net"></programinformation><period start="PT0S" duration="PT0H1M56.320S"><adaptationset segmentalignment="true" maxwidth="1920" maxheight="1080" maxframerate="25" par="16:9"><contentcomponent contenttype="video"></contentcomponent><contentcomponent contenttype="audio"></contentcomponent><segmenttemplate timescale="1000" duration="9693" media="$RepresentationID$/Y7aRjDxbh_$Number$.m4s" startnumber="1" initialization="$RepresentationID$/Y7aRjDxbh_init.mp4"></segmenttemplate><representation mimetype="video/mp4" codecs="avc3.64000d,mp4a.40.2" width="320" height="240" framerate="25" sar="4:3" audiosamplingrate="44100" startwithsap="1" bandwidth="400000">
       </representation><representation mimetype="video/mp4" codecs="avc3.64001e,mp4a.40.2" width="720" height="480" framerate="25" sar="32:27" audiosamplingrate="44100" startwithsap="1" bandwidth="900000">
     </representation><representation mimetype="video/mp4" codecs="avc3.64001f,mp4a.40.2" width="960" height="720" framerate="25" sar="4:3" audiosamplingrate="44100" startwithsap="1" bandwidth="1500000">
      </representation><representation mimetype="video/mp4" codecs="avc3.640028,mp4a.40.2" width="1920" height="1080" framerate="25" sar="1:1" audiosamplingrate="44100" startwithsap="1" bandwidth="3500000">
      </representation><representation mimetype="video/mp4" codecs="avc3.640028,mp4a.40.2" width="2730" height="1440" framerate="25" sar="1:1" audiosamplingrate="44100" startwithsap="1" bandwidth="10000000">
      </representation><representation mimetype="video/mp4" codecs="avc3.640028,mp4a.40.2" width="4096" height="2160" framerate="25" sar="1:1" audiosamplingrate="44100" startwithsap="1" bandwidth="20000000">
      </representation></adaptationset></period></mpd>
  • Create video using ffmpeg

    18 avril 2016, par Sagar

    I have 100 images(PNG) and I want to create a video using these images. I am using the ffmpeg library for this. Using command line I can create video easily. But how do I do it through coding ?

    Any help will be appreciated.

    #pragma GCC diagnostic ignored "-Wdeprecated-declarations"


    #include
    #include
    #include

    #ifdef HAVE_AV_CONFIG_H
    #undef HAVE_AV_CONFIG_H
    #endif

    extern "C"
    {
    #include "libavutil/imgutils.h"
    #include "libavutil/opt.h"
    #include "libavcodec/avcodec.h"
    #include "libavutil/mathematics.h"
    #include "libavutil/samplefmt.h"
    }

    #define INBUF_SIZE 4096
    #define AUDIO_INBUF_SIZE 20480
    #define AUDIO_REFILL_THRESH 4096




    static void video_encode_example(const char *filename, int codec_id)
    {
      AVCodec *codec;
      AVCodecContext *c= NULL;
      int i, out_size, size, x, y, outbuf_size;
      FILE *f;
      AVFrame *picture;
      uint8_t *outbuf;
      int nrOfFramesPerSecond  =25;
      int nrOfSeconds =1;


      printf("Video encoding\n");

    //    find the mpeg1 video encoder
      codec = avcodec_find_encoder((CodecID) codec_id);
      if (!codec) {
          fprintf(stderr, "codec not found\n");
          exit(1);
      }

      c = avcodec_alloc_context3(codec);
      picture= avcodec_alloc_frame();

    //    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};
      c->gop_size = 10;  //emit one intra frame every ten frames
      c->max_b_frames=1;
      c->pix_fmt = PIX_FMT_YUV420P;

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

    //    open it
      if (avcodec_open2(c, codec, NULL) &lt; 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);
      }

    //    alloc image and output buffer
      outbuf_size = 100000;
      outbuf = (uint8_t*) malloc(outbuf_size);

    //    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
      av_image_alloc(picture->data, picture->linesize,
                     c->width, c->height, c->pix_fmt, 1);

    //    encode 1 second of video
      int nrOfFramesTotal = nrOfFramesPerSecond * nrOfSeconds;

    //    encode 1 second of video
      for(i=0;i &lt; nrOfFramesTotal; i++) {
          fflush(stdout);
    //        prepare a dummy image

          for(y=0;yheight;y++) {
              for(x=0;xwidth;x++) {
                  picture->data[0][y * picture->linesize[0] + x] = x + y + i * 3;
              }
          }

    //        Cb and Cr
          for(y=0;yheight/2;y++) {
              for(x=0;xwidth/2;x++) {
                  picture->data[1][y * picture->linesize[1] + x] = 128 + y + i * 2;
                  picture->data[2][y * picture->linesize[2] + x] = 64 + x + i * 5;
              }
          }

    //        encode the image
          out_size = avcodec_encode_video(c, outbuf, outbuf_size, picture);
          printf("encoding frame %3d (size=%5d)\n", i, out_size);
          fwrite(outbuf, 1, out_size, f);
      }

    //    get the delayed frames
      for(; out_size; i++) {
          fflush(stdout);

          out_size = avcodec_encode_video(c, outbuf, outbuf_size, NULL);
          printf("write frame %3d (size=%5d)\n", i, out_size);
          fwrite(outbuf, 1, out_size, f);
      }

    //    add sequence end code to have a real mpeg file
      outbuf[0] = 0x00;
      outbuf[1] = 0x00;
      outbuf[2] = 0x01;
      outbuf[3] = 0xb7;
      fwrite(outbuf, 1, 4, f);
      fclose(f);
      free(outbuf);

      avcodec_close(c);
    //   av_free(c);
    //   av_free(picture->data[0]);
    //   av_free(picture);
      printf("\n");
    }

    int main(int argc, char **argv)
    {
      const char *filename;


      avcodec_register_all();

      if (argc &lt;= 1) {

          video_encode_example("/home/radix/Desktop/OpenCV/FFMPEG_Output/op89.png", AV_CODEC_ID_H264);
      } else {
          filename = argv[1];
      }


      return 0;
    }
    • On searching everytime i m getting code similar to this.But i don’t understood hot to use it for creating video from images.
  • ffmpeg : avcodec_open2 returns invalid argument

    12 mai 2016, par roari

    i’m reusing the sample code from the developer 64bit release of ffmpeg in my application to encode a video :

    AVCodec* pCodec_{nullptr};
    AVCodecContext* pContext_{nullptr};

    avcodec_register_all();
    pCodec_ = avcodec_find_encoder(AV_CODEC_ID_MPEG2VIDEO);
    if (!pCodec_) {}

    pContext_ = avcodec_alloc_context3(pCodec_);
    if (!pContext_) {}

    pContext_->bit_rate = 400000;
    pContext_->width = size.width();
    pContext_->height = size.height();

    pContext_->time_base.den = 1;
    pContext_->time_base.num = fps;

    pContext_->gop_size = 10;
    pContext_->max_b_frames = 1;
    pContext_->pix_fmt = AV_PIX_FMT_BGR0;

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

    int err = avcodec_open2(pContext_, pCodec_, nullptr);
    if (err &lt; 0) {}

    AVCodec* and AVCodecContext* look like they are allocated correctly. avcodec_open2 then returns invalid argument (-22).

    I use : Windows 10 64, VS2013 Compiler, Qt Creator IDE, ffmpeg(2016-05-12) 64bit.

    The sample i took the code from is "decoding_encoding.c".

    Any ideas ?