Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (66)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

Sur d’autres sites (10553)

  • Issue #1 when compiling Xuggler for Raspberry pi with libspeex

    23 juillet 2014, par Ashish Sharma

    I am trying to compile Xuggler for Raspberry Pi(Running on Debian OS aka Raspbian),

    I followed the ’Basic Build Instructions’ available here for compiling Xuggler.

    After I successfully installed all the prerequisites and set the correct paths, I ran the following command :

    ant run-tests

    After sometime I am facing the following error and the ant build fails :

    scroll at the end of log to see the issue

    [exec] Making all in libspeex
    [exec] make[2]: Entering directory `/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/libspeex'
    [exec] Incarcerated package must be reconfigured; regenerating out of date captive Makefile from: ../../../../../captive/libspeex/csrc/configure
    [exec] /bin/mkdir -p csrc
    [exec] cd csrc && sh ../incarcerate
    [exec] checking for a BSD-compatible install... /usr/bin/install -c
    [exec] checking whether build environment is sane... yes
    [exec] checking for a thread-safe mkdir -p... /bin/mkdir -p
    [exec] checking for gawk... no
    [exec] checking for mawk... mawk
    [exec] checking whether make sets $(MAKE)... yes
    [exec] checking build system type... armv6l-unknown-linux-gnu
    [exec] checking host system type... armv6l-unknown-linux-gnu
    [exec] checking how to print strings... printf
    [exec] checking for style of include used by make... GNU
    [exec] checking for gcc... gcc
    [exec] checking whether the C compiler works... yes
    [exec] checking for C compiler default output file name... a.out
    [exec] checking for suffix of executables...
    [exec] checking whether we are cross compiling... no
    [exec] checking for suffix of object files... o
    [exec] checking whether we are using the GNU C compiler... yes
    [exec] checking whether gcc accepts -g... yes
    [exec] checking for gcc option to accept ISO C89... none needed
    [exec] checking dependency style of gcc... none
    [exec] checking for a sed that does not truncate output... /bin/sed
    [exec] checking for grep that handles long lines and -e... /bin/grep
    [exec] checking for egrep... /bin/grep -E
    [exec] checking for fgrep... /bin/grep -F
    [exec] checking for ld used by gcc... /usr/bin/ld
    [exec] checking if the linker (/usr/bin/ld) is GNU ld... yes
    [exec] checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
    [exec] checking the name lister (/usr/bin/nm -B) interface... BSD nm
    [exec] checking whether ln -s works... yes
    [exec] checking the maximum length of command line arguments... 805306365
    [exec] checking whether the shell understands some XSI constructs... yes
    [exec] checking whether the shell understands "+="... yes
    [exec] checking how to convert armv6l-unknown-linux-gnu file names to armv6l-unknown-linux-gnu format... func_convert_file_noop
    [exec] checking how to convert armv6l-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
    [exec] checking for /usr/bin/ld option to reload object files... -r
    [exec] checking for objdump... objdump
    [exec] checking how to recognize dependent libraries... pass_all
    [exec] checking for dlltool... false
    [exec] checking how to associate runtime and link libraries... printf %s\n
    [exec] checking for archiver @FILE support... @
    [exec] checking for strip... strip
    [exec] checking for ranlib... ranlib
    [exec] checking command to parse /usr/bin/nm -B output from gcc object... ok
    [exec] checking for sysroot... no
    [exec] checking for mt... mt
    [exec] checking if mt is a manifest tool... no
    [exec] checking how to run the C preprocessor... gcc -E
    [exec] checking for ANSI C header files... yes
    [exec] checking for sys/types.h... yes
    [exec] checking for sys/stat.h... yes
    [exec] checking for stdlib.h... yes
    [exec] checking for string.h... yes
    [exec] checking for memory.h... yes
    [exec] checking for strings.h... yes
    [exec] checking for inttypes.h... yes
    [exec] checking for stdint.h... yes
    [exec] checking for unistd.h... yes
    [exec] checking for dlfcn.h... yes
    [exec] checking for objdir... .libs
    [exec] checking if gcc supports -fno-rtti -fno-exceptions... no
    [exec] checking for gcc option to produce PIC... -fPIC -DPIC
    [exec] checking if gcc PIC flag -fPIC -DPIC works... yes
    [exec] checking if gcc static flag -static works... yes
    [exec] checking if gcc supports -c -o file.o... yes
    [exec] checking if gcc supports -c -o file.o... (cached) yes
    [exec] checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
    [exec] checking dynamic linker characteristics... GNU/Linux ld.so
    [exec] checking how to hardcode library paths into programs... immediate
    [exec] checking whether stripping libraries is possible... yes
    [exec] checking if libtool supports shared libraries... yes
    [exec] checking whether to build shared libraries... no
    [exec] checking whether to build static libraries... yes
    [exec] checking whether to enable maintainer-specific portions of Makefiles... no
    [exec] checking whether byte ordering is bigendian... no
    [exec] checking for an ANSI C-conforming const... yes
    [exec] checking for inline... inline
    [exec] checking for C/C++ restrict keyword... __restrict
    [exec] checking for C99 variable-size arrays... yes
    [exec] checking alloca.h usability... yes
    [exec] checking alloca.h presence... yes
    [exec] checking for alloca.h... yes
    [exec] checking getopt.h usability... yes
    [exec] checking getopt.h presence... yes
    [exec] checking for getopt.h... yes
    [exec] checking for alloca... yes
    [exec] checking for SSE in current arch/CFLAGS... no
    [exec] checking for ELF visibility... yes
    [exec] checking sys/soundcard.h usability... yes
    [exec] checking sys/soundcard.h presence... yes
    [exec] checking for sys/soundcard.h... yes
    [exec] checking sys/audioio.h usability... no
    [exec] checking sys/audioio.h presence... no
    [exec] checking for sys/audioio.h... no
    [exec] checking for Ogg... yes
    [exec] checking for sin in -lm... yes
    [exec] checking for getopt_long... yes
    [exec] checking for main in -lwinmm... no
    [exec] checking for pkg-config... /usr/bin/pkg-config
    [exec] checking pkg-config is at least version 0.9.0... yes
    [exec] checking size of short... 0
    [exec] checking size of int... 0
    [exec] checking size of long... 0
    [exec] configure: creating ./config.status
    [exec] config.status: creating Makefile
    [exec] config.status: creating libspeex/Makefile
    [exec] config.status: creating src/Makefile
    [exec] config.status: creating doc/Makefile
    [exec] config.status: creating Speex.spec
    [exec] config.status: creating include/Makefile
    [exec] config.status: creating include/speex/Makefile
    [exec] config.status: creating speex.pc
    [exec] config.status: creating speexdsp.pc
    [exec] config.status: creating win32/Makefile
    [exec] config.status: creating win32/libspeex/Makefile
    [exec] config.status: creating win32/speexenc/Makefile
    [exec] config.status: creating win32/speexdec/Makefile
    [exec] config.status: creating symbian/Makefile
    [exec] config.status: creating win32/VS2003/Makefile
    [exec] config.status: creating win32/VS2003/tests/Makefile
    [exec] config.status: creating win32/VS2003/libspeex/Makefile
    [exec] config.status: creating win32/VS2003/libspeexdsp/Makefile
    [exec] config.status: creating win32/VS2003/speexdec/Makefile
    [exec] config.status: creating win32/VS2003/speexenc/Makefile
    [exec] config.status: creating win32/VS2005/Makefile
    [exec] config.status: creating win32/VS2005/libspeex/Makefile
    [exec] config.status: creating win32/VS2005/speexdec/Makefile
    [exec] config.status: creating win32/VS2005/speexenc/Makefile
    [exec] config.status: creating win32/VS2005/libspeexdsp/Makefile
    [exec] config.status: creating win32/VS2005/tests/Makefile
    [exec] config.status: creating win32/VS2008/libspeexdsp/Makefile
    [exec] config.status: creating win32/VS2008/Makefile
    [exec] config.status: creating win32/VS2008/speexdec/Makefile
    [exec] config.status: creating win32/VS2008/tests/Makefile
    [exec] config.status: creating win32/VS2008/libspeex/Makefile
    [exec] config.status: creating win32/VS2008/speexenc/Makefile
    [exec] config.status: creating include/speex/speex_config_types.h
    [exec] config.status: creating ti/Makefile
    [exec] config.status: creating ti/speex_C54_test/Makefile
    [exec] config.status: creating ti/speex_C55_test/Makefile
    [exec] config.status: creating ti/speex_C64_test/Makefile
    [exec] config.status: creating config.h
    [exec] config.status: executing depfiles commands
    [exec] config.status: executing libtool commands
    [exec] Type "make; make install" to compile and install Speex
    [exec] Incarcerated package configured: ../../../../../captive/libspeex
    [exec] Incarcerating package ../../../../../captive/libspeex to fake DESTDIR=/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/stage
    [exec] make[3]: Entering directory `/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/libspeex/csrc'
    [exec] make  all-recursive
    [exec] make[4]: Entering directory `/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/libspeex/csrc'
    [exec] Making all in libspeex
    [exec] make[4]: *** [all-recursive] Error 1
    [exec] make[3]: *** [all] Error 2
    [exec] make[4]: Leaving directory `/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/libspeex/csrc'
    [exec] make[3]: Leaving directory `/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/libspeex/csrc'
    [exec] Out of date files; re-running make
    [exec] make[3]: Entering directory `/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/libspeex/csrc'
    [exec] make  all-recursive
    [exec] make[4]: Entering directory `/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/libspeex/csrc'
    [exec] Making all in libspeex
    [exec] make[5]: Entering directory `/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/libspeex/csrc/libspeex'
    [exec] /bin/bash ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/../../../../captive/libspeex/csrc/libspeex -I.. -I/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/../../../../captive/libspeex/csrc/include -I../include -I.. -I/home/pi/Downloads/xuggler/include     -I/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/stage/home/pi/Downloads/xuggler/include  -fvisibility=hidden -O3 -msse -c -o cb_search.lo /home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/../../../../captive/libspeex/csrc/libspeex/cb_search.c
    [exec] libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/../../../../captive/libspeex/csrc/libspeex -I.. -I/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/../../../../captive/libspeex/csrc/include -I../include -I.. -I/home/pi/Downloads/xuggler/include -I/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/stage/home/pi/Downloads/xuggler/include -fvisibility=hidden -O3 -msse -c /home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/../../../../captive/libspeex/csrc/libspeex/cb_search.c  -fPIC -DPIC -o cb_search.o
    [exec] cc1: error: unrecognized command line option '-msse'
    [exec] make[5]: *** [cb_search.lo] Error 1
    [exec] make[4]: *** [all-recursive] Error 1
    [exec] make[3]: *** [all] Error 2
    [exec] make[2]: *** [all-local] Error 2
    [exec] make[1]: *** [all-recursive] Error 1
    [exec] make: *** [all-recursive] Error 1
    [exec] make[5]: Leaving directory `/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/libspeex/csrc/libspeex'
    [exec] make[4]: Leaving directory `/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/libspeex/csrc'
    [exec] make[3]: Leaving directory `/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/libspeex/csrc'
    [exec] make[2]: Leaving directory `/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/libspeex'
    [exec] make[1]: Leaving directory `/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive'

    BUILD FAILED
    /home/pi/Downloads/xuggle-xuggler/mk/buildtools/buildhelper.xml:1192: exec returned: 2

    Total time: 73 minutes 17 seconds

    I am unable to understand the problem statment "unrecognized command line option ’-msse’" here, Can someone please tell me how can I resolve this or circumvent it in xuggler ?

  • Why when using ffmpeg to create video file in real time the ffmpeg.exe take over 1GB of memory ?

    3 juillet 2015, par Brubaker Haim

    This is my class where i’m using the ffmpeg.exe.

    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
    {
       public 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 bgra -video_size 1920x1080 -i \\.\pipe\mytestpipe -c:v libx264 -crf 20 -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();
           }
       }
    }

    ffmpegFileName contain the ffmpeg.exe

    Then i have a timer tick event in another form :

    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();
               ScreenShot.fmpeg.Close();
               this.Close();
               ScreenShotsPlayer ssp = new ScreenShotsPlayer();
               ssp.Show();
           }
       }

    This timer interval set to 100ms.
    So it’s taking a screenshot every 100ms.

    In the class ScreenShot i’m using the Ffmpeg class :
    In the top :

    public static Ffmpeg fmpeg;

    In the constructor :

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

    Then in the GetScreenShot method i’m calling the Ffmpeg PushFrame method :

    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,System.Drawing.Imaging.ImageFormat.Bmp);
           fmpeg.PushFrame(_screenShot);
           _screenShot.Dispose();
           return _screenShot;
       }

    I can’t figure out why once i start the timer to take the screenshots the ffmpeg.exe eat so much memory also the hard disk is working about 53MB/s and the memory is over 90% and over 1GB.

    I’m doing the memory leak somehow ?

    ffmpeg memory

    In the ScreenShot class when i’m making an instance once for the Ffmpeg class the ffmpeg.exe is on very low memory usage and the hard disk usage is low.

    The ffmpeg.exe is about only 0.1MB of memory usage.

    fmpeg.Start(@"e:\screenshots\test.mp4", 25);

    But then when i’m clicking the button start the timer and taking screenshots every 100ms and calling PushFrame method the ffmpeg.exe very fast after few seconds getting to over 1GB of memory usage.

    EDIT

    I tried this arguments :

    psi.Arguments = @"-f rawvideo -pix_fmt bgra -video_size 1920x1080 -i \\.\pipe\mytestpipe -c:v libx264 -crf 20 -r 750k e:\screenshots\test.mp4";

    The memory usage was about 1gb of ffmpeg.exe and cpu usage 99-100%
    The hard disk was on 0 but now the cpu usage got to 100% and the memory over 1gb.

    And it didn’t create the video file I got this warnings/errors :

    Warnings/Errors

  • Why i'm getting strange video file when using ffmpeg and pipes to create video file in real time ?

    30 juin 2015, par Brubaker Haim

    The goal here is to create a compressed mp4 video file in real time.
    I’m saving screenshots as bitmaps type on my hard disk.
    And i want to create mp4 file and compress the mp4 video file in real time.

    The problem is the end the video file i get looks very strange.
    This is the result : Strange Video File

    The class that i’m using the ffmpeg with arguments.

    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 Youtube_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;
                   //psi.Arguments = @"-framerate 1/5 -i -c:v libx264 -r 30 -pix_fmt yuv420p \\.\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();
           }
       }
    }

    Then i’m using the method PushFrame here in this class :

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

           return _screenShot;
       }

    The Bitmaps on the hard disk are fine i can edit/open see them.
    When using command prompt and manually type ffmpeg command it does compress and create a mp4 video file.

    But when using the Ffmpeg class i did with the PushFrame method it’s creating this strange video file.

    This is a link for my OneDrive with 10 screenshots images files for testing :

    screenshots rar

    Sample screenshot from the video file when playing the video file :
    Looks very choppy. The Bitmaps on the hard disk each one is 1920x1080 and Bit depth 32

    But it dosen’t look like that in the video file :

    choppy image

    This is the arguments i’m using :

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

    The video size is very small 1.24 MB