Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (42)

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

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (5252)

  • How to get output from ffmpeg process in c#

    13 juillet 2018, par Anirudha Gupta

    In the code I written in WPF, I run some filter in FFmpeg, If I run the command in terminal (PowerShell or cmd prompt) It will give me information line by line what’s going on.

    I am calling the process from C# code and it’s work fine. The problem I have with my code is actually I am not able to get any output from the process I run.

    I have tried some answers from StackOverflow for FFmpeg process. I see 2 opportunities in my code. I can either fix it by Timer approach or secondly hook an event to OutputDataReceived.

    I tried OutputDataReceived event, My code never got it worked. I tried Timer Approach but still, it’s not hitting my code. Please check the code below

           _process = new Process
           {
               StartInfo = new ProcessStartInfo
               {
                   FileName = ffmpeg,
                   Arguments = arguments,
                   UseShellExecute = false,
                   RedirectStandardOutput = true,
                   RedirectStandardError = true,
                   CreateNoWindow = true,
               },
               EnableRaisingEvents = true
           };

           _process.OutputDataReceived += Proc_OutputDataReceived;

           _process.Exited += (a, b) =>
           {
               System.Threading.Tasks.Task.Run(() =>
               {
                   System.Threading.Tasks.Task.Delay(5000);
                   System.IO.File.Delete(newName);
               });

               //System.IO.File.Delete()
           };

           _process.Start();
           _timer = new Timer();
           _timer.Interval = 500;
           _timer.Start();
           _timer.Tick += Timer_Tick;
       }


       private void Timer_Tick(object sender, EventArgs e)
       {
           while (_process.StandardOutput.EndOfStream)
           {
              string line = _process.StandardOutput.ReadLine();
           }
           // Check the process.

       }
  • Backgroundworker quits itself and calls Runworkercompleted function

    5 mai 2017, par yjs990427

    I am using youtube-dl in a cmd process running in a backgroundworker process in wpf application to update its status to a text box asynchronously. There are times in my application that ffmpeg has to work in through the process. However, at the time that ffmpeg process is called (right after youtube-dl’s work is finished) and starts running, backgroundworker calls Runworkercompleted method and kills itself. ffmpeg is called from youtube-dl.

    Is there any fix that make the backgroundworker still work until the ffmpeg’s work is done ? Thanks.

    My DoWork method :

    private void downloadWorker_DoWork(object sender, DoWorkEventArgs e)
           {
               BackgroundWorker worker = sender as BackgroundWorker;
               Process process = new Process();
               string[] scripts = (string[])e.Argument;

               string dir = scripts[0];
               string scriptText = scripts[1];

               process.StartInfo.FileName = "cmd.exe";
               process.StartInfo.WorkingDirectory = dir;
               process.StartInfo.Arguments = "/C set path=%path%;" + System.AppDomain.CurrentDomain.BaseDirectory + "&" + scriptText;
               process.StartInfo.CreateNoWindow = true;
               process.StartInfo.UseShellExecute = false;
               process.StartInfo.RedirectStandardOutput = true;
               process.StartInfo.RedirectStandardInput = true;
               process.StartInfo.RedirectStandardError = true;

               process.Start();

               while (!process.StandardOutput.EndOfStream)
               {
                   if (downloadWorker.CancellationPending)   // if and only if user calls Abort
                   // would this if statement be the problem?
                   {
                       foreach (var youtube in Process.GetProcessesByName("youtube-dl"))
                       {
                           youtube.Kill();
                       }
                       process.Kill();
                       e.Cancel = true;
                       return;
                   }
                   else
                   {
                       string line = process.StandardOutput.ReadLine();
                       worker.ReportProgress(1, line);                  // reports its status to UI
                   }
               }
           }

    My RunWorkerCompleted method :

    private void downloadWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
           {
               if (e.Error != null)
               {
                   MessageBox.Show(e.Error.Message);
               }
               else if (e.Cancelled == true)
               {
                   MessageBox.Show("Download Aborted!\r\nYou will need to delete the .part file in the download folder.", "Abort");
               }
               else if (musicCheckBox.IsChecked == true)
               {
                   MessageBox.Show("Music Download finished.", "Successful");
               }
               else if (videoCheckBox.IsChecked == true)
               {
                   MessageBox.Show("Video Download finished.", "Successful");
               }
               // CMDoutputTextBox.Text = "";
               downloadBtn.Content = "Download!";
               downloadBtn.IsEnabled = true;
           }

    edit : The backgroundworker produces this output and calls RunWorkerFinished method. ffmpeg does nothing after the output.

    [ffmpeg] Converting video from mp4 to mkv, Destination: TAEYEON 태연_Why_Music Video-WkdtmT8A2iY.mkv
  • org.bytedeco.javacv.CanvasFrame showImage is hanging

    24 août 2018, par user3911119

    An IOS device is uploading h264 files (3 sec videos) to a server. Each file is successfully readable by VLC.

    Using FFMpegFrameGrabber, I grab each frame and try to display them using CanvasFrame.showImage as below. However, the method call hangs.

    CanvasFrame canvas = new CanvasFrame("ios");
    canvas.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    canvas.setAlwaysOnTop(true);
    canvas.setResizable(true);
    try(FileInputStream fis = new FileInputStream(file))
    {
       try(FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(fis))
       {
           grabber.setFormat("h264");
           grabber.start();
           while(true)
           {
               Frame frame = grabber.grabImage();
               if(frame != null)
               {
                   canvas.showImage(frame);
               }
           }
       }
    }

    Am I doing anything wrong in the above code ?

    EDIT#1 : When I try to save the buffered image for the frame, a valid image is saved.

    BufferedImage image = converter.getBufferedImage(frame);
    File outputfile = new File("png_file");
    ImageIO.write(image, "png", outputfile);