Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (48)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • MediaSPIP Init et Diogène : types de publications de MediaSPIP

    11 novembre 2010, par

    À l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
    Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
    Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)

  • Installation en mode standalone

    4 février 2011, par

    L’installation de la distribution MediaSPIP se fait en plusieurs étapes : la récupération des fichiers nécessaires. À ce moment là deux méthodes sont possibles : en installant l’archive ZIP contenant l’ensemble de la distribution ; via SVN en récupérant les sources de chaque modules séparément ; la préconfiguration ; l’installation définitive ;
    [mediaspip_zip]Installation de l’archive ZIP de MediaSPIP
    Ce mode d’installation est la méthode la plus simple afin d’installer l’ensemble de la distribution (...)

Sur d’autres sites (3544)

  • Could not load file or assembly 'accord.video.ffmpeg.x64.dll' or one of its dependencies

    15 novembre 2022, par malt_man

    I'm using Accord.video.ffmpeg.x64. My project is built in x64 as well. It is a click once windows forms application. I installed accord through nuget. C++ redistributor is installed.

    



    Everything works fine when I run the program from debug. But when I publish it and try to run it (on the same machine or any other machine) I get the error "could not load file or assembly 'accord.video.ffmpeg.x64.dll' or one of its dependencies."

    



    Thank you for any help you can provide.

    


  • Revision 65043 : Accord au singulier

    20 août 2012, par real3t@… — Log

    Accord au singulier

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