Exemple #1
0
 private void Dltn_Finished(object sender, EventArgs e)
 {
     PartialProgress.Value = 0;
     OnProgressReported(75);
     if (dltn == null)
     {
         cnva = new FFMPEGInteract.MP3Interact.Convert(TempDirInfo.FullName + @"\audio", FinalFileInfo.FullName, OutFormat.Format, ID3.Meta);
     }
     else
     {
         //dltn.Finished -= Dltn_Finished;
         if (dltn.Status != WorkerStatus.Successful)
         {
             OnFinished(false);
             return;
         }
         cnva = new FFMPEGInteract.MP3Interact.Convert(TempDirInfo.FullName + @"\audio", FinalFileInfo.FullName, OutFormat.Format, ID3.Meta, SafeThumbNailName);
     }
     cnva.TrimmedOutputDataReceived += (s2, e2) => OnTrimmedOutputDataReceived(e2);
     cnva.TrimmedErrorDataReceived  += (s2, e2) => OnTrimmedErrorDataReceived(e2);
     cnva.ProgressReported          += (s2, e2) => { PartialProgress.Value = e2.Percent; OnProgressReported(75 + 0.25 * e2.Percent); };
     cnva.Finished += Cnva_Finished;
     cnva.Ready();
     cnva.Start();
 }
Exemple #2
0
 private void BeginButton_Click(object sender, RoutedEventArgs e)
 {
     FFMPEGInteract.MP3Interact.Meta meta = new FFMPEGInteract.MP3Interact.Meta()
     {
         Album      = "Merk & Kremont's album",
         Composer   = "Merk & Kremont probably",
         Genre      = "EDM surely",
         Copyright  = "Thank you for no copyright, Spinnin' Records!",
         Title      = "GANG",
         Language   = "Surely not money's language",
         ArtistList = new List <string>()
         {
             "Merk & Kremont", "Kris Kiss"
         },
         AlbumArtist = "Merk & Kremont",
         Performer   = "all of them",
         Disc        = "0",
         Publisher   = "Spinnin' Copyright Free Music",
         Track       = "69",
         Lyrics      = "Very good, indeed!"
     };
     FFMPEGInteract.MP3Interact.Convert cnv = new FFMPEGInteract.MP3Interact.Convert("ellow_audio.webm", "ellow_final.mp3", new FFMPEGInteract.MP3Interact.OutputFormat(FFMPEGInteract.MP3Interact.OutputFormat.EncodingMethod.VBR, 0), meta, "ellow_thumbnail.jpg");
     cnv.TrimmedOutputDataReceived += (s2, e2) => W("out", e2.FullData);
     cnv.TrimmedErrorDataReceived  += (s2, e2) => W("err", e2.FullData);
     cnv.ProgressReported          += (s2, e2) => {
         Progress.Value = e2.Percent;
         Frame.Text     = e2.Frame.ToString();
         FPS.Text       = e2.FPS.ToString();
         Q.Text         = e2.Q.ToString();
         Size.Text      = e2.Size;
         Time.Text      = e2.Time.ToString();
         Bitrate.Text   = e2.Bitrate;
         Speed.Text     = e2.Speed;
     };
     cnv.Finished += (s2, e2) => W("Finished!");
 }