Recherche avancée

Médias (39)

Mot : - Tags -/audio

Autres articles (47)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Configuration spécifique pour PHP5

    4 février 2011, par

    PHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
    Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
    Modules spécifiques
    Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)

Sur d’autres sites (8322)

  • Encode HEVC/H.265/HDR Video for YouTube from 10bit Pro-Res using FFmpeg

    30 janvier 2018, par Rodrigo Polo

    I want to have an HDR YouTube video published, my source file is either an Apple ProRes or DNxHR using a chroma subsamplig 4:4:4 or full RGB, both 10bit, so the original source file has all what is needed in order to be encoded into a 10bit 4:2:0 H.265/HEVC (HDR).

    I have followed some answers listed here, reviewed lots of different approaches, tried out many different commands without success, colors aren’t right when using only FFmpeg, to much red, when using only Adobe to encode into H.264 with the recommended settings on their support page, the results is darker, here are the commands I’ve using :

    I have tried this :

    ffmpeg \
    -i input.mov \
    -c:v libx265 \
    -tag:v hvc1 \
    -crf 21 \
    -preset fast \
    -pix_fmt yuv420p10le \
    -x265-params "colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,10):max-cll=1000,400" \
    -c:a libfdk_aac \
    -b:a 128k \
    -ac 2 \
    -ar 44100 \
    -movflags +faststart \
    output.mp4

    And this :

    ffmpeg \
    -y \
    -hide_banner \
    -i input.mov \
    -pix_fmt yuv420p10le \
    -vf "scale=out_color_matrix=bt2020:out_h_chr_pos=0:out_v_chr_pos=0,format=yuv420p10" \
    -c:v libx265 \
    -tag:v hvc1 \
    -crf 21 \
    -preset fast \
    -x265-params 'crf=12:colorprim=bt2020:transfer=smpte-st-2084:colormatrix=bt2020nc:master-display="G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1)":max-cll="1000,400"' \
    -c:a libfdk_aac \
    -b:a 128k \
    -ac 2 \
    -ar 44100 \
    -movflags +faststart \
    output.mp4

    I have also tried using MKVToolNix in order to insert the metadata into the encoded HEVC/H.265 file with the following command :

    /Applications/MKVToolNix-9.7.1.app/Contents/MacOS/mkvmerge \
    -o output.mkv \
    --colour-matrix 0:9 \
    --colour-range 0:1 \
    --colour-transfer-characteristics 0:16 \
    --colour-primaries 0:9 \
    --max-content-light 0:1000 \
    --max-frame-light 0:300 \
    --max-luminance 0:1000 \
    --min-luminance 0:0.01 \
    --chromaticity-coordinates 0:0.68,0.32,0.265,0.690,0.15,0.06 \
    --white-colour-coordinates 0:0.3127,0.3290 \
    input.mp4

    But the result is the same and YouTube don’t recognize the file as an HDR file, it does only with the first FFmpeg command and with the file encoded with Adobe Premiere, but the colors don’t look well, so, maybe I’m getting some concept wrong, thanks for your help.

  • Send rtmp from nginx into another VM

    12 janvier 2018, par Akim Benchiha

    I’ve set up my nginx server in a VM for the rtmp connection.
    I want to use exec_push for running a script in another VM.

    NGINX 1st VM

    rtmp {
     server {
        listen 1935;
        ping 30s;
        notify_method get;
           application ingest {
                live on;
                exec_kill_signal term;
                idle_streams off;
                #exec_push /usr/local/bin/ffmpeg_push.sh $name ;
                exec_options on;
                exec_push sshpass -p PASSWORD ssh root@192.168.1.139 sh /usr/local/bin/ffmpeg_push.sh $name;
        }
     }
    }

    I have also tried with node server that execute the script but every time, the script reset

    NGINX 1st VM

      rtmp {
         server {
            listen 1935;
            ping 30s;
            notify_method get;
               application ingest {
                    live on;
                    exec_kill_signal term;
                    idle_streams off;
                    #exec_push /usr/local/bin/ffmpeg_push.sh $name ;
                    exec_options on;
                    exec_push curl -X POST -H "Content-Type: application/json" -d "" 192.168.1.139:3000/$name;
            }
         }
       }

    NodeJS into second VM

    #!/usr/bin/env node

    const express = require('express');
    var app = express();
    app.use(function (req, res, next) {
           res.setHeader('Access-Control-Allow-Origin', '*');
           res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE');
           res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type');
           res.setHeader('Access-Control-Allow-Credentials', true);
           next();
    });
    app.post('/:name', function(req, res) {
           console.log('start performed');
           console.log(req.params.name);
           require('child_process').spawn('sh', ['ffmpeg_push.sh', req.params.name], {stdio: 'inherit'});
    });

    But when the script is running in the first VM, everything is fine. I have disabled the firewall.
    Thank you.

  • 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 !