Recherche avancée

Médias (91)

Autres articles (27)

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

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (3937)

  • Google Analytics 4 (GA4) vs Matomo

    7 avril 2022, par Erin

    Google announced that Universal Analytics’ days are numbered. Universal Analytics will be replaced by Google Analytics 4 (or GA4) on the 1st of July 2023. 

    If Google Analytics users want to compare year-on-year data, they have until July 2022 to get set up and start collecting data before the sun sets on Universal Analytics (or UA).

    But is upgrading to Google Analytics 4 the right move ? There’s a lot to consider, and many organisations are looking for an alternative to Google Analytics. So in this blog, we’ll compare GA4 to Matomo – the leading Google Analytics alternative. 

    In this blog, we’ll look at :

    What is Matomo ?

    Matomo is a powerful privacy-first web analytics platform that gives you 100% data ownership. First launched in 2007, Matomo is now the world’s leading open-source web analytics platform and is used by more than 1 million websites. 

    Matomo’s core values are based on ethical data collection and processing. Consistently more businesses and organisations from around the globe are adopting data-privacy-compliant web analytics solutions like Matomo. 

    Matomo offers both Cloud and On-Premise solutions (and a five-star rated WordPress plugin), making for an adaptable and flexible solution. 

    What is Google Analytics 4 ?

    Google Analytics 4 is the latest version of Google Analytics and represents a completely new approach to data-modelling than its predecessor, Universal Analytics. For an in-depth look at how GA4 and UA compare, check out this Google Analytics 4 vs Universal Analytics comparison

    Google Analytics 4 will soon be the only available version of analytics software from Google. So what’s the issue ? Surely, in 2022, Google makes it easy to migrate to their newest (and only) analytics platform ? Not quite.

    Google Analytics 4 vs Matomo

    Whilst the core purpose of GA4 and Matomo is similar (providing web analytics that help to optimise your website and grow your business), there are several key differences that organisations should consider before making the switch.

    Importing Historical Data from Universal Analytics

    Google Analytics 4

    Users assuming that historical data from Universal Analytics could be imported into Google Analytics 4 were faced with swift disappointment. Unfortunately, Google Analytics 4 does not have an option to import data from its predecessor, Universal Analytics. This means that businesses won’t be able to import and compare data from previous years.

    Matomo

    If you don’t want to start from scratch with your web analytics data, then Matomo is an ideal solution for data continuity. Matomo offers users the ability to import their historical Universal Analytics data. So you can keep all that valuable historical data you’ve collected over the years.

    Google Analytics 4 Migration
    Tino Didriksen via Twitter

    User Interface

    Google Analytics 4

    GA4’s new user interface has been met with mixed reviews. Many claim that it’s overly complex and difficult to navigate. Some have even suggested that the tool has been designed specifically for enterprises with specialised analytics teams. 

    Kevin Levesquea via Twitter

    Matomo

    Matomo, on the other hand, is recognised for an easy to use interface, with a rating of 4.5 out of 5 stars for ease of use on Capterra. Matomo perfectly balances powerful features with a user-friendly interface so valuable insights are only a click away. There’s a reason why over 1 million websites are using Matomo. 

    Matomo Features

    Advanced Behavioural Analytics Features 

    Google Analytics 4

    While Google Analytics is undoubtedly robust in some areas (machine learning, for instance), what it really lacks is advanced behavioural analytics. Heatmaps, session recordings and other advanced tools can give you valuable insights into how users are engaging with your site. Well beyond pageviews and other metrics.

    Unfortunately, with this new generation of GA, Google still hasn’t introduced these features. So users have to manage subscriptions and tracking in third-party behavioural analytics tools like Hotjar or Lucky Orange, for example. This is inefficient, costly and time-consuming to manage. 

    Matomo Heatmaps Feature

    Matomo 

    Meanwhile, Matomo is a one-stop shop for all of your web analytics needs. Not only do you get access to the metrics you’ve grown accustomed to with Universal Analytics, but you also get built-in behavioural analytics features like Heatmaps, Scroll Depth, Session Recordings and more. 

    Want to know if visitors are reaching your call to action at the bottom of the page ? Scroll Depth will answer that.

    Want to know why visitors aren’t clicking through to the next page ? Heatmaps will give you the insights you need.

    You get the picture – the full picture, that is. 

    All-in-one web analytics

    Data Accuracy

    Google Analytics 4

    GA4 aims to make web and app analytics more privacy-centric by reducing the reliance on cookies to record certain events across platforms and devices. 

    However, when site and application visitors opt-out of cookie tracking, GA4 instead relies on machine learning to fill in the gaps. Data sampling could mean that your business is making business decisions based on inaccurate reports. 

    Matomo

    Data is the backbone of web analytics, so why make critical business decisions on sampled data ? With Matomo, you’re guaranteed 100% unsampled accurate data. So you can rest assured that any decisions you make are based on actual facts. 

    Compliance with Privacy Laws (GDPR, CCPA, etc.) 

    Google Analytics 4

    Google is making changes in an attempt to become compliant with privacy laws. However, even with GA4, users are still transferring data to the US. For this reason, both Austrian and French governments have ruled Google Analytics illegal under GDPR.

    The only possible workaround is “Privacy Shield 2.0”, but GDPR experts are still sceptical of this one. 

    Matomo

    If compliance with global privacy laws is a concern (and it should be), then Matomo is the clear winner here. 

    As an EU hosted web analytics tool, your data is stored in Europe, and no data is transferred to the US. On the other hand, if you choose to self-host, the data is stored in your country of choice.

    In addition, with cookieless tracking enabled, you can say goodbye to those pesky cookie consent screens. 

    Also, remember that under GDPR, and many other data privacy laws like CCPA and LGPD, end users have a legal right to access, amend and/or erase the personal data collected about them. 

    With Matomo you get 100% ownership of your web analytics data. This means that we don’t on-sell to third parties ; can’t claim ownership of the data ; and you can export your data at any time.

    Matomo vs GA4
    @tersmantoll via Twitter

    Wrap up

    At the end of the day, the worst thing an organisation can do is nothing. Waiting until July 2023 to migrate to GA4 or another web analytics platform would be very disruptive and costly. Organisations need to consider their options now and start migrating in the next few months. 

    With all that said, moving to Google Analytics 4 could prove to be a costly and time-consuming operation. The global trend towards increased data privacy is a threat to platforms like Google Analytics which uses data for advertising and transfers data across borders.

    With Matomo, you get an easy to use all-in-one web analytics platform and keep your historical Universal Analytics data. Plus, you can future-proof your business by being compliant with global privacy laws and get access to advanced behavioural analytics features. 

    There’s a lot to weigh up here but fortunately, getting started with Matomo is easy. Try it free for 21-days (no credit card required) and see for yourself why over 1 million websites choose Matomo. 

    While this is the end of the road for Universal Analytics, it’s also an opportune time for organisations to find a better fit web analytics tool. 

  • Issues with video frame dropout using Accord.NET VideoFileWriter and FFMPEG

    9 janvier 2018, par David

    I am testing out writing video files using the Accord.Video library. I have a WPF project created in Visual Studio 2017, and I have installed Accord.Video.FFMPEG as well as Accord.Video.VFW using Nuget, as well as their dependencies.

    I have created a very simple video to test basic file output. However, I am running into some issues. My goal is to be able to output videos with a variable frame rate, because in the future I will be using this code to input images from a webcam device that will then be saved to a video file, and video from webcams typically has variable frame rates.

    For now, in this example, I am not inputting video from a webcam, but rather I am generating a simple "moving box" image and outputting the frames to a video file. The box changes color every 20 frames : red, green, blue, yellow, and finally white. I also set the frame rate to be 20 fps.

    When I use Accord.Video.VFW, the frame rate is correctly set, and all the frames are correctly outputted to the video file. The resulting video looks like this (see the YouTube link) : https://youtu.be/K8E9O7bJIbg

    This is just a reference, however. I don’t intend on using Accord.Video.VFW because it outputs uncompressed data to an AVI file, and it doesn’t support variable frame rates. I would like to use Accord.Video.FFMPEG because it is supposed to support variable frame rates.

    When I attempt to use the Accord.Video.FFMPEG library, however, the video does not result in how I would expect it to look. Here is a YouTube link : https://youtu.be/cW19yQFUsLI

    As you can see, in that example, the box remains the first color for a longer amount of time than the other colors. It also never reaches the final color (white). When I inspect the video file, 100 frames were not outputted to the file. There are 69 or 73 frames typically. And the expected frame rate and duration obviously do not match up.

    Here is the code that generates both these videos :

    public MainWindow()
    {
       InitializeComponent();

       Accord.Video.VFW.AVIWriter avi_writer = new Accord.Video.VFW.AVIWriter();
       avi_writer.FrameRate = 20;
       avi_writer.Open("test2.avi", 640, 480);

       Accord.Video.FFMPEG.VideoFileWriter k = new Accord.Video.FFMPEG.VideoFileWriter();
       k.FrameRate = 20;
       k.Width = 640;
       k.Height = 480;
       k.Open("test.mp4");
       for (int i = 0; i < 100; i++)
       {
           TimeSpan t = new TimeSpan(0, 0, 0, 0, 50 * i);
           var b = new System.Drawing.Bitmap(640, 480);
           var g = Graphics.FromImage(b);
           var br = System.Drawing.Brushes.Blue;
           if (t.TotalMilliseconds < 1000)
               br = System.Drawing.Brushes.Red;
           else if (t.TotalMilliseconds < 2000)
               br = System.Drawing.Brushes.Green;
           else if (t.TotalMilliseconds < 3000)
               br = System.Drawing.Brushes.Blue;
           else if (t.TotalMilliseconds < 4000)
               br = System.Drawing.Brushes.Yellow;
           else
               br = System.Drawing.Brushes.White;

           g.FillRectangle(br, 50 + i, 50, 100, 100);
           System.Console.WriteLine("Frame: " + (i + 1).ToString() + ", Millis: " + t.TotalMilliseconds.ToString());

           #region This is the code in question

           k.WriteVideoFrame(b, t);
           avi_writer.AddFrame(b);

           #endregion
       }

       avi_writer.Close();
       k.Close();
       System.Console.WriteLine("Finished writing video");
    }

    I have tried changing a few things under the assumption that maybe the "WriteVideoFrame" function isn’t able to finish in time, and so I need to slow down the program so it can complete itself. Under that assumption, I have replaced the "WriteVideoFrame" call with the following code :

    Task taskA = new Task(() => k.WriteVideoFrame(b, t));
    taskA.Start();
    taskA.Wait();

    And I have tried the following code :

    Task.WaitAll(
       Task.Run( () =>
       {
           lock(syncObj)
           {
               k.WriteVideoFrame(b, t);
           }
       }
    ));

    And even just a standard call where I don’t specify a timestamp :

    k.WriteVideoFrame(b);

    None of these work. They all result in something similar.

    Any suggestions on getting the WriteVideoFrame function to work that is a part of the Accord.Video.FFMPEG.VideoFileWriter class ?

    Thanks for any and all help !

    [edits below]

    I have done some more investigating. I still haven’t found a good solution, but here is what I have found so far. After declaring my VideoFileWriter object, I have tried setting up some options for the video.

    When I use an H264 codec with the following options, it correctly saves 100 frames at a frame-rate of 20 fps, however any normal media player (both VLC and Windows Media Player) end up playing a 10-second video instead of a 5-second video. Essentially, it seems like they play it at half-speed. Here is the code that gives that result :

    k.VideoCodec = Accord.Video.FFMPEG.VideoCodec.H264;
    k.VideoOptions["crf"] = "18";
    k.VideoOptions["preset"] = "veryfast";
    k.VideoOptions["tune"] = "zerolatency";
    k.VideoOptions["x264opts"] = "no-mbtree:sliced-threads:sync-lookahead=0";

    Additionally, if I use an Mpeg4 codec, I get the same "half-speed" result :

    k.VideoCodec = Accord.Video.FFMPEG.VideoCodec.Mpeg4;

    However, if I use a WMV codec, then it correctly results in 100 frames at 20 fps, and a 5 second video that is correctly played by both media players :

    k.VideoCodec = Accord.Video.FFMPEG.VideoCodec.Wmv1;

    Although this is good news, this still doesn’t solve the problem because WMV doesn’t support variable frame rates. Also, this still doesn’t answer the question as to why the problem is happening in the first place.

    As always, any help would be appreciated !

  • Is there another way to export a frame in ffmpeg to a texture2d ? My code working in Windows but not Linux

    5 décembre 2024, par Robert Russell

    Sound is working in Linux the same as it did in Windows. But the video is just a black screen and when I attempt to save the frames as BMP files all of them were corrupt/empty files. I am using Ffmpeg.Autogen to interface with the libraries. https://github.com/Ruslan-B/FFmpeg.AutoGen. The file is VP8 and OGG in a MKV container. Though the extension is AVI for some reason.

    



    I tried messing with the order of the code a bit. I checked to make sure the build of Ffmpeg on Linux had VP8. I was searching online but was having trouble finding another way to do what I am doing. This is to contribute to the OpenVIII project. My fork-> https://github.com/Sebanisu/OpenVIII

    



    This just preps the scaler to change the pixelformat or else people have blue faces.

    



            private void PrepareScaler()
        {

            if (MediaType != AVMediaType.AVMEDIA_TYPE_VIDEO)
            {
                return;
            }

            ScalerContext = ffmpeg.sws_getContext(
                Decoder.CodecContext->width, Decoder.CodecContext->height, Decoder.CodecContext->pix_fmt,
                Decoder.CodecContext->width, Decoder.CodecContext->height, AVPixelFormat.AV_PIX_FMT_RGBA,
                ffmpeg.SWS_ACCURATE_RND, null, null, null);
            Return = ffmpeg.sws_init_context(ScalerContext, null, null);

            CheckReturn();
        }


    



    Converts Frame to BMP
