Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (24)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (5908)

  • Adding an image overlay to a video using C# and ffmpeg.exe

    14 juillet 2023, par hello world

    I'm working on a project where I need to add an image overlay to a video using C# and ffmpeg.exe. I want to place the image at a specific position on the video and make sure it remains visible throughout the entire duration of the video. Can someone guide me on how to achieve this using the ffmpeg library in conjunction with C# ?

    


    I've looked into the documentation, but I couldn't find a straightforward example that demonstrates how to accomplish this task programmatically. Specifically, I'm interested in :

    


      

    1. How to specify the position and size of the image overlay on the video.
    2. 


    3. How to ensure the image stays visible throughout the duration of the video, even if the video has varying resolutions or aspect ratios.
    4. 


    5. How to execute the ffmpeg command from C# code and capture any potential error messages or status updates.
If anyone has experience with using C# and ffmpeg.exe to add image overlays to videos, your insights and code examples would be greatly appreciated. Thank you !
    6. 


    


    Edit :
Here is my code :

    


            private async void button6_Click(object sender, EventArgs e)
        {
            ProcessStartInfo startInfo = new ProcessStartInfo
            {
                FileName = "ffmpeg.exe",
                Arguments = $"-f lavfi -i nullsrc -t 1 -s {pictureBox2.Width}x{pictureBox2.Height} -r 30 -c:v libx264 {"file.mp4"}",
                UseShellExecute = false,
                RedirectStandardOutput = true,
                RedirectStandardError = true,
                CreateNoWindow = true
            };

            using (Process process = new Process())
            {
                process.StartInfo = startInfo;
                process.Start();
                process.WaitForExit();
            }
            render = true;
            await Task.Run(() =>
            {
                for (int i = 0; i < 10; i++)
                {
                    Bitmap bmp = new Bitmap(1, 1);
                    pictureBox1.Invoke((MethodInvoker)(() =>
                    {
                        bmp = (Bitmap)pictureBox1.Image.Clone();
                    }));
                    while (bmp == pictureBox1.Image)
                    {
                        Thread.Sleep(10);
                    }
                    bmp.Save($"a.jpg");
                    ProcessStartInfo startInfo = new ProcessStartInfo
                    {
                        FileName = "ffmpeg.exe",
                        Arguments = $"-i file.mp4 -i a.jpg -filter_complex \"[0:v][1:v] overlay=25:25:enable='between(t,0,20)'\" -pix_fmt yuv1080p -c:a copy file.mp4",
                        UseShellExecute = false,
                        RedirectStandardOutput = true,
                        RedirectStandardError = true,
                        CreateNoWindow = true
                    };

                    using (Process process = new Process())
                    {
                        process.StartInfo = startInfo;
                        process.Start();
                        process.WaitForExit();
                    }
                }
            });
            File.Delete("a.jpg");
        }


    


  • ffmpeg to normalize loudness of a video

    16 décembre 2022, par A Person

    I wanted to know if there was a way for me to normalised the sound from a video to EBU R128 standard.

    


    Current I am trying to do the 2 step bypass but I am unsure where I am going wrong.

    


    these are the command I did :

    


    ffmpeg -i D:\Person\Documents\Projects\IngestQC\ABN_.mxf -af loudnorm=I=-23:dual_mono=true:TP=-2:LRA=7:print_format=summary -f null -

    


    The result is this :

    


    "
[Parsed_loudnorm_0 @ 000002107bee2dc0]
Input Integrated:    -17.4 LUFS
Input True Peak:      +0.0 dBTP
Input LRA:             8.4 LU
Input Threshold:     -27.9 LUFS

Output Integrated:   -22.9 LUFS
Output True Peak:     -4.2 dBTP
Output LRA:            6.4 LU
Output Threshold:    -33.2 LUFS

Normalization Type:   Dynamic
Target Offset:        -0.1 LU
"


    


    After that, I am doing this

    


    ffmpeg -i D:\Person\Documents\Projects\IngestQC\abn.mxf -c:v copy -c:a pcm_s24le -ac 2 -af loudnorm=I=-23:TP=-2:LRA=7:measured_I=-17.4:measured_TP=0:measured_LRA=8.4:measured_thresh=-27.9:offset=-0.1:linear=true:print_format=summary -ar 48000 D:\Person\Documents\Projects\IngestQC\abn_done.mxf

    


    However, when testing this against eFF to see if it is EBU R128 compliant (-23), it says that it's not compliant.

    


    eFF says its value was :

    


    Channel Group Information
Number of Groups: 2
Channel Group Layout: Mono_Mono
Channel Group Name: MonoOne
Loudness Specification: EBU R128
Loudness Units: LUFS
Program Loudness Target: -23.0 LUFS
Program Loudness: -26.0 LUFS
Loudness Range: 6
PPM Scale: BBC
PPM Threshold: 8.00
Max PPM: 6.62
True Peak Threshold: -3.00 dBTP
Maximum True Peak: -5.00 dBTP
Attenuation required for file to meet target: 3.0
Channel Group Name: MonoTwo
Loudness Specification: EBU R128
Loudness Units: LUFS
Program Loudness Target: -23.0 LUFS
Program Loudness: -26.0 LUFS
Loudness Range: 6
PPM Scale: BBC
PPM Threshold: 8.00
Max PPM: 6.62
True Peak Threshold: -3.00 dBTP
Maximum True Peak: -5.00 dBTP
Attenuation required for file to meet target: 3.0
1


    


    I am not sure what i am doing wrong

    


    I want to know if there is a way to get it to give the correct audio loudness while keeping it the same format of mxf

    


  • Revision 49516 : Le constructeur de formulaire peut prendre des options en troisième ...

    8 juillet 2011, par rastapopoulos@… — Log

    Le constructeur de formulaire peut prendre des options en troisième argument. La première option possible est la possibilité de modifier le nom des champs (modifier_nom=true). Avec une autre option (nom_unique=true) on peut vérifier que le nom fournit par l’utilisateur n’existe pas déjà dans le (...)