Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (32)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (7184)

  • FFMPEG blending comes out looking grayscale rather than colourful

    17 novembre 2022, par OneWorld

    When i do a blend of two pngs, it comes out looking grayscale whereas it should have colour.

    


    These are the two PNG input assets that I then create MP4s from :-

    


    enter image description here

    


    enter image description here

    


    Here is the command :-

    


    ffmpeg -i black_circle.png -i pikachu.png -filter_complex "[0:v]setsar=sar=1,format=rgb24[rgb1];[1:v]setsar=sar=1,format=rgb24[rgb2];[rgb1]split[out1_1][out1_2];[out1_1]crop=50:50:0:0:exact=1,setsar=1[cropped1];[cropped1][rgb2]blend=screen[blended1];[out1_2][blended1]overlay=0:0" pikachu_screened_on_circle_rgb.png


    


    And here is the output :-

    


    enter image description here

    


    However, Pikachu should retain his Red, Green and Blue, but instead Pikachu looks grayscale.

    


    I was wondering why this is ?

    


    And what i need to do so that Pikachu retains his yellow skin, and rosey cheeks ?

    


    So I thought initially that it might be something to do with the white and black circle being a grayscale asset. But then I replaced the black and white circle with this asset :-

    


    enter image description here

    


    and I saw that when something is black FFMPEG makes it grayscale :-

    


    enter image description here

    


    The command using these two assets instead is this :-

    


    ffmpeg -i rgb_backing.png -i pikachu.png -filter_complex "[0:v]setsar=sar=1,format=rgb24[rgb1];[1:v]setsar=sar=1,format=rgb24[rgb2];[rgb1]split[out1_1][out1_2];[out1_1]crop=50:50:0:0:exact=1,setsar=1[cropped1];[cropped1][rgb2]blend=screen[blended1];[out1_2][blended1]overlay=0:0" pikachu_screened_on_rgb_backing.png


    


    Is there a way to invert black to white in FFMPEG ?

    


  • Add text to video using FFMPEG(c# application)

    3 février 2020, par uzura

    Trying to add text to video using FFMPEG via c# script using the following command

    ffmpeg -i input.mp4 -vf drawtext="\text='Stack Overflow': fontcolor=white: fontsize=24: box=1: boxcolor=black@0.5: x=w-tw-10:y=h-th-10" -codec:a copy output.mp4

    This works when run it from cmd but when I implement it here :

       public void AddNewLabel(string label)
       {
           //string video = "input.mp4";
           string filter = "input.mp4 -vf drawtext=\"\text='sampletext': fontcolor=white: fontsize=24: box=1: boxcolor=black: x=w-tw-10:y=h-th-10\"";//problemm is this line

           string args = $"/c ffmpeg -i {filter} -codec:a copy output.mp4";

           ProcessStartInfo startInfo = new ProcessStartInfo
           {
               CreateNoWindow = false,
               FileName = "cmd.exe",
               WorkingDirectory = outputpath,
               Arguments = args
           };

           using (Process exeProcess = Process.Start(startInfo))
           {
               exeProcess.WaitForExit();
           }
       }

    The output is a 0kb mp4 file that cant be opened. When i remove everything after input.mp4 in filter, the output is fine. What could I be doing wrong ?

  • ffmpeg filters order rotate scale with overlay

    13 décembre 2017, par Sebastián Márquez Lutfy

    I’m trying to render an image over a video. I use the following command after some research

    ffmpeg -y  -i "my_video.mp4" -i "my_image.jpg" -filter_complex "color=color=blue:size=711x400:rate=25[container];[0:v]scale=w=400:h=400,setpts=expr=PTS-STARTPTS[vidscaled];[container][vidscaled]overlay=eval=init:shortest=1:x=155:y=0[overlay0];[1:v]scale=w=123:h=123,rotate=a=323.7*PI/180:c=black@0:oh='roth(323.7*PI/180)':ow='rotw(323.7*PI/180)':bilinear=1[imgproc];[overlay0][imgproc]overlay=eval=init:x=18:y='237-abs(123*sin(323.7*PI/180))'[overlay1]" -map "[overlay1]" -map 0:a -strict -2 -preset ultrafast -g 120 output.mp4

    The problem with this approach is a low image’s quality since scaling is applied before rotate. So i tried to apply the rotation before scaling, (see next command)

    ffmpeg -y  -i "my_video.mp4" -i "my_image.jpg" -filter_complex "color=color=blue:size=711x400:rate=25[container];[0:v]scale=w=400:h=400,setpts=expr=PTS-STARTPTS[vidscaled];[container][vidscaled]overlay=eval=init:shortest=1:x=155:y=0[overlay0];[1:v]rotate=a=323.7*PI/180:c=black@0:oh='roth(323.7*PI/180)':ow='rotw(323.7*PI/180)':bilinear=1,scale=w=173:h=173[imgproc];[overlay0][imgproc]overlay=eval=init:x=18:y='237-abs(123*sin(323.7*PI/180))'[overlay1]" -map "[overlay1]" -map 0:a -strict -2 -preset ultrafast -g 120 output.mp4

    And the problem : c=black@0 is not working anymore, the bounding box around the rotated image is not transparent.

    Anyone please help this soul.

    pd : Using c=none doesn’t work too, got a green background