Recherche avancée

Médias (91)

Autres articles (62)

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

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (6311)

  • avformat/hlsenc : Add resend_headers option

    27 juin 2022, par huheng
    avformat/hlsenc : Add resend_headers option
    

    Add pat and pmt table at start of each segment in single_file mode enhanced
    compatibility of hls stream. Because some hls clients separate parsing segment
    of hls stream, the absence of pat/pmt will cause parsing to fail.

    Reviewed-by : Steven Liu <liuqi05@kuaishou.com>
    Signed-off-by : huheng <heng.hu.1989@gmail.com>

    • [DH] libavformat/hlsenc.c
  • What is this initial delay when using FFmpeg ?

    9 juin 2022, par massivemoisture

    I have a C# application that receives H264 stream through a socket. I want to continuously get the latest image from that stream as a byte array.

    &#xA;

    Here's how I start ffmpeg.

    &#xA;

    var ffmpegInfo = new ProcessStartInfo(FFMPEG_PATH);&#xA;ffmpegInfo.RedirectStandardInput = true;&#xA;ffmpegInfo.RedirectStandardOutput = true;&#xA;ffmpegInfo.RedirectStandardError = true;&#xA;ffmpegInfo.UseShellExecute = false;&#xA;ffmpegInfo.CreateNoWindow = true;&#xA;&#xA;ffmpegInfo.Arguments = "-i pipe: -f rawvideo -pix_fmt bgr24 -an -sn pipe:"; &#xA;Process myFFmpeg = new Process();&#xA;myFFmpeg.StartInfo = ffmpegInfo;&#xA;myFFmpeg.EnableRaisingEvents = true;&#xA;&#xA;myFFmpeg.Start();&#xA;var inStream = myFFmpeg.StandardInput.BaseStream;&#xA;FileStream baseStream = myFFmpeg.StandardOutput.BaseStream as FileStream;&#xA;myFFmpeg.BeginErrorReadLine();&#xA;

    &#xA;

    Then I put the method receiving the stream in a ThreadPool thread. In this method, I put a Console.WriteLine to see how many bytes I get from socket for each Receive() method. I will call this the receive part.

    &#xA;

    // inStream is the "var inStream = myFFmpeg.StandardInput.BaseStream;" from the block above&#xA;// var len = mySocket.Receive(receiveBuffer); receiveBuffer is a byte array with size of 65535&#xA;var t = Task.Run(() => ReceiveVideoStream(inStream));&#xA;

    &#xA;

    Lastly, I read the output from FFmpeg in a while loop. I will call this the read part.

    &#xA;

    int frameCount = 0;&#xA;&#xA;int BufferSize = Width * Height * 3;&#xA;decoded = new byte[BufferSize];&#xA;&#xA;int numBytesToRead = BufferSize;&#xA;int numBytesRead = 0;&#xA;&#xA;while (true)&#xA;{&#xA;   while (numBytesToRead > 0)&#xA;   {&#xA;      int n = baseStream.Read(decoded, numBytesRead, numBytesToRead);&#xA;      Console.WriteLine($"Read {n} bytes from ffmpeg, remaining = {numBytesToRead - n}");&#xA;      if (n == 0)&#xA;      {&#xA;         break;&#xA;      }&#xA;      numBytesRead &#x2B;= n;&#xA;      numBytesToRead -= n;&#xA;   }&#xA;   numBytesRead = 0;&#xA;   numBytesToRead = BufferSize;&#xA;&#xA;   frameCount&#x2B;&#x2B;;&#xA;   Console.WriteLine($"--- Received {frameCount} frames");&#xA;}&#xA;

    &#xA;

    With the receive part in a separate thread from the read part, I expected that the two parts would run in parallel, the debug messages that I put in those two parts will show up in between each other. But I notice that in the beginning, the read part is not executed (it seems that the Read method call blocks, if so, why does it block at this time ?), the receive part will receive for an X amount of bytes, then FFmpeg shows this log :

    &#xA;

    Input #0, h264, from &#x27;pipe:&#x27;:&#xA;Duration: N/A, bitrate: N/A&#xA;Stream #0:0: Video: h264 (Baseline), yuv420p(progressive), 1280x720, 25 fps, 25 tbr, 1200k tbn, 50 tbc&#xA;Stream mapping:&#xA;Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))&#xA;Output #0, rawvideo, to &#x27;pipe:&#x27;:&#xA;Metadata:&#xA;encoder : Lavf58.45.100&#xA;Stream #0:0: Video: rawvideo (BGR[24] / 0x18524742), bgr24, 1280x720, q=2-31, 552960 kb/s, 25 fps, 25 tbn, 25 tbc&#xA;Metadata:&#xA;encoder : Lavc58.91.100 rawvideo&#xA;

    &#xA;

    now the receive part and the read part run over each other.

    &#xA;

    And if the source H264 video frames do not have movement, after several runs, I find that these X bytes are constant.

    &#xA;

    I want to know what those first X amount of bytes are. And can I change it ?

    &#xA;

  • FFMpeg : 2 pass encoding, first with CRF and second with maxrate of first pass average bitrate ?

    28 septembre 2022, par Alireza Rinan

    I usually do conversions with ffmpeg 1 pass CRF 22 with maxrate 1400k for some movies to convert them to 720p and generate smallest size with best quality, the parameters I use is :

    &#xA;

    c:v libx264 -vf format=yuv420p,scale=1280:-2 -crf 22 -maxrate 1400k -bufsize 7000k&#xA;

    &#xA;

    Doing this too much I found that apart from the black bars that reduces bitrate, the color theme, number of high movement scenes... etc affects the bitrate too much, CRF 22 makes sure you get constant quality at every scene, that makes bitrate reaches my maximum 1400k at some scenes while the reset of the scenes in some movies are barely 800k, this result the average bitrate for a same movie reaches for example about 1100k, for these movies I do the encoding again with lower maxrate&#xA;(Ex:1100k) and I get same quality with lower average rate 1000k.

    &#xA;

    Now I'm wondering is there any automated method in 2 pass to get same result ?&#xA;For example doing the first pass in CRF 22 and the second pass at average bitrate of first pass to lower the quality of those bitrate rages in first pass ?

    &#xA;