Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (47)

  • 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

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (10404)

  • Accord.Video.FFMPEG.VideoFileWriter writes different data from the input data

    14 novembre 2017, par Rasool Ahmed

    I’m working on project that encrypting video frames using RC4 algorithm and save these frames in playable video file.

    I used a package named Accord.Video.FFMPEG. This package has a classes (VideoFileReader, & VideoFileWriter) that reads and writes video frames.

    The first step is reads the video :

    VideoHandler v = new VideoHandler();
    OpenFileDialog newimag = new OpenFileDialog();
           if (newimag.ShowDialog() == DialogResult.OK)
           {
               textfile = newimag.FileName;
               picbox.ImageLocation = textfile;
               status1.Text = "loaded";
               //MessageBox.Show("your video file have been loaded seccufly"); // is an idea for viwing message

           }
       bytedata = v.ReadAllFrameBytes(textfile);

    The second step is encrypting the frames of video :

    byte[] bn = new byte[bytedata.Length];// new array to hold the encryptred file

           bn = Encrypt(bytedata, ba);

    The last step is saving the encrypted frames :

    v.WriteFramesData(newfilepath, bn);

    My encrypting algorithm is encrypting and decrypting the cipher with same algorithm and key.

    These stpes works on Text, and Images files, but when I use it on video I can’t restore the encrypted video. After some testings, I found that VideoFileWriter dosn’t write the same input frames. Whyyyyyyy ?

    Here is my VideoFileHandler I made it :

    using System;
    using System.Collections.Generic;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Drawing.Imaging;
    using System.IO;
    using Accord.Video.FFMPEG;
    namespace imgtobyt_1_in_c
    {
    class VideoHandler
    {
       public List data;
       public byte[] imagedata;
       public int Height, Width;
       public byte[] ReadAllFrameBytes(string FileName)
       {
           // create instance of video reader
           VideoFileReader reader = new VideoFileReader();
           // open video file
           reader.Open(FileName);
           Height = reader.Height;
           Width = reader.Width;

           data = new List();
           // read video frames
           for (int i = 0; i < 100; i++) //change 100 to reader.FrameCount
           {
               Bitmap videoFrame = reader.ReadVideoFrame();
               byte[] framebytes = GetBytesFromFrame(videoFrame);
               data.Add(framebytes);
               // dispose the frame when it is no longer required
               videoFrame.Dispose();
           }
           reader.Close();
           imagedata = new byte[data.Count * data[0].Length];
           int c = 0;
           for (int i = 0; i < data.Count; i++)
           {
               byte[] d = data[i];
               for (int x = 0; x < d.Length; x++)
               {
                   imagedata[c] = d[x];
                   c++;
               }
           }
           return imagedata;
       }

       public byte[] GetBytesFromFrame(Bitmap Frame)
       {
           LockBitmap lockBitmap = new LockBitmap(Frame);
           lockBitmap.LockBits();

           byte[] framebytes = new byte[Frame.Width * Frame.Height * 3];
           int z = 0;
           for (int x = 0; x < lockBitmap.Height; x++)
               for (int y = 0; y < lockBitmap.Width; y++)
               {
                   Color Pixel = lockBitmap.GetPixel(y, x);
                   framebytes[z] = Pixel.R;
                   z++;
                   framebytes[z] = Pixel.G;
                   z++;
                   framebytes[z] = Pixel.B;
                   z++;
               }

           lockBitmap.UnlockBits();
           return framebytes;
           //using (var stream = new MemoryStream())
           //{
           //    Frame.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
           //    return stream.ToArray();
           //}
       }

       public Bitmap GetFrameFromBytes(byte[] Framebytes, ref int offset, int Width, int Height)
       {
           Bitmap Frame = new Bitmap(Width, Height, PixelFormat.Format24bppRgb);
           LockBitmap lockBitmap = new LockBitmap(Frame);
           lockBitmap.LockBits();
           for (int x = 0; x < Height; x++)
               for (int y = 0; y < Width; y++)
               {
                   Color Pixel = Color.FromArgb(Framebytes[offset], Framebytes[offset + 1], Framebytes[offset + 2]); offset += 3;
                   lockBitmap.SetPixel(y, x, Pixel);
               }

           lockBitmap.UnlockBits();

           return Frame;
           //Bitmap bmp;
           //using (var ms = new MemoryStream(Framebytes))
           //{
           //    bmp = new Bitmap(ms);
           //}
           //return bmp;
       }

       public void WriteFramesData(string FileName, byte[] data)
       {
           // create instance of video writer
           VideoFileWriter writer = new VideoFileWriter();
           // create new video file
           writer.Open(FileName, Width, Height);

           int offset = 0;
           // write video frames
           for (int i = 0; i < 100; i++)
           {
               // create a bitmap to save into the video file
               Bitmap Frame = GetFrameFromBytes(data, ref offset, Width, Height);
               writer.WriteVideoFrame(Frame);
           }
           writer.Close();
       }
    }
    }

    Please, I need to make this works.

  • How to get your Matomo plugin ready for GDPR

    24 avril 2018, par Matomo Core Team

    Are you developing a plugin for your self-hosted Matomo ? Have you maybe published a plugin on the Matomo Marketplace ? Then we highly recommend you read this article.

    On 25th May 2018, new privacy regulations become effective called GDPR (General Data Protection Regulation) which applies to businesses worldwide. It is also known under different wordings in other countries, for example to RGPD in French and Datenschutz-Grundverordnung, DS-GVO in German.

    If your plugin is storing any personal information or tracks or imports any data, we highly recommend you give the GDPR guide a read. You may also want to read our blog as we are releasing new content about GDPR regularly.

    In Matomo 3.5.0, we will introduce new features for GDPR and we implemented it in a way that most – but not all – plugins will support these features out of the box without having to do anything.

    Nevertheless, we recommend every plugin developer to check out our developer guide on how to make your plugin GDPR compliant to see what you need to do. A beta version of Matomo 3.5.0 is already available so you can test these new features. You can find them by logging in to your Matomo and going to “Administration => Privacy”.

    Please note that any version of Piwik will not be GDPR compliant, so it is recommended that your plugin supports the latest version of Matomo (3.5.0+).

    The post How to get your Matomo plugin ready for GDPR appeared first on Analytics Platform - Matomo.

  • FFmpeg frame rate when converting from GIF to MP4

    13 juillet 2014, par Mahesh

    I have a GIF image. I am trying to convert it to MP4.

    ffmpeg -f image2 -r {delay_time_of_gif_between_each_frame}/1 -i temp/%05d.png -vcodec libx264 video.mp4

    This MP4 is not running at the same speed when compared to the original GIF. How do I make it to run with the same speed ?

    It seems I am making mistakes with the -r property. I played with it but don’t get anything useful. I even removed it. Still it isn’t working.