Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP

Autres articles (28)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

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

  • 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

Sur d’autres sites (3809)

  • opening jpg image after saving from ffmpeg not working

    30 mai 2013, par user2042152

    In my project I am saving videos, converting formats to .swf using ffmpeg. Converting and saving the videos is working fine, but I have a problem with creating the thumbnails. It saves a "picture.jpg" but there is no image. looking at the thumbnail its only got the normal photoviewer sign which is fine, but when I try to open the image it gives a message of
    Windows photo viewer : Windows photo viewer cant open this picture because the file appears to be damaged, corrupted, or is too large. (this image is 2.7MB) - Photos taken from my camera is about 5MB and that opens.

    PictureViewer : couldn't display "image.jpg" because a suitable graphics importer could not be found.

    Paint : Paint cannot read this file. This is not a valid bitmap file or its format is currently not supported.
    The images won't open in any I done to save the image :

       protected void btnUploadVideo_Click(object sender, EventArgs e)
       {
           string dtMonth = DateTime.Now.ToString("MMM");
           string dtYear = DateTime.Now.ToString("yyyy");
           lblMsg.Visible = false;

           lblMsg.Visible = true;

           // Before attempting to save the file, verify
           // that the FileUpload control contains a file.
           if (fuPath.HasFile)
           {
               // Get the size in bytes of the file to upload.
               int fileSize = fuPath.PostedFile.ContentLength;

               // Allow only files less than 2,100,000 bytes (approximately 2 MB) to be uploaded.
               if (fileSize < 10497717)
               {
                   // Call a helper method routine to save the file.
                   SaveFile2();
               }
           }
           else
               // Notify the user that a file was not uploaded.
               lblMsg.Text = "You did not specify a file to upload.";
       }

       private void SaveFile2()
       {
           string dtMonth = DateTime.Now.ToString("MMM");
           string dtYear = DateTime.Now.ToString("yyyy");

           if (fuPath != null || fuPath.PostedFile != null)
           {
               postedfilename = fuPath.PostedFile.FileName;
               SavePath = Server.MapPath("~\\Video\\");
               string NewFName = postedfilename;
               NewFName = NewFName.Substring(NewFName.LastIndexOf("\\") + 1, NewFName.Length - NewFName.LastIndexOf(".")) + "." + NewFName.Substring(NewFName.LastIndexOf(".") + 1);
               Filenamewithpath = SavePath + NewFName;
               string outputPath = Server.MapPath("~\\uploads\\" + dtYear + "\\" + dtMonth + "\\SWF\\");
               CreateDirectoryIfNotExists(SavePath);
               CreateDirectoryIfNotExists(outputPath);

               //Save The file
               fuPath.PostedFile.SaveAs(Filenamewithpath);

               //Start Converting
               string inputfile, outputfile, filargs;
               string withoutext;

               //Get the file name without Extension
               withoutext = Path.GetFileNameWithoutExtension(Filenamewithpath);

               //Input file path of uploaded image
               inputfile = SavePath + NewFName;

               //output file format in swf

               outputfile = outputPath + withoutext + ".swf";
               Session["outputfile"] = withoutext + ".swf";
               //file orguments for FFMEPG

               // Create the path and file name to check for duplicates.
               string pathToCheck = outputfile;

               // Create a temporary file name to use for checking duplicates.
               string tempfileName = "";

               // Check to see if a file already exists with the
               // same name as the file to upload.        
               if (System.IO.File.Exists(pathToCheck))
               {
                   int counter = 2;
                   while (System.IO.File.Exists(pathToCheck))
                   {
                       // if a file with this name already exists,
                       // prefix the filename with a number.
                       tempfileName = outputPath + counter.ToString() + withoutext + ".swf";
                       pathToCheck = tempfileName;
                       counter++;
                   }

                   outputfile = tempfileName;
                   // Notify the user that the file name was changed.
                   lblMsg.Text = "A file with the same name already exists." +
                       "<br />Your file was saved as " + counter.ToString() + withoutext + ".swf";
               }

               filargs = "-i " + inputfile + " -ar 22050 " + outputfile;

               string spath;
               spath = Server.MapPath(".");
               Process proc;
               proc = new Process();
               proc.StartInfo.FileName = spath + "\\ffmpeg\\ffmpeg.exe";
               proc.StartInfo.Arguments = filargs;
               proc.StartInfo.UseShellExecute = false;
               proc.StartInfo.CreateNoWindow = false;
               proc.StartInfo.RedirectStandardOutput = false;
               try
               {

                   proc.Start();
                   fuPath.PostedFile.SaveAs(outputfile);
               }
               catch (Exception ex)
               {
                   Response.Write(ex.Message);
               }
               proc.WaitForExit();
               proc.Close();

               //Create Thumbs

               string thumbPath, thumbName;
               string thumbargs;

               thumbPath = Server.MapPath("~\\uploads\\" + dtYear + "\\" + dtMonth + "\\Thumb\\");
               CreateDirectoryIfNotExists(thumbPath);

               thumbName = thumbPath + withoutext + ".jpg";

               // Create the path and file name to check for duplicates.
               string thumbPathToCheck = thumbName;

               // Create a temporary file name to use for checking duplicates.
               string thumbTempfileName = "";

               // Check to see if a file already exists with the
               // same name as the file to upload.        
               if (System.IO.File.Exists(thumbPathToCheck))
               {
                   int counter = 2;
                   while (System.IO.File.Exists(thumbPathToCheck))
                   {
                       // if a file with this name already exists,
                       // prefix the filename with a number.
                       thumbTempfileName = thumbPath + counter.ToString() + withoutext + ".jpg";
                       thumbPathToCheck = thumbTempfileName;
                       counter++;
                   }

                   thumbName = thumbTempfileName;
                   // Notify the user that the file name was changed.
                   lblMsg.Text = "A file with the same name already exists." +
                       "<br />Your file was saved as " + counter.ToString() + withoutext + ".jpg";
               }

               //thumbargs = "-i " + inputfile + " -an -ss 00:00:03 -s 120×90 -vframes 1 -f mjpeg " + thumbName;
              // thumbargs = "-i " + inputfile + "-f image2 -ss 1.000 -vframes 1 " + thumbName;
               thumbargs = "-i " + inputfile + " -vframes 1 -ss 00:00:10 -s 150x150 " + thumbName;

               //  thumbargs = "ffmpeg -i" + inputfile + " -ss 0:00:01.000 -sameq -vframes 1 " + withoutext + ".jpg";
               //  thumbargs = "-i " + inputfile + " -vframes 1 -ss 00:00:07 -s 150x150 " + thumbName;
               Process thumbproc = new Process();
               thumbproc.StartInfo.FileName = spath + "\\ffmpeg\\ffmpeg.exe";
               thumbproc.StartInfo.Arguments = thumbargs;
               thumbproc.StartInfo.UseShellExecute = false;
               thumbproc.StartInfo.CreateNoWindow = true;
               thumbproc.StartInfo.RedirectStandardOutput = false;

               string data = "";                

               try
               {
                   fuPath.PostedFile.SaveAs(thumbName);
                   thumbproc.Start();
               }
               catch (Exception ex)
               {
                   Response.Write(ex.Message);
               }

               thumbproc.WaitForExit();
               thumbproc.Close();
               File.Delete(inputfile);
               lblMsg.Text = "Video Uploaded Successfully";
               hyp.Visible = true;
               hyp.NavigateUrl = "WatchVideo.aspx";

               SaveToDB(outputfile, thumbName);
           }
       }

    EDIT :
    If it is the thumbargs, I have tried a few ways, but with no success :

        //thumbargs = "-i " + inputfile + " -an -ss 00:00:03 -s 120×90 -vframes 1 -f mjpeg " + thumbName;
        // thumbargs = "-i " + inputfile + "-f image2 -ss 1.000 -vframes 1 " + thumbName;
         thumbargs = "-i " + inputfile + " -vframes 1 -ss 00:00:10 -s 150x150 " + thumbName;
        //  thumbargs = "ffmpeg -i" + inputfile + " -ss 0:00:01.000 -sameq -vframes 1 " + withoutext + ".jpg";

    This is how it looks when saved, but can't open....
    enter image description here

    EDIT :

    I tried adding the argument to the command prompt to see if it works there but it gave me a message of : [NULL @ 000000000025f7a0] Unable to find a suitable output format for 'vframes'
    vframes : invalid argument
    The line I used :

       ffmpeg -i VID2012.3GP vframes 1 VID2012.jpg

    If it is that it is not set correctly in IIS how do I set it ?

    EDIT :
    I changed a bit of my code. Debugging through my code there is no exception that is thrown, but if I point the mouse over the process (after it started) it "shows an exception of type System.InvalidOperationException"

       thumbargs = "-i " + postedfilename + " vframes 1" + thumbName;
               ProcessStartInfo thumbProcstartIfo = new ProcessStartInfo();
               thumbProcstartIfo.FileName = @"\ffmpeg\ffmpeg.exe";
               thumbProcstartIfo.Arguments = thumbargs;
               thumbProcstartIfo.UseShellExecute = false;
               thumbProcstartIfo.CreateNoWindow = true;
               thumbProcstartIfo.RedirectStandardOutput = false;

               try
               {
                   using (var process = new Process())
                   {
                       process.StartInfo = thumbProcstartIfo;
                       process.Start();
                       process.WaitForExit();
                   }
               }
               catch (InvalidOperationException ex)
               {
                   lblMsg.Text = ex.ToString();
               }
  • Revision b7a4f8a6db : Adding alpha plane to YV12_BUFFER_CONFIG structure. Change-Id : I8b2687138df636b

    16 mai 2013, par Dmitry Kovalev

    Changed Paths :
     Modify /vp9/vp9_cx_iface.c


     Modify /vp9/vp9_dx_iface.c


     Modify /vp9/vp9_iface_common.h


     Modify /vpx_scale/generic/yv12config.c


     Modify /vpx_scale/yv12config.h



    Adding alpha plane to YV12_BUFFER_CONFIG structure.

    Change-Id : I8b2687138df636b2b78c8cc5156e3882b0009de0

  • Revision 3ba985779c : Merge "Adding alpha plane to YV12_BUFFER_CONFIG structure." into experimental

    16 mai 2013, par Dmitry Kovalev

    Merge "Adding alpha plane to YV12_BUFFER_CONFIG structure." into experimental