Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (78)

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

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (11544)

  • Changing the background color of the movie while using tpad and adelay

    1er août 2019, par S.T

    i want to change the background color of a movie while using tpad and adelay commands. it is now black ( until the movie starts).

    the command i tried listed below, and i don’t know how to change the color while the movie is in it’s delay ( probably something with the tpad that needs to be change).

    -filter_complex [0:v]scale=1920:1080,tpad=start_duration=5[v];
     [0:a]adelay=5s|s[a] -map [v] -map [a] -b 6000k

    the 5 seconds that the movie is in its "waiting mode" needs to be changed from default black to some other color. Thanks.

  • Set the time according to the image height

    5 août 2019, par Võ Nhân

    I am creating video from the image using ffmpeg, I have some problems with image height and video length, I want to set the time automatically according to the image length.Is it possible to set the time -t to the automatic value ?

    ffmpeg -y -loop 1 -i "{output}_cut1.jpg" -ss 0 -t 25 -r 1 -loop 1 -i 01.png -ss 0 -t 25 -filter_complex " [1:v] scale=w=1:h=1[fg]; [0:v] scale=w=-2:h=3*ih, crop=w=3*1988:h=3*1600/1.2:y=t*(in_h-out_h)/25 , scale=w=1920:h=1080,  setsar=1 [bg] ; [bg][fg]overlay=shortest=1[v] " -map "[v]" -c:v h264 -crf 18 -preset ultrafast "{output}_cut1.mp4"
  • Why when using ffmpeg to create in real time avi video file from images the avi file is playing with purple noisy color ?

    30 juin 2015, par Brubaker Haim

    This is my Ffmpeg class i did some time ago

    using System;
    using System.Windows.Forms;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Drawing;
    using System.IO.Pipes;
    using System.Runtime.InteropServices;
    using System.Diagnostics;
    using System.IO;
    using DannyGeneral;

    namespace Manager
    {
       class Ffmpeg
       {
           NamedPipeServerStream p;
           String pipename = "mytestpipe";
           System.Diagnostics.Process process;
           string ffmpegFileName = "ffmpeg.exe";
           string workingDirectory;

           public Ffmpeg()
           {
               workingDirectory = Path.GetDirectoryName(Application.ExecutablePath);
               Logger.Write("workingDirectory: " + workingDirectory);
               if (!Directory.Exists(workingDirectory))
               {
                   Directory.CreateDirectory(workingDirectory);
               }
               ffmpegFileName = Path.Combine(workingDirectory, ffmpegFileName);
               Logger.Write("FfmpegFilename: " + ffmpegFileName);
           }

           public void Start(string pathFileName, int BitmapRate)
           {
               try
               {

                   string outPath = pathFileName;
                   p = new NamedPipeServerStream(pipename, PipeDirection.Out, 1, PipeTransmissionMode.Byte);

                   ProcessStartInfo psi = new ProcessStartInfo();
                   psi.WindowStyle = ProcessWindowStyle.Hidden;
                   psi.UseShellExecute = false;
                   psi.CreateNoWindow = false;
                   psi.FileName = ffmpegFileName;
                   psi.WorkingDirectory = workingDirectory;
                   psi.Arguments = @"-f rawvideo -pix_fmt yuv420p -video_size 1920x1080 -i \\.\pipe\mytestpipe -map 0 -c:v mpeg4 -r " + BitmapRate + " " + outPath;
                   process = Process.Start(psi);
                   process.EnableRaisingEvents = false;
                   psi.RedirectStandardError = true;
                   p.WaitForConnection();
               }
               catch (Exception err)
               {
                   Logger.Write("Exception Error: " + err.ToString());
               }
           }

           public void PushFrame(Bitmap bmp)
           {
               try
               {
                   int length;
                   // Lock the bitmap's bits.
                   //bmp = new Bitmap(1920, 1080);
                   Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
                   //Rectangle rect = new Rectangle(0, 0, 1280, 720);
                   System.Drawing.Imaging.BitmapData bmpData =
                       bmp.LockBits(rect, System.Drawing.Imaging.ImageLockMode.ReadOnly,
                       bmp.PixelFormat);

                   int absStride = Math.Abs(bmpData.Stride);
                   // Get the address of the first line.
                   IntPtr ptr = bmpData.Scan0;

                   // Declare an array to hold the bytes of the bitmap.
                   //length = 3 * bmp.Width * bmp.Height;
                   length = absStride * bmpData.Height;
                   byte[] rgbValues = new byte[length];

                   //Marshal.Copy(ptr, rgbValues, 0, length);
                   int j = bmp.Height - 1;
                   for (int i = 0; i < bmp.Height; i++)
                   {
                       IntPtr pointer = new IntPtr(bmpData.Scan0.ToInt32() + (bmpData.Stride * j));
                       System.Runtime.InteropServices.Marshal.Copy(pointer, rgbValues, absStride * (bmp.Height - i - 1), absStride);
                       j--;
                   }
                   p.Write(rgbValues, 0, length);
                   bmp.UnlockBits(bmpData);
               }
               catch(Exception err)
               {
                   Logger.Write("Error: " + err.ToString());
               }

           }

           public void Close()
           {
               p.Close();
           }
       }
    }

    And i’m using it in form1 in a button click event :

    private void button1_Click(object sender, EventArgs e)
           {
               timer1.Start();
           }

    the directroy screenshots is where i’m taking a screenshot every 100ms in the timer1 tick event :

       ScreenShot shot = new ScreenShot();
       public static int counter = 0;
       private void timer1_Tick(object sender, EventArgs e)
       {
           counter++;
           shot.GetScreenShot(@"e:\screenshots\", "screenshot");
           if (counter == 1200)
           {
               timer1.Stop();
           }
       }

    I’m calling the method PushFrame from inside the ScreenShot class where i save the screenshots.

    Ffmpeg fmpeg;

    Then :

    fmpeg = new Ffmpeg();
    fmpeg.Start(@"e:\screenshots\test.avi", 25);

    And :

    public Bitmap GetScreenShot(string folder, string name)
       {
           _screenShot = new Bitmap(GetScreen());
           System.GC.Collect();
           System.GC.WaitForPendingFinalizers();
           string ingName = folder + name + Elgato_Video_Capture.counter.ToString("D6") + ".bmp";
           _screenShot.Save(ingName);
           fmpeg.PushFrame(_screenShot);
           _screenShot.Dispose();

           return _screenShot;
       }

    All the images on the hard disk are fine i can edit/open them and watch them no problems.
    They are also same size.

    The result in the end is one big avi file 1.08 GB size.
    But when i play it i see many windows running inside very fast and all painted with noisy purple color.

    Here a screenshot from the video file when playing it :

    avi file playing screenshot

    I think the problem is somewhere in the Ffmpeg class where i give parameters to the ffmpeg.exe

    psi.Arguments = @"-f rawvideo -pix_fmt yuv420p -video_size 1920x1080 -i \\.\pipe\mytestpipe -map 0 -c:v mpeg4 -r " + BitmapRate + " " + outPath;

    Not sure what make this avi file to look like that.

    This is the video file the result i got : https://www.youtube.com/watch?v=fdxPus-Xv1k&feature=youtu.be