Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (73)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

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

Sur d’autres sites (10285)

  • Revision b50e0badbc : Merge "Take out reference_masking speed feature"

    11 septembre 2015, par Jingning Han

    Merge "Take out reference_masking speed feature"

  • Why is the ffmpeg conversion speed practically similar for different models ?

    11 septembre 2023, par aneto

    I ran the ffmpeg command below on a computer with a GTX 1050 TI, RTX 3060 TI and RTX 4080, but the conversion speed was practically the same. Why is this happening ? I thought the difference would be much greater.

    


    FFmpeg :

    


    ffmpeg.exe -loglevel error -stats -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i test.mp4 -c:v h264_nvenc -b:v 800000 -preset ll -c:a copy -c:s copy test.resize.mp4


    


    Results :

    


    GFX 1050 TI
GFX 1050 TI

    


    RTX 3060 TI
RTX 3060 TI

    


    RTX 4080
RTX 4080

    


  • Concatenate multiple video files alongside delayed audio files

    28 mars 2022, par Spartan 117

    I am currently working on a utility that is responsible for pulling audio and video files from the cloud and merging them together via FFMPEG. As I am new to FFMPEG, I am going to split the question into an FFMPEG part and a C# part just so people can answer either 1 part or the other (or both !).

    


    FFMPEG Part

    


    Currently, I have a working FFMPEG arg if there is only 1 video file present and it needs to be merged with multiple files.

    


    ffmpeg -i input1.mkv -i input1.mka -i input2.mka -i input3.mka -i input4.mka -filter_complex "[1:a]adelay=0s:all=1[a1pad];[2:a]adelay=20s:all=1[a2pad];[3:a]adelay=30s:all=1[a3pad];[4:a]adelay=40s:all=1[a4pad];[a1pad][a2pad][a3pad][a4pad]amix=inputs=4:weights=1|1|1|1[aout]" -map [aout] -map 0:0 output4.mkv


    


    The delays you see in there are determined by subtracting the start time of each file from the start time of the earliest created audio or video file. I know that if I wanted to create a horizontal stack of multiple videos, i could just do

    


    ffmpeg -i input1.mkv -i input1.mka -i input2.mkv -i input2.mka -i input3.mka -i input4.mka
-filter_complex 
"[2:v]tpad=start_duration=120:color=black[vpad]; 
 [3:a]adelay=120000:all=1[a2pad]; 
 [4:a]adelay=180000:all=1[a3pad];
 [5:a]adelay=200000:all=1[a4pad]; 
 [0:v][vpad]hstack=inputs=2[vout]; 
 [1:a][a2pad][a3pad][a4pad]amix=inputs=4:weights=1|1|1|1[aout]" 
 -map [vout] -map [aout] 
 output.mkv


    


    but what I want to do is both keep those delays for the audio and video files AND concatenate (not stack) those videos, how would i go about doing that ?

    


    C# Part

    


    You see that giant arg up there ? The utility is supposed to generate that based on a List of recordings. Here is the model.

    


    List<filemodel> _records;&#xA;public class FileModel {&#xA;  public string Id { get; set; }&#xA;  public string FileType { get; set; }&#xA;  public string StartTime { get; set; }&#xA;}&#xA;</filemodel>

    &#xA;

    The utility has to then go through that list and create the arg (as seen in the FFMPEG part) to be executed by the Xabe.FFMPEG package. The way i was thinking to approach this is to basically create 2 string builders. 1 string builder will be responsible for dealing with the inputs, the other string builder. Here is what i have so far

    &#xA;

    private async Task CombineAsync()&#xA;    {&#xA;        var minTime = _records.Min(y => Convert.ToDateTime(y.StartTime));&#xA;        var frontBuilder = new StringBuilder("-y ");&#xA;        var middleBuilder = new StringBuilder("-filter_complex \"");&#xA;        var endString = $" -map [vout] -map [aout] {_folderPath}\\CombinedOutput.mkv";&#xA;&#xA;        for (var i = 0; i &lt; _records.Count; i&#x2B;&#x2B;)&#xA;        {&#xA;            var type = _records[i].FileType.ToLower();&#xA;            var delay = (Convert.ToDateTime(_records[i].StartTime).Subtract(minTime)).TotalSeconds;&#xA;            frontBuilder.Append($"-i {_folderPath &#x2B; "\\" &#x2B; _records[i].Id} ");&#xA;            var addColon = i != _records.Count - 1 ? ";" : "";&#xA;            middleBuilder.Append(type.Equals("video") ? $"[{i}:v]tpad=start_duration={delay}:color=black[v{i}pad]{addColon} " : $"[{i}:a]adelay={delay}s:all=1[a{i}pad]{addColon} ");&#xA;        }&#xA;        middleBuilder.Append("\"");&#xA;        Console.WriteLine(frontBuilder.ToString() &#x2B; middleBuilder.ToString() &#x2B; endString);&#xA;        // var args = frontBuilder &#x2B; middleBuilder &#x2B; endString;&#xA;        // try&#xA;        // {&#xA;        //     var conversionResult = await FFmpeg.Conversions.New().Start(args);&#xA;        //     Console.WriteLine(JsonConvert.SerializeObject(conversionResult));&#xA;        // }&#xA;        // catch (Exception e)&#xA;        // {&#xA;        //     Console.WriteLine(e);&#xA;        // }&#xA;    }&#xA;

    &#xA;

      &#xA;
    1. Is this the correct way to go about building the argument out ?

      &#xA;

    2. &#xA;

    3. How in god's name do i get something like this in there, since it relies on naming and total count for the piping and inputs=

      &#xA;

        [0:v][vpad]hstack=inputs=2[vout]; // This part will change for video concatenation depending on what gets answered above&#xA;  [1:a][a2pad][a3pad][a4pad]amix=inputs=4:weights=1|1|1|1[aout]&#xA;

      &#xA;

    4. &#xA;

    &#xA;