Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (81)

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

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

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

  • lavc, lavf : move avformat static mutex from avcodec to avformat

    21 décembre 2017, par wm4
    lavc, lavf : move avformat static mutex from avcodec to avformat
    

    It's completely absurd that libavcodec would care about libavformat
    locking, but it was there because the lock manager was in libavcodec.

    This is more stright forward. Changes ABI, but we don't require ABI
    compatibility currently.

    • [DH] libavcodec/internal.h
    • [DH] libavcodec/utils.c
    • [DH] libavformat/avisynth.c
    • [DH] libavformat/chromaprint.c
    • [DH] libavformat/internal.h
    • [DH] libavformat/tls_gnutls.c
    • [DH] libavformat/tls_openssl.c
    • [DH] libavformat/utils.c
  • Can multiple instances of ffmpeg share the same input sdp file - live transcoding h264

    27 avril 2018, par mikeyb976

    I have a ffmpeg encoder producing a h264/rtp video stream at 1080p resolution. I also use the ffmpeg to generate the sdp file that describes this stream.

    While the encoder is running, I have a live transcoder also using ffmpeg, that takes in the sdp file as input, and produces rtsp output stream at lower resolution 720p.

    My question is,

    If I want to later transcode this rtp 1080p stream to 360p, Can I spin up a new ffmpeg instance and perform the conversion OR will the ffmpeg instance that is transcoding to 720p, lock out access to the original rtp stream ??

    I do know I can have one ffmpeg instance that takes in the sdp file as input and produce multiple outputs, but that means I have to create my outstreams at lower resolutions all in one go regardless if the client consumer wants that resolution

    Any help would be great, thanks

  • Issues with video frame dropout using Accord.NET VideoFileWriter and FFMPEG

    9 janvier 2018, par David

    I am testing out writing video files using the Accord.Video library. I have a WPF project created in Visual Studio 2017, and I have installed Accord.Video.FFMPEG as well as Accord.Video.VFW using Nuget, as well as their dependencies.

    I have created a very simple video to test basic file output. However, I am running into some issues. My goal is to be able to output videos with a variable frame rate, because in the future I will be using this code to input images from a webcam device that will then be saved to a video file, and video from webcams typically has variable frame rates.

    For now, in this example, I am not inputting video from a webcam, but rather I am generating a simple "moving box" image and outputting the frames to a video file. The box changes color every 20 frames : red, green, blue, yellow, and finally white. I also set the frame rate to be 20 fps.

    When I use Accord.Video.VFW, the frame rate is correctly set, and all the frames are correctly outputted to the video file. The resulting video looks like this (see the YouTube link) : https://youtu.be/K8E9O7bJIbg

    This is just a reference, however. I don’t intend on using Accord.Video.VFW because it outputs uncompressed data to an AVI file, and it doesn’t support variable frame rates. I would like to use Accord.Video.FFMPEG because it is supposed to support variable frame rates.

    When I attempt to use the Accord.Video.FFMPEG library, however, the video does not result in how I would expect it to look. Here is a YouTube link : https://youtu.be/cW19yQFUsLI

    As you can see, in that example, the box remains the first color for a longer amount of time than the other colors. It also never reaches the final color (white). When I inspect the video file, 100 frames were not outputted to the file. There are 69 or 73 frames typically. And the expected frame rate and duration obviously do not match up.

    Here is the code that generates both these videos :

    public MainWindow()
    {
       InitializeComponent();

       Accord.Video.VFW.AVIWriter avi_writer = new Accord.Video.VFW.AVIWriter();
       avi_writer.FrameRate = 20;
       avi_writer.Open("test2.avi", 640, 480);

       Accord.Video.FFMPEG.VideoFileWriter k = new Accord.Video.FFMPEG.VideoFileWriter();
       k.FrameRate = 20;
       k.Width = 640;
       k.Height = 480;
       k.Open("test.mp4");
       for (int i = 0; i < 100; i++)
       {
           TimeSpan t = new TimeSpan(0, 0, 0, 0, 50 * i);
           var b = new System.Drawing.Bitmap(640, 480);
           var g = Graphics.FromImage(b);
           var br = System.Drawing.Brushes.Blue;
           if (t.TotalMilliseconds < 1000)
               br = System.Drawing.Brushes.Red;
           else if (t.TotalMilliseconds < 2000)
               br = System.Drawing.Brushes.Green;
           else if (t.TotalMilliseconds < 3000)
               br = System.Drawing.Brushes.Blue;
           else if (t.TotalMilliseconds < 4000)
               br = System.Drawing.Brushes.Yellow;
           else
               br = System.Drawing.Brushes.White;

           g.FillRectangle(br, 50 + i, 50, 100, 100);
           System.Console.WriteLine("Frame: " + (i + 1).ToString() + ", Millis: " + t.TotalMilliseconds.ToString());

           #region This is the code in question

           k.WriteVideoFrame(b, t);
           avi_writer.AddFrame(b);

           #endregion
       }

       avi_writer.Close();
       k.Close();
       System.Console.WriteLine("Finished writing video");
    }

    I have tried changing a few things under the assumption that maybe the "WriteVideoFrame" function isn’t able to finish in time, and so I need to slow down the program so it can complete itself. Under that assumption, I have replaced the "WriteVideoFrame" call with the following code :

    Task taskA = new Task(() => k.WriteVideoFrame(b, t));
    taskA.Start();
    taskA.Wait();

    And I have tried the following code :

    Task.WaitAll(
       Task.Run( () =>
       {
           lock(syncObj)
           {
               k.WriteVideoFrame(b, t);
           }
       }
    ));

    And even just a standard call where I don’t specify a timestamp :

    k.WriteVideoFrame(b);

    None of these work. They all result in something similar.

    Any suggestions on getting the WriteVideoFrame function to work that is a part of the Accord.Video.FFMPEG.VideoFileWriter class ?

    Thanks for any and all help !

    [edits below]

    I have done some more investigating. I still haven’t found a good solution, but here is what I have found so far. After declaring my VideoFileWriter object, I have tried setting up some options for the video.

    When I use an H264 codec with the following options, it correctly saves 100 frames at a frame-rate of 20 fps, however any normal media player (both VLC and Windows Media Player) end up playing a 10-second video instead of a 5-second video. Essentially, it seems like they play it at half-speed. Here is the code that gives that result :

    k.VideoCodec = Accord.Video.FFMPEG.VideoCodec.H264;
    k.VideoOptions["crf"] = "18";
    k.VideoOptions["preset"] = "veryfast";
    k.VideoOptions["tune"] = "zerolatency";
    k.VideoOptions["x264opts"] = "no-mbtree:sliced-threads:sync-lookahead=0";

    Additionally, if I use an Mpeg4 codec, I get the same "half-speed" result :

    k.VideoCodec = Accord.Video.FFMPEG.VideoCodec.Mpeg4;

    However, if I use a WMV codec, then it correctly results in 100 frames at 20 fps, and a 5 second video that is correctly played by both media players :

    k.VideoCodec = Accord.Video.FFMPEG.VideoCodec.Wmv1;

    Although this is good news, this still doesn’t solve the problem because WMV doesn’t support variable frame rates. Also, this still doesn’t answer the question as to why the problem is happening in the first place.

    As always, any help would be appreciated !