Recherche avancée

Médias (91)

Autres articles (48)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • 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

Sur d’autres sites (9950)

  • Video Streaming shows not working in Micorsoft Edge

    22 novembre 2018, par Ragesh S

    I am newbi in using Video streaming in ASP.Net MVC project. I have a video library webpplication, most of the videos are .mp4 format. Please see my code below.

    Code

    public HttpResponseMessage Get(string filename)
       {
           var filePath = new FileStreameHelpers().GetFilePath(filename);
           if (!File.Exists(filePath))
               return new HttpResponseMessage(HttpStatusCode.NotFound);

           var response = Request.CreateResponse();
           response.Headers.AcceptRanges.Add("bytes");

           var streamer = new FileStreameHelpers();
           streamer.FileInfo = new FileInfo(filePath);
           response.Content = new PushStreamContent(streamer.WriteToStream, new FileStreameHelpers().GetMimeType(Path.GetExtension(filePath)));

           RangeHeaderValue rangeHeader = Request.Headers.Range;
           if (rangeHeader != null)
           {
               long totalLength = streamer.FileInfo.Length;
               var range = rangeHeader.Ranges.First();
               streamer.Start = range.From ?? 0;
               streamer.End = range.To ?? totalLength - 1;

               response.Content.Headers.ContentLength = streamer.End - streamer.Start + 1;
               response.Content.Headers.ContentRange = new ContentRangeHeaderValue(streamer.Start, streamer.End,
                   totalLength);
               response.StatusCode = HttpStatusCode.PartialContent;
           }
           else
           {
               response.StatusCode = HttpStatusCode.OK;
           }

           return response;
       }
     public async Task WriteToStream(Stream outputStream, HttpContent content, TransportContext context)
       {
           try
           {
               var buffer = new byte[6553600];
               using (var video = FileInfo.OpenRead())
               {
                   if (End == -1)
                   {
                       End = video.Length;
                   }
                   var position = Start;
                   var bytesLeft = End - Start + 1;
                   video.Position = Start;
                   while (position <= End)
                   {
                       var bytesRead = video.Read(buffer, 0, (int)Math.Min(bytesLeft, buffer.Length));
                       await outputStream.WriteAsync(buffer, 0, bytesRead);
                       position += bytesRead;
                       bytesLeft = End - position + 1;
                   }
               }
           }
           catch (Exception ex)
           {
               // fail silently
               Utilities.SaveException("FileStreameHelpers - WriteToStream", ex);
           }
           finally
           {
               outputStream.Close();
           }
       }

    it works fine in Firefox and Chrome but it shows error in Microsoft Edge browser like below.

    HTML

    <video width="320" height="240" controls="controls">
       <source src="/api/Media/Get?filename=SampleVideo_1280x720_1mb.mp4" type="video/mp4">
       Your browser does not support the video tag.
    </source></video>

    The remote host closed the connection. The error code is 0x800703E3.

    Please advice.

  • avfilter/vf_corr : for all zero returns zero score instead of 1

    3 décembre 2023, par Paul B Mahol
    avfilter/vf_corr : for all zero returns zero score instead of 1
    
    • [DH] libavfilter/vf_corr.c
  • libavcodec avcodec_open2 returns -22

    28 juillet 2012, par buchtak

    I am trying to learn how to encode video using libavcodec library. I use the following initialization :

    avcodec_register_all();

    // This works fine.
    AVCodec *avcodec = avcodec_find_encoder( CODEC_ID_H264 );

    AVCodecContext *avctx = avcodec_alloc_context3( avcodec );
    avctx->bit_rate      = 400000;
    avctx->width         = 640;
    avctx->height        = 480;
    avctx->time_base.den = 15;
    avctx->time_base.num = 1;
    avctx->gop_size      = 10;
    avctx->max_b_frames  = 1;
    avctx->pix_fmt       = PIX_FMT_YUV420P;
    av_opt_set( avctx->priv_data, "preset", "slow", 0 );

    // ret should be zero, but it&#39;s negative
    int ret = avcodec_open2( avctx, avcodec, NULL );

    However, avcodec_open2(...) always returns a negative value. The avcodec_find_encoder(...) works fine and the returned pointer is not NULL. I use Win7 x64, 64-bit Zeranoe FFmpeg build from

    http://ffmpeg.zeranoe.com/builds/

    According to the readme the FFmpeg version is 2012-06-22 git-c17808c built with --enable-libx264. I also tried CODEC_ID_MPEG1VIDEO and changing some of the initialization parameters, but no matter what I do, the avcodec_open2(...) always returns value -22. The decoding/encoding example provided with the Zeranoe build (it's the same one as http://ffmpeg.org/doxygen/trunk/api-example_8c-source.html) does not work either...