I am thinking this is where the problem is. Because I had added bitmap.save to this and got empty BMPs.

    



    public Bitmap FrameToBMP()
        {
            Bitmap bitmap = null;
            BitmapData bitmapData = null;

            try
            {
                bitmap = new Bitmap(Decoder.CodecContext->width, Decoder.CodecContext->height, PixelFormat.Format32bppArgb);
                AVPixelFormat v = Decoder.CodecContext->pix_fmt;

                // lock the bitmap
                bitmapData = bitmap.LockBits(new Rectangle(0, 0, Decoder.CodecContext->width, Decoder.CodecContext->height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);

                byte* ptr = (byte*)(bitmapData.Scan0);

                byte*[] srcData = { ptr, null, null, null };
                int[] srcLinesize = { bitmapData.Stride, 0, 0, 0 };

                // convert video frame to the RGB bitmap
                ffmpeg.sws_scale(ScalerContext, Decoder.Frame->data, Decoder.Frame->linesize, 0, Decoder.CodecContext->height, srcData, srcLinesize); //sws_scale broken on linux?
            }
            finally
            {
                if (bitmap != null && bitmapData != null)
                {
                    bitmap.UnlockBits(bitmapData);
                }
            }
            return bitmap;

        }


    



    After I get a bitmap we turn it into a Texture2D so we can draw it.

    



     public Texture2D FrameToTexture2D()
        {
            //Get Bitmap. there might be a way to skip this step.
            using (Bitmap frame = FrameToBMP())
            {
                //string filename = Path.Combine(Path.GetTempPath(), $"{Path.GetFileNameWithoutExtension(DecodedFileName)}_rawframe.{Decoder.CodecContext->frame_number}.bmp");

                //frame.Save(filename);
                BitmapData bmpdata = null;
                Texture2D frameTex = null;
                try
                {
                    //Create Texture
                    frameTex = new Texture2D(Memory.spriteBatch.GraphicsDevice, frame.Width, frame.Height, false, SurfaceFormat.Color); //GC will collect frameTex
                                                                                                                                        //Fill it with the bitmap.
                    bmpdata = frame.LockBits(new Rectangle(0, 0, frame.Width, frame.Height), System.Drawing.Imaging.ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);// System.Drawing.Imaging.PixelFormat.Format32bppArgb);
                    byte[] texBuffer = new byte[bmpdata.Width * bmpdata.Height * 4]; //GC here
                    Marshal.Copy(bmpdata.Scan0, texBuffer, 0, texBuffer.Length);

                    frameTex.SetData(texBuffer);


                }
                finally
                {
                    if (bmpdata != null)
                    {
                        frame.UnlockBits(bmpdata);
                    }
                }
                return frameTex;

            }
        }


    



    I can post more if you want it's pretty much all up on my fork

    



    Video will play back as it does in Windows. As smooth as 15 fps can be. :)