Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (77)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

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

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (5165)

  • Create and combine a blank video stream with a subtitle steam

    10 décembre 2014, par CPO

    I have a live .ts stream that contains a video stream, audio stream and subtitle stream. What I want to do is to display the video in full, eg video and audio and subtitles, but in parallel take the same stream and ’blank’ the video to black, but allow the subtitle stream to be rendered into that video stream for display separately from the fully displayed streams. The reason for this is to allow the subtitles to be displayed separately and cropped,from a second projector, but to have a black backgroung to avoid distractions when there is no subtitle present. I believe this can be achieved using FFMPEG but my limited experience with this utility rather limits my progress. I believe that the blanked video stream needs to be the same frame rate and resolution as the original in order that the rendered subtitles stay in synch with the original video stream. Any help or suggestions warmly welcomed. Thank you

  • Zoneminder Watermarking on MP4 video from custom ZM branch

    6 janvier 2015, par moeiscool

    The ZM i have installed is the video branch. I followed these instructions to install it.
    https://github.com/ZoneMinder/ZoneMinder/tree/video
    https://github.com/ZoneMinder/ZoneMinder/issues/452

    I am looking to watermark my recordings. I have successfully achieved what i want on regular ZM. I just need it on the MP4 branch version of ZM. I have used ASR to search for "ffmpeg" and "mp4" but i only found anything relevant to video creation in zmvideo.pl... but i think zmvideo.pl is only for generating videos from JPEG files. I simply want to have the watermark appear on the mp4 file when it is created.

    So in short after a long explanation : Where should I be looking for the commands that create the MP4 files in ZM ? or do i have to add them to jpeg frames somewhere or something ? sorry for the noobiness... I have spent at least 3 hours looking for this and I’m actually sweating from frustration. ANY help at all would be appreciated :) Thanks in advance.

  • C# .net mvc Process return encoding progress (FFMpeg) to client initiated with ajax

    19 décembre 2014, par user1585895

    I am using FFMpeg to encode wav to mp3s, and on completion download the final .zip to the client.

    All works great, and I can Debug.WriteLine the progress of the encoding, but I would like to return _percentage back to the client to do some UI updates based on the value of _percentage and if all encoding is done, Im not sure how to approach this.

    My thinking is as follows :

    • ajax post to CreateAndDownloadAlbum(List trackIds, int productId)
    • loop through List and create a new Process, run
      — parse StdError to get encoding percentage in myProcess_ErrorData(object source, DataReceivedEventArgs e)
      — send _percentage value at timed intervals back to CreateAndDownloadAlbum
      — update UI based on value of _percentage, when all is complete break and call public ActionResult SendFileDownload()

    Any input would be great.

    Thanks !

    front end AJAX call to post list of file Ids to download

    var data = $('#downloadAlbum').serialize();
    $.ajax({
       url: "/Admin/CreateAndDownloadAlbum",
       method: "POST",
       data: data,
       dataType: 'json',
       success: function(result) {
            // wait here for _percentage
            // if not 100, call again to get new _percentage value
            // if 100, update UI, move to next file being encoded
            // if all encoding is complete, call SendFileDownload() in controller
       }
    });

    then the controller code

    [HttpPost]
       public void CreateAndDownloadAlbum(List<trackstodownload> trackIds, int productId)
       {
           _numTracksToDownload = trackIds.Count;
           var product = _productRepository.GetProductById(productId);
           var artist = _artistRepository.GetArtistById(product.ArtistId);

           var folderGuid = Guid.NewGuid();
           _zipFolder = string.Concat(artist.ArtistName.ToUpper().Replace(" ", "_"), "[", product.ProductName.ToUpper().Replace(" ", "_"), "].zip");
           _mp3FolderPath = Server.MapPath("/Files/" + productId + "/" + folderGuid);
           _zipDownloadPath = Server.MapPath("/Delivery/" + _zipFolder);

           if (!Directory.Exists(Server.MapPath("/Files/" + productId + "/" + folderGuid)))
           {
               Directory.CreateDirectory(Server.MapPath("/Files/" + productId + "/" + folderGuid));
           }

           foreach (var z in trackIds)
           {
               var track = _trackRepository.GetTrackById(z.TrackId);
               var process = new Process();
               var startInfo = new ProcessStartInfo
               {
                   WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden,
                   FileName = "F:\\Development\\ffmpeg\\ffmpeg.exe",
                   RedirectStandardOutput = true,
                   RedirectStandardError = true,
                   UseShellExecute = false
               };
               var startFile = Path.Combine("F:\\Development","Files", track.ProductId.ToString(), track.TrackFileName);
               var endFile = Path.Combine("F:\\Development", "Files", track.ProductId.ToString(), folderGuid.ToString(), track.TrackFileName.Replace(".wav", ".mp3"));

               startInfo.Arguments = "-i " + startFile + " -b:a 320k " + endFile + " -stats";
               process.StartInfo = startInfo;
               process.EnableRaisingEvents = true;
               process.Exited += myProcess_exited;
               process.OutputDataReceived += myProcess_OutputData;
               process.ErrorDataReceived += myProcess_ErrorData;

               try
               {
                   process.Start();
                   process.BeginOutputReadLine();
                   process.BeginErrorReadLine();

                   if (process.HasExited == false)
                   {
                       process.WaitForExit();
                   }
               }
               catch (Exception)
               {

                   throw;
               }
           }

           SendFileDownload();

       }

       public ActionResult SendFileDownload()
       {
           // zip and move to delivery folder
           using (var zip = new ZipFile())
           {
               zip.AddDirectory(_mp3FolderPath, _zipFolder);
               zip.Save(_zipDownloadPath);
           }

           // delete items in temp guid folder
           var downloadedMessageInfo = new DirectoryInfo(_mp3FolderPath);
           foreach (var f in downloadedMessageInfo.GetFiles())
           {
               f.Delete();
           }

           // delete temp folder
           Directory.Delete(_mp3FolderPath);

           // download file
           string file = _zipDownloadPath;
           return File(file, "application/force-download", Path.GetFileName(file));

       }

       public void myProcess_exited(Object source, EventArgs e)
       {
           Debug.WriteLine("myProcess_exited ===================================");
           _duration = new TimeSpan(0, 0, 0);
           _frameTime = new TimeSpan(0, 0, 0);
           _percentage = 0;
           _numEncodedTracks++; // using this to tell me if all tracks have been encoded
       }

       public void myProcess_OutputData(object source, DataReceivedEventArgs e)
       {
       }

       public void myProcess_ErrorData(object source, DataReceivedEventArgs e)
       {
           string strMessage = e.Data;

           if (!string.IsNullOrEmpty(strMessage) &amp;&amp; (strMessage.Contains("Duration: ") || strMessage.Contains("size=")))
           {
               if (_duration != null)
               {
                   if (strMessage.Contains("Duration: "))
                   {
                       _strDuration = strMessage.Substring(strMessage.IndexOf("Duration: ") + ("Duration: ").Length,
                           ("00:00:00.00").Length);

                       char[] d_delHrMn = new char[] { ':' };
                       string[] d_tempHrMn = _strDuration.Split(d_delHrMn, StringSplitOptions.RemoveEmptyEntries);

                       char[] d_delSec = new char[] { '.' };
                       string[] d_tempSec = d_tempHrMn[2].Split(d_delSec, StringSplitOptions.RemoveEmptyEntries);

                       var d_hour = d_tempHrMn[0] == "0" ? 0 : Convert.ToInt32(d_tempHrMn[0]);
                       var d_min = d_tempHrMn[1] == "0" ? 0 : Convert.ToInt32(d_tempHrMn[1]);
                       var d_sec = d_tempSec[0] == "0" ? 0 : Convert.ToInt32(d_tempSec[0]);

                       _duration = new TimeSpan(d_hour, d_min, d_sec);
                   }
               }

               if (strMessage.Contains("size="))
               {
                   _strFrameTime = strMessage.Substring(strMessage.IndexOf("time=") + ("time=").Length,
                       ("00:00:00.00").Length);

                   char[] f_delHrMn = new char[] { ':' };
                   string[] f_tempHrMn = _strFrameTime.Split(f_delHrMn, StringSplitOptions.RemoveEmptyEntries);

                   char[] f_delSec = new char[] { '.' };
                   string[] f_tempSec = f_tempHrMn[2].Split(f_delSec, StringSplitOptions.RemoveEmptyEntries);

                   var f_hour = f_tempHrMn[0] == "0" ? 0 : Convert.ToInt32(f_tempHrMn[0]);
                   var f_min = f_tempHrMn[1] == "0" ? 0 : Convert.ToInt32(f_tempHrMn[1]);
                   var f_sec = f_tempSec[0] == "0" ? 0 : Convert.ToInt32(f_tempSec[0]);

                   _frameTime = new TimeSpan(f_hour, f_min, f_sec);

               }

               if (_strDuration != "00:00:00.00" &amp;&amp; _strFrameTime != "00:00:00.00" &amp;&amp; _percentage &lt; 100)
               {
                   _percentage = _frameTime.TotalMilliseconds / _duration.TotalMilliseconds * 100;
                   Debug.WriteLine(_percentage + " || " + _frameTime + " " + _duration);
               }
           }
       }
    </trackstodownload>