Recherche avancée

Médias (0)

Mot : - Tags -/flash

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (15)

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

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

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

Sur d’autres sites (6449)

  • Shell out to FFMPEG from Windows Service sometimes hangs

    17 avril 2013, par Jake Stevenson

    We have a windows service which runs on multiple machines, waiting for MSMQ messages telling it to convert various files for us. Sometimes the files are video files and we shell out an ffmpeg process to do the conversion and wait for the process to complete or error before moving on. And on some occasions, that ffmpeg process appears to "hang" and we have to RDP to the machine as an admin and manually kill it off using task manager before it can continue to accept new messages. This hung ffmpeg process will stay that way indefinitely, I've waited several days on some occasions. The services all run under a special account.

    The conversion process involves multiple steps— First copying the file locally, then running ffmpeg to convert, then running mp4box for "hinting", then another ffmpeg for a thumbnail. When it hangs, it is always on the first ffmpeg portion. Killing the ffmpeg process causes that code to receive an error and allows it to handle things normally from there.

    Here is the code for that first FFMPEG process. As you can see, we've tried several things to detect a hung process :

    public class FFMPEGEncoder : IEncoder
    {
       [DllImport("kernel32.dll", SetLastError = true)]
       static extern int SetErrorMode(int wMode);

       private ILogger _logger = NullLogger.Instance;
       public ILogger Logger
       {
           get { return _logger; }
           set { _logger = value; }
       }

       private static readonly string ffmpeg = System.IO.Path.Combine(ConfigurationManager.AppSettings["FFMPEG_Dir"], "ffmpeg.exe");

       private const string ffmpegArgs =
           "-r 30000/1001 -b 200k -bt 240k -vcodec libx264 -coder 0 -bf 0 -flags2 -wpred-dct8x8 -level 13 -maxrate 768k -acodec libfaac -ac 2 -ar 48000 -ab 192k -s 480x320 -async 1";

       public EncoderResult EncodeTheFile(string originalFile)
       {
           var newFileName =
               VideoFileNameHelper.GetVideoFileName(originalFile);
           Logger.Debug("Encoding {0} to {1} with ffmpeg", originalFile, newFileName);
           RunEncoding(originalFile, newFileName);

           return new EncoderResult { Filename = newFileName };
       }

       private void RunEncoding(string originalFile, string newFileName)
       {
           var process = new System.Diagnostics.Process
                             {
                                 StartInfo =
                                     {
                                         CreateNoWindow = true,
                                         WorkingDirectory = ConfigurationManager.AppSettings["FFMPEG_Dir"],
                                         UseShellExecute = false,
                                         FileName = ffmpeg,
                                         Arguments = "-i \"" + originalFile + "\" " + ffmpegArgs + " \"" + newFileName + "\"",
                                         RedirectStandardOutput = false,
                                         RedirectStandardError = true
                                     }
                             };
           Logger.Debug("Launching ffmpeg with the following arguments:");
           Logger.Debug(process.StartInfo.Arguments);
           int oldMode = SetErrorMode(3);
           var startTime = DateTime.Now;
           process.Start();

           var output = process.StandardError.ReadToEnd();
           Logger.Debug("ffmpeg output:");
           Logger.Debug(output);
           while(!process.WaitForExit(3000))
           {
               if (!process.Responding)
               {
                   process.Kill();
                   SetErrorMode(oldMode);
                   throw new Exception("Process hung");
               }
               if (DateTime.Now.Subtract(startTime) > new TimeSpan(0, 0, 30, 0))
               {
                   process.Kill();
                   SetErrorMode(oldMode);
                   throw new Exception("Process hung");
               }
           }
           SetErrorMode(oldMode);

           var exitCode = process.ExitCode;
           if (exitCode != 0)
           {
               //We got an error from ffmpeg  
               process.Close();
               if (System.IO.File.Exists(newFileName))
               {
                   System.IO.File.Delete(newFileName);
               }
               Logger.Error("Error converting video {0}", originalFile);
               throw new Exception(string.Format("Unable to process the video {0}", originalFile));
           }
           process.Close();
       }

    }

    Despite the errormode setting code AND the code that tries to kill the process after 30 minutes, I still end up with it hung occasionally and have to manually kill the process. What am I doing wrong that would allow my system to more gracefully handle the "hung" ffmpeg processes ?

  • how to build library file for FFMPEG on windows 64 bit ?

    7 mai 2014, par vinoth

    i’m trying to separate audio and video from video file after surfing in internet i came to know it can done using FFMPEG.Now i need to build FFMPEG library file for my android application but most of the sites show for ubuntu,Linux but i’ve to go on with windows 7 on 64 bit.

    here is the link i got for windows

    Does anyone find this useful ? - Compiling FFMPEG on Windows with Cywin and NDK r5 but it’s old version using of 32 bit.Here i want to use NDK R9 or advanced version if some have any idea about this please help me guys.

  • Revision a24e24386e : Merge "Don't try to use getenv on windows phone/rt"

    7 mai 2014, par Johann

    Merge "Don’t try to use getenv on windows phone/rt"