Recherche avancée

Médias (91)

Autres articles (61)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (7245)

  • Why multithead use more cpu than single for the same task of deocoing H.264 video ?

    29 juillet 2018, par gary

    I am developing an PC hardware accelerated video decoder for decoding real time H264 Annex B stream. After a bit research, I have done this job by ffmpeg. However, I try to decople the decoding process and show process, the cpu bumped.

    What I want to do is to acceleratly decode a living H.264 stream to yuv, and convert YUV to BGR for cv::Mat without display.

    I can acceleratly decode the h.264 by ffmpeg with decoder h264_qsv, the cpu usage decrease 15% indeed. Then I try to do another thing that put then CV::Mat to std::queue and read the Mat from another queue which just read with do anything else. But the cpu bumped to 30%.

    At first, I think the std::mutex accessed frequently made the performance worse, I try to use a bool flag as lock, but it seems does not work.

    How can I approach ? I have no idear why mulithread make the cpu usage increase. Is there any helpful resources to get clear intuition ?

    frame enqueue

      av_frame_q_lock.lock();
      if (av_frame_q.size() == MAX_QUEUE_SIZE) {
           av_frame_q.pop();
       }
       av_frame_q.push(cvframe);
       av_frame_q_lock.unlock();

    frame dequeue

       hwrtsp_open("rtsp://admin:123@10.20.37.185/cam/realmonitor?channel=1&subtype=0", "h264_qsv");
    cv::Mat frame;
    while (true) {
       int ret = hwrtsp_read(frame);
       if (ret == 0) {
       }
       cv::waitKey(40);
    }

    Thanks in advance !

  • Crontab task scheduled every hour stops running from 11am to 12am

    11 août 2019, par technik

    I have a rather weird issue. My aim is to use ffmpeg to grab a screenshot from a home CCTV cameras rtsp stream every hour. I want to do this in order to make a timelapse. However everyday from 11am to 12am (the next day) there are no snapshots saved.

    On an always on Debian machine, this is the shell script I have that crontab calls :

    dt=$(date +"%d%m%2y%I%M%S")
    ffmpeg -rtsp_transport tcp -i "rtsp://IP:554/..." -frames 1 /user/snapshots/ch1/$dt.jpg

    Running it by itself works fine and saves a jpg snapshot successfully to the right folders.

    In crontab -e I have the following line :
    0 * * * * /bin/sh //user/snap.sh

    Thanks.

  • Using ffmpeg.exe making the computer slow in task manager it takes over 1GB of memory how can i fix it ?

    29 mai 2013, par Revuen Ben Dror

    In mt Form1 i have this code :

    private void StartRecording_Click(object sender, EventArgs e)
           {

               ffmp.Start("test.avi", 25);
               timer1.Enabled = true;
           }

    ffmp is a variable of my class : Ffmpeg
    In this class i add frames to a pipe and create an avi file.

    using System;
    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;

    namespace ScreenVideoRecorder
    {
       class Ffmpeg
       {
           NamedPipeServerStream p;
           String pipename = "mytestpipe";
           byte[] b;
           System.Diagnostics.Process process;

           public Ffmpeg()
           {

           }

           public void Start(string FileName, int BitmapRate)
           {
               p = new NamedPipeServerStream(pipename, PipeDirection.Out, 1, PipeTransmissionMode.Byte);
               b = new byte[1920 * 1080 * 3]; // some buffer for the r g and b of pixels of an image of size 720p
               process = new System.Diagnostics.Process();
               process.StartInfo.FileName = @"D:\pipetest\pipetest\ffmpegx86\ffmpeg.exe";
               process.EnableRaisingEvents = false;
               process.StartInfo.WorkingDirectory = @"D:\pipetest\pipetest\ffmpegx86";
               process.StartInfo.Arguments = @"-f rawvideo -pix_fmt bgr0 -video_size 1920x1080 -i \\.\pipe\mytestpipe -map 0 -c:v libx264 -r " + BitmapRate + " " + FileName;
               process.Start();

               process.StartInfo.UseShellExecute = false;
               process.StartInfo.CreateNoWindow = false;

               p.WaitForConnection();
           }

           public void PushFrame(Bitmap bmp)
           {

               int length;
               // Lock the bitmap's bits.
               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];

               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);

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

    The problem is when i'm running my application in this from my visual studio 2012 pro and click the button it's openning a console window and start the processing .

    I tracked over it through the task manager on ffmpeg.exe and saw that it started from 996mb and very quick jumped ot 1040mb memory usage. The cpu usage was only 16%

    Once i close ended this task the ffmpeg.exe everything was back to move smooth.
    When it's working and i tried to drag my Form around the screen for example it was moving slow and also with some stuttering .

    Closed the ffmpeg.exe and i could drag the Form around smooth and quick like in regular way as it should be.

    I tried to google for it and found some others with the same problem i think but i'm not sure where is the problem and how to fix it.

    I'm not sure what version of ffmpeg.exe i have i'm using now but i read in some places that it's not working better with new versions but maybe i mistake here .

    My windows is 8 with 6gb of ram .