Recherche avancée

Médias (1)

Mot : - Tags -/karaoke

Autres articles (46)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (6656)

  • Revision 36454 : uniformiser les inputs du formulaire de login

    19 mars 2010, par brunobergot@… — Log

    uniformiser les inputs du formulaire de login

  • C# FFMPEG Process and Multiple files

    23 novembre 2023, par wesman

    I am working on a C# Form tool that will help me convert all of my phone and DSLR video to HEVC, currently, i have a program that uploads the photos and videos to different directories in my home server each time i connect to the WiFi. Once a month or so, i manually convert all the videos, but thought I would automate the process.. I have the Form working perfectly for processing 1 file. but get into trouble when processing a Directory (with possible sub-directories) all at once..

    



    Sorry, this is long, just want to be thorough. here is the button calls

    



    private void processFile_Click(object sender, EventArgs e)
    {
        OpenFileDialog file = new OpenFileDialog();
        file.InitialDirectory = baseMediaDirectory;
        if (file.ShowDialog() == DialogResult.OK)
        {
            ProcessSinlgeFile(file.FileName);
        }
    }


    



    (above)for one file and (below) for a directory

    



    private void processDirectory_Click(object sender, EventArgs e)&#xA;{&#xA;    FolderBrowserDialog file = new FolderBrowserDialog();&#xA;    file.SelectedPath = baseMediaDirectory;&#xA;    if(file.ShowDialog() == DialogResult.OK)&#xA;    {&#xA;       ProcessDirectoryOfFiles(file.SelectedPath);&#xA;    }&#xA;}&#xA;&#xA;private void ProcessDirectoryOfFiles(string selectedPath)&#xA;    {&#xA;        List<string> listOfFiles = GetAllFiles(selectedPath);&#xA;        foreach (string s in listOfFiles)&#xA;        {&#xA;            ProcessSinlgeFile(s);&#xA;        }&#xA;    }&#xA;</string>

    &#xA;&#xA;

    both ultimately call this method, to do some checks and setup

    &#xA;&#xA;

    private void ProcessSinlgeFile(string fileName)&#xA;    {&#xA;&#xA;        if (IsAcceptableMediaFile(fileName))&#xA;        {&#xA;            outputWindow.AppendText("File to Process: " &#x2B; fileName);&#xA;            processMediaFile = &#xA;                new MediaFileWrapper(this.outputWindow, new MediaFile(fileName), new NReco.VideoInfo.FFProbe());&#xA;            if (processMediaFile.OkToProcess)&#xA;            {&#xA;                int initialCRFValue = 15;&#xA;                //ultrafast superfast veryfast faster fast medium slow slower veryslow placebo&#xA;                string intialSpeed = "veryfast";&#xA;                try {&#xA;&#xA;                    ConvertToMPEG(processMediaFile.getFFMPEGCommand(initialCRFValue, intialSpeed), processMediaFile);&#xA;                }&#xA;                catch&#xA;                {&#xA;                    // at somepoint, we&#x27;ll catch a bad file size (or compression)&#xA;                    // then change the CRF value and/or compression speed&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;

    &#xA;&#xA;

    ultimately I get to this Method and run into trouble.

    &#xA;&#xA;

        private async void ConvertToMPEG(string arguments, MediaFileWrapper processMediaFile)&#xA;    {&#xA;        startTime = DateTime.Now;&#xA;        watch = new Stopwatch();&#xA;        watch.Start();&#xA;        progressBar1.Minimum = 0;&#xA;        progressBar1.Maximum = processMediaFile.GetTotalMilliseconds();&#xA;&#xA;        // Start the child process.&#xA;        p = new Process();&#xA;&#xA;        //Setup filename and arguments&#xA;        outputWindow.AppendText("ffmpeg " &#x2B; arguments);&#xA;        p.StartInfo.Arguments = arguments;&#xA;        p.StartInfo.FileName = "ffmpeg.exe";&#xA;        p.StartInfo.UseShellExecute = false;&#xA;&#xA;        // Redirect the output stream of the child process.&#xA;        p.StartInfo.RedirectStandardOutput = true;&#xA;        p.StartInfo.RedirectStandardError = true;&#xA;        p.StartInfo.RedirectStandardInput = true;&#xA;&#xA;        // capture the date for stdout and std error&#xA;        // note FFMPEG uses Stderr exclusively&#xA;        p.ErrorDataReceived &#x2B;= new DataReceivedEventHandler(ErrorDataReceived);&#xA;        p.OutputDataReceived &#x2B;= new DataReceivedEventHandler(OutputDataReceived);&#xA;&#xA;        // Hide Console Window&#xA;        p.StartInfo.CreateNoWindow = true;&#xA;        p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;&#xA;&#xA;        p.Start();&#xA;        p.BeginErrorReadLine();&#xA;        p.BeginOutputReadLine();&#xA;        await p.WaitForExitAsync();&#xA;    }&#xA;

    &#xA;&#xA;

    and WaitForExitAsync is in another class because in can not be in here with a Form

    &#xA;&#xA;

        public static Task WaitForExitAsync(this Process process,&#xA;        CancellationToken cancellationToken = default(CancellationToken))&#xA;    {&#xA;        var tcs = new TaskCompletionSource();&#xA;        process.EnableRaisingEvents = true;&#xA;        process.Exited &#x2B;= (sender, args) => tcs.TrySetResult(null);&#xA;        if (cancellationToken != default(CancellationToken))&#xA;            cancellationToken.Register(tcs.SetCanceled);&#xA;&#xA;        return tcs.Task;&#xA;    }&#xA;

    &#xA;&#xA;

    however, single files work fine, when I call a directory through, it continuously starts processes for each file, trying to run them all at the same time. You can see I tried implementing this &#xA;process.WaitForExit() asynchronously&#xA;with no luck.

    &#xA;

  • C# FFMPEG Process and Multiple files

    3 novembre 2016, par wesman

    I am working on a C# Form tool that will help me convert all of my phone and DSLR video to HEVC, currently, i have a program that uploads the photos and videos to different directories in my home server each time i connect to the WiFi. Once a month or so, i manually convert all the videos, but thought I would automate the process.. I have the Form working perfectly for processing 1 file. but get into trouble when processing a Directory (with possible sub-directories) all at once..

    Sorry, this is long, just want to be thorough. here is the button calls

    private void processFile_Click(object sender, EventArgs e)
       {
           OpenFileDialog file = new OpenFileDialog();
           file.InitialDirectory = baseMediaDirectory;
           if (file.ShowDialog() == DialogResult.OK)
           {
               ProcessSinlgeFile(file.FileName);
           }
       }

    (above)for one file and (below) for a directory

    private void processDirectory_Click(object sender, EventArgs e)
    {
       FolderBrowserDialog file = new FolderBrowserDialog();
       file.SelectedPath = baseMediaDirectory;
       if(file.ShowDialog() == DialogResult.OK)
       {
          ProcessDirectoryOfFiles(file.SelectedPath);
       }
    }

    private void ProcessDirectoryOfFiles(string selectedPath)
       {
           List<string> listOfFiles = GetAllFiles(selectedPath);
           foreach (string s in listOfFiles)
           {
               ProcessSinlgeFile(s);
           }
       }
    </string>

    both ultimately call this method, to do some checks and setup

    private void ProcessSinlgeFile(string fileName)
       {

           if (IsAcceptableMediaFile(fileName))
           {
               outputWindow.AppendText("File to Process: " + fileName);
               processMediaFile =
                   new MediaFileWrapper(this.outputWindow, new MediaFile(fileName), new NReco.VideoInfo.FFProbe());
               if (processMediaFile.OkToProcess)
               {
                   int initialCRFValue = 15;
                   //ultrafast superfast veryfast faster fast medium slow slower veryslow placebo
                   string intialSpeed = "veryfast";
                   try {

                       ConvertToMPEG(processMediaFile.getFFMPEGCommand(initialCRFValue, intialSpeed), processMediaFile);
                   }
                   catch
                   {
                       // at somepoint, we'll catch a bad file size (or compression)
                       // then change the CRF value and/or compression speed
                   }
               }
           }
       }

    ultimately I get to this Method and run into trouble.

       private async void ConvertToMPEG(string arguments, MediaFileWrapper processMediaFile)
       {
           startTime = DateTime.Now;
           watch = new Stopwatch();
           watch.Start();
           progressBar1.Minimum = 0;
           progressBar1.Maximum = processMediaFile.GetTotalMilliseconds();

           // Start the child process.
           p = new Process();

           //Setup filename and arguments
           outputWindow.AppendText("ffmpeg " + arguments);
           p.StartInfo.Arguments = arguments;
           p.StartInfo.FileName = "ffmpeg.exe";
           p.StartInfo.UseShellExecute = false;

           // Redirect the output stream of the child process.
           p.StartInfo.RedirectStandardOutput = true;
           p.StartInfo.RedirectStandardError = true;
           p.StartInfo.RedirectStandardInput = true;

           // capture the date for stdout and std error
           // note FFMPEG uses Stderr exclusively
           p.ErrorDataReceived += new DataReceivedEventHandler(ErrorDataReceived);
           p.OutputDataReceived += new DataReceivedEventHandler(OutputDataReceived);

           // Hide Console Window
           p.StartInfo.CreateNoWindow = true;
           p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;

           p.Start();
           p.BeginErrorReadLine();
           p.BeginOutputReadLine();
           await p.WaitForExitAsync();
       }

    and WaitForExitAsync is in another class because in can not be in here with a Form

       public static Task WaitForExitAsync(this Process process,
           CancellationToken cancellationToken = default(CancellationToken))
       {
           var tcs = new TaskCompletionSource();
           process.EnableRaisingEvents = true;
           process.Exited += (sender, args) => tcs.TrySetResult(null);
           if (cancellationToken != default(CancellationToken))
               cancellationToken.Register(tcs.SetCanceled);

           return tcs.Task;
       }

    however, single files work fine, when I call a directory through, it continuously starts processes for each file, trying to run them all at the same time. You can see I tried implementing this
    process.WaitForExit() asynchronously
    with no luck.