diff --git a/KaraokeConverter/App.config b/KaraokeConverter/App.config deleted file mode 100644 index 9350691..0000000 --- a/KaraokeConverter/App.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/KaraokeConverter/ExportAVI.cs b/KaraokeConverter/ExportAVI.cs deleted file mode 100644 index 445645e..0000000 --- a/KaraokeConverter/ExportAVI.cs +++ /dev/null @@ -1,131 +0,0 @@ -using System; -using System.Drawing; -using System.IO; -using System.Text.RegularExpressions; -using System.Windows.Forms; -using AviFile; -using CdgLib; - -namespace KaraokeConverter -{ - public class ExportAVI - { - public delegate void StatusEventHandler(string message); - - - public void CDGtoAVI(string aviFileName, string cdgFileName, string mp3FileName, double frameRate, - string backgroundFileName = "") - { - Bitmap backgroundBmp = null; - Bitmap mergedBMP = null; - VideoStream aviStream = null; - var myCDGFile = new GraphicsFile(cdgFileName, FileMode.Open, FileAccess.Read); - myCDGFile.RenderAtPosition(0); - var bitmap__1 = (Bitmap) myCDGFile.RgbImage; - if (!string.IsNullOrEmpty(backgroundFileName)) - { - try - { - if (IsMovie(backgroundFileName)) - backgroundBmp = MovieFrameExtractor.GetBitmap(0, backgroundFileName, GraphicsFile.FullWidth, - GraphicsFile.FullHeight); - if (IsGraphic(backgroundFileName)) - backgroundBmp = GraphicUtil.GetCdgSizeBitmap(backgroundFileName); - } - catch (Exception ex) - { - } - } - var aviManager = new AviManager(aviFileName, false); - if (backgroundBmp != null) - { - mergedBMP = GraphicUtil.MergeImagesWithTransparency(backgroundBmp, bitmap__1); - aviStream = aviManager.AddVideoStream(true, frameRate, mergedBMP); - mergedBMP.Dispose(); - if (IsMovie(backgroundFileName)) - backgroundBmp.Dispose(); - } - else - { - aviStream = aviManager.AddVideoStream(true, frameRate, bitmap__1); - } - - var count = 0; - var frameInterval = 1000/frameRate; - var totalDuration = myCDGFile.GetTotalDuration(); - double position = 0; - while (position <= totalDuration) - { - count += 1; - position = count*frameInterval; - myCDGFile.RenderAtPosition(Convert.ToInt64(position)); - bitmap__1 = (Bitmap) myCDGFile.RgbImage; - if (!string.IsNullOrEmpty(backgroundFileName)) - { - if (IsMovie(backgroundFileName)) - backgroundBmp = MovieFrameExtractor.GetBitmap(position/1000, backgroundFileName, - GraphicsFile.FullWidth, GraphicsFile.FullHeight); - } - if (backgroundBmp != null) - { - mergedBMP = GraphicUtil.MergeImagesWithTransparency(backgroundBmp, bitmap__1); - aviStream.AddFrame(mergedBMP); - mergedBMP.Dispose(); - if (IsMovie(backgroundFileName)) - backgroundBmp.Dispose(); - } - else - { - aviStream.AddFrame(bitmap__1); - } - bitmap__1.Dispose(); - var percentageDone = (int) (position/totalDuration*100); - if (Status != null) - { - Status(percentageDone.ToString()); - } - Application.DoEvents(); - } - myCDGFile.Dispose(); - aviManager.Close(); - if (backgroundBmp != null) - backgroundBmp.Dispose(); - AddMP3toAVI(aviFileName, mp3FileName); - } - - public static void AddMP3toAVI(string aviFileName, string mp3FileName) - { - /* - string newAVIFileName = Regex.Replace(aviFileName, "\\.avi$", "MUX.avi", RegexOptions.IgnoreCase); - string cmdLineArgs = "-ovc copy -oac copy -audiofile \"" + mp3FileName + "\" -o \"" + newAVIFileName + "\" \"" + aviFileName + "\""; - using (Process myProcess = new Process()) { - string myCMD = "\"" + System.AppDomain.CurrentDomain.BaseDirectory() + "mencoder.exe \"" + cmdLineArgs; - myProcess.StartInfo.FileName = "\"" + System.AppDomain.CurrentDomain.BaseDirectory() + "mencoder.exe\""; - myProcess.StartInfo.Arguments = cmdLineArgs; - myProcess.StartInfo.UseShellExecute = false; - myProcess.StartInfo.CreateNoWindow = true; - myProcess.Start(); - myProcess.PriorityClass = ProcessPriorityClass.Normal; - myProcess.WaitForExit(); - } - if (File.Exists(newAVIFileName)) { - File.Delete(aviFileName); - File.Move(newAVIFileName, aviFileName); - } - */ - } - - public static bool IsMovie(string filename) - { - return Regex.IsMatch(filename, "^.+(\\.avi|\\.mpg|\\.wmv)$", RegexOptions.IgnoreCase); - } - - public static bool IsGraphic(string filename) - { - return Regex.IsMatch(filename, "^.+(\\.jpg|\\.bmp|\\.png|\\.tif|\\.tiff|\\.gif|\\.wmf)$", - RegexOptions.IgnoreCase); - } - - public event StatusEventHandler Status; - } -} \ No newline at end of file diff --git a/KaraokeConverter/Form1.Designer.cs b/KaraokeConverter/Form1.Designer.cs deleted file mode 100644 index f326f2e..0000000 --- a/KaraokeConverter/Form1.Designer.cs +++ /dev/null @@ -1,305 +0,0 @@ -namespace KaraokeConverter -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.tbFileName = new System.Windows.Forms.TextBox(); - this.btBrowseCDG = new System.Windows.Forms.Button(); - this.OpenFileDialog1 = new System.Windows.Forms.OpenFileDialog(); - this.Panel1 = new System.Windows.Forms.Panel(); - this.GroupBox3 = new System.Windows.Forms.GroupBox(); - this.chkBackGraph = new System.Windows.Forms.CheckBox(); - this.tbBackGroundImg = new System.Windows.Forms.TextBox(); - this.btBrowseImg = new System.Windows.Forms.Button(); - this.chkBackGround = new System.Windows.Forms.CheckBox(); - this.tbBackGroundAVI = new System.Windows.Forms.TextBox(); - this.btBackGroundBrowse = new System.Windows.Forms.Button(); - this.lbSaveAs = new System.Windows.Forms.Label(); - this.tbAVIFile = new System.Windows.Forms.TextBox(); - this.btOutputAVI = new System.Windows.Forms.Button(); - this.tbFPS = new System.Windows.Forms.TextBox(); - this.lbFPS = new System.Windows.Forms.Label(); - this.btConvert = new System.Windows.Forms.Button(); - this.GroupBox2 = new System.Windows.Forms.GroupBox(); - this.GroupBox1 = new System.Windows.Forms.GroupBox(); - this.pbAVI = new System.Windows.Forms.ProgressBar(); - this.SaveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); - this.Panel1.SuspendLayout(); - this.GroupBox3.SuspendLayout(); - this.GroupBox2.SuspendLayout(); - this.GroupBox1.SuspendLayout(); - this.SuspendLayout(); - // - // tbFileName - // - this.tbFileName.Location = new System.Drawing.Point(9, 13); - this.tbFileName.Name = "tbFileName"; - this.tbFileName.ReadOnly = true; - this.tbFileName.Size = new System.Drawing.Size(475, 20); - this.tbFileName.TabIndex = 0; - // - // btBrowseCDG - // - this.btBrowseCDG.Location = new System.Drawing.Point(490, 11); - this.btBrowseCDG.Name = "btBrowseCDG"; - this.btBrowseCDG.Size = new System.Drawing.Size(68, 23); - this.btBrowseCDG.TabIndex = 1; - this.btBrowseCDG.Text = "Browse..."; - this.btBrowseCDG.UseVisualStyleBackColor = true; - this.btBrowseCDG.Click += new System.EventHandler(this.btBrowseCDG_Click); - // - // OpenFileDialog1 - // - this.OpenFileDialog1.FileName = "OpenFileDialog1"; - // - // Panel1 - // - this.Panel1.Controls.Add(this.GroupBox3); - this.Panel1.Controls.Add(this.GroupBox2); - this.Panel1.Controls.Add(this.GroupBox1); - this.Panel1.Dock = System.Windows.Forms.DockStyle.Top; - this.Panel1.Location = new System.Drawing.Point(0, 0); - this.Panel1.Name = "Panel1"; - this.Panel1.Size = new System.Drawing.Size(649, 255); - this.Panel1.TabIndex = 3; - this.Panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.Panel1_Paint); - // - // GroupBox3 - // - this.GroupBox3.Controls.Add(this.chkBackGraph); - this.GroupBox3.Controls.Add(this.tbBackGroundImg); - this.GroupBox3.Controls.Add(this.btBrowseImg); - this.GroupBox3.Controls.Add(this.chkBackGround); - this.GroupBox3.Controls.Add(this.tbBackGroundAVI); - this.GroupBox3.Controls.Add(this.btBackGroundBrowse); - this.GroupBox3.Controls.Add(this.lbSaveAs); - this.GroupBox3.Controls.Add(this.tbAVIFile); - this.GroupBox3.Controls.Add(this.btOutputAVI); - this.GroupBox3.Controls.Add(this.tbFPS); - this.GroupBox3.Controls.Add(this.lbFPS); - this.GroupBox3.Controls.Add(this.btConvert); - this.GroupBox3.Location = new System.Drawing.Point(3, 53); - this.GroupBox3.Name = "GroupBox3"; - this.GroupBox3.Size = new System.Drawing.Size(571, 145); - this.GroupBox3.TabIndex = 18; - this.GroupBox3.TabStop = false; - this.GroupBox3.Text = "AVI Settings"; - // - // chkBackGraph - // - this.chkBackGraph.AutoSize = true; - this.chkBackGraph.Location = new System.Drawing.Point(7, 79); - this.chkBackGraph.Name = "chkBackGraph"; - this.chkBackGraph.Size = new System.Drawing.Size(122, 17); - this.chkBackGraph.TabIndex = 23; - this.chkBackGraph.Text = "Background graphic"; - this.chkBackGraph.UseVisualStyleBackColor = true; - this.chkBackGraph.CheckedChanged += new System.EventHandler(this.chkBackGraph_CheckedChanged); - // - // tbBackGroundImg - // - this.tbBackGroundImg.Enabled = false; - this.tbBackGroundImg.Location = new System.Drawing.Point(128, 77); - this.tbBackGroundImg.Name = "tbBackGroundImg"; - this.tbBackGroundImg.Size = new System.Drawing.Size(356, 20); - this.tbBackGroundImg.TabIndex = 21; - // - // btBrowseImg - // - this.btBrowseImg.Enabled = false; - this.btBrowseImg.Location = new System.Drawing.Point(490, 75); - this.btBrowseImg.Name = "btBrowseImg"; - this.btBrowseImg.Size = new System.Drawing.Size(75, 23); - this.btBrowseImg.TabIndex = 22; - this.btBrowseImg.Text = "Browse..."; - this.btBrowseImg.UseVisualStyleBackColor = true; - this.btBrowseImg.Click += new System.EventHandler(this.btBrowseImg_Click); - // - // chkBackGround - // - this.chkBackGround.AutoSize = true; - this.chkBackGround.Location = new System.Drawing.Point(7, 51); - this.chkBackGround.Name = "chkBackGround"; - this.chkBackGround.Size = new System.Drawing.Size(115, 17); - this.chkBackGround.TabIndex = 20; - this.chkBackGround.Text = "Background movie"; - this.chkBackGround.UseVisualStyleBackColor = true; - this.chkBackGround.CheckedChanged += new System.EventHandler(this.chkBackGround_CheckedChanged); - // - // tbBackGroundAVI - // - this.tbBackGroundAVI.Enabled = false; - this.tbBackGroundAVI.Location = new System.Drawing.Point(128, 49); - this.tbBackGroundAVI.Name = "tbBackGroundAVI"; - this.tbBackGroundAVI.Size = new System.Drawing.Size(356, 20); - this.tbBackGroundAVI.TabIndex = 17; - // - // btBackGroundBrowse - // - this.btBackGroundBrowse.Enabled = false; - this.btBackGroundBrowse.Location = new System.Drawing.Point(490, 47); - this.btBackGroundBrowse.Name = "btBackGroundBrowse"; - this.btBackGroundBrowse.Size = new System.Drawing.Size(75, 23); - this.btBackGroundBrowse.TabIndex = 18; - this.btBackGroundBrowse.Text = "Browse..."; - this.btBackGroundBrowse.UseVisualStyleBackColor = true; - this.btBackGroundBrowse.Click += new System.EventHandler(this.btBackGroundBrowse_Click); - // - // lbSaveAs - // - this.lbSaveAs.AutoSize = true; - this.lbSaveAs.Location = new System.Drawing.Point(76, 22); - this.lbSaveAs.Name = "lbSaveAs"; - this.lbSaveAs.Size = new System.Drawing.Size(46, 13); - this.lbSaveAs.TabIndex = 16; - this.lbSaveAs.Text = "Save as"; - // - // tbAVIFile - // - this.tbAVIFile.Location = new System.Drawing.Point(128, 19); - this.tbAVIFile.Name = "tbAVIFile"; - this.tbAVIFile.Size = new System.Drawing.Size(356, 20); - this.tbAVIFile.TabIndex = 9; - // - // btOutputAVI - // - this.btOutputAVI.Location = new System.Drawing.Point(490, 17); - this.btOutputAVI.Name = "btOutputAVI"; - this.btOutputAVI.Size = new System.Drawing.Size(75, 23); - this.btOutputAVI.TabIndex = 10; - this.btOutputAVI.Text = "Browse..."; - this.btOutputAVI.UseVisualStyleBackColor = true; - this.btOutputAVI.Click += new System.EventHandler(this.btOutputAVI_Click_1); - // - // tbFPS - // - this.tbFPS.Location = new System.Drawing.Point(128, 108); - this.tbFPS.Name = "tbFPS"; - this.tbFPS.Size = new System.Drawing.Size(67, 20); - this.tbFPS.TabIndex = 15; - this.tbFPS.Text = "15"; - // - // lbFPS - // - this.lbFPS.AutoSize = true; - this.lbFPS.Location = new System.Drawing.Point(201, 111); - this.lbFPS.Name = "lbFPS"; - this.lbFPS.Size = new System.Drawing.Size(94, 13); - this.lbFPS.TabIndex = 12; - this.lbFPS.Text = "frames per second"; - // - // btConvert - // - this.btConvert.Location = new System.Drawing.Point(490, 106); - this.btConvert.Name = "btConvert"; - this.btConvert.Size = new System.Drawing.Size(75, 23); - this.btConvert.TabIndex = 13; - this.btConvert.Text = "Create AVI"; - this.btConvert.UseVisualStyleBackColor = true; - this.btConvert.Click += new System.EventHandler(this.btConvert_Click); - // - // GroupBox2 - // - this.GroupBox2.Controls.Add(this.tbFileName); - this.GroupBox2.Controls.Add(this.btBrowseCDG); - this.GroupBox2.Location = new System.Drawing.Point(3, 3); - this.GroupBox2.Name = "GroupBox2"; - this.GroupBox2.Size = new System.Drawing.Size(571, 40); - this.GroupBox2.TabIndex = 17; - this.GroupBox2.TabStop = false; - this.GroupBox2.Text = "MP3 + CDG File"; - // - // GroupBox1 - // - this.GroupBox1.Controls.Add(this.pbAVI); - this.GroupBox1.Location = new System.Drawing.Point(3, 204); - this.GroupBox1.Name = "GroupBox1"; - this.GroupBox1.Size = new System.Drawing.Size(571, 48); - this.GroupBox1.TabIndex = 16; - this.GroupBox1.TabStop = false; - this.GroupBox1.Text = "Progress"; - // - // pbAVI - // - this.pbAVI.Location = new System.Drawing.Point(7, 19); - this.pbAVI.Name = "pbAVI"; - this.pbAVI.Size = new System.Drawing.Size(555, 23); - this.pbAVI.TabIndex = 14; - // - // Form1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(649, 255); - this.Controls.Add(this.Panel1); - this.Name = "Form1"; - this.Text = "MP3+CDG To Video Converter"; - this.Load += new System.EventHandler(this.Form1_Load); - this.Panel1.ResumeLayout(false); - this.GroupBox3.ResumeLayout(false); - this.GroupBox3.PerformLayout(); - this.GroupBox2.ResumeLayout(false); - this.GroupBox2.PerformLayout(); - this.GroupBox1.ResumeLayout(false); - this.ResumeLayout(false); - - } - private System.Windows.Forms.TextBox tbFileName; - private System.Windows.Forms.Button btBrowseCDG; - - private System.Windows.Forms.OpenFileDialog OpenFileDialog1; - private System.Windows.Forms.Panel Panel1; - private System.Windows.Forms.GroupBox GroupBox2; - private System.Windows.Forms.GroupBox GroupBox1; - private System.Windows.Forms.ProgressBar pbAVI; - private System.Windows.Forms.TextBox tbFPS; - - private System.Windows.Forms.Button btConvert; - - private System.Windows.Forms.Label lbFPS; - private System.Windows.Forms.Button btOutputAVI; - - private System.Windows.Forms.TextBox tbAVIFile; - private System.Windows.Forms.GroupBox GroupBox3; - private System.Windows.Forms.SaveFileDialog SaveFileDialog1; - private System.Windows.Forms.TextBox tbBackGroundAVI; - private System.Windows.Forms.Button btBackGroundBrowse; - - private System.Windows.Forms.Label lbSaveAs; - private System.Windows.Forms.CheckBox chkBackGround; - - private System.Windows.Forms.CheckBox chkBackGraph; - - private System.Windows.Forms.TextBox tbBackGroundImg; - private System.Windows.Forms.Button btBrowseImg; - - - #endregion - } -} - diff --git a/KaraokeConverter/Form1.cs b/KaraokeConverter/Form1.cs deleted file mode 100644 index a5dc3c4..0000000 --- a/KaraokeConverter/Form1.cs +++ /dev/null @@ -1,237 +0,0 @@ -using System; -using System.Drawing; -using System.IO; -using System.Text.RegularExpressions; -using System.Windows.Forms; -using CdgLib; - -namespace KaraokeConverter -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - - #region "Events" - - private void mExportAVI_Status(string message) - { - pbAVI.Value = Convert.ToInt32(message); - } - - #endregion - - #region "Private Declarations" - - private GraphicsFile mCDGFile; - private CdgFileIoStream mCDGStream; - private string mCDGFileName; - private string mMP3FileName; - private string mTempDir; - private ExportAVI withEventsField_mExportAVI; - - private ExportAVI mExportAVI - { - get { return withEventsField_mExportAVI; } - set - { - if (withEventsField_mExportAVI != null) - { - withEventsField_mExportAVI.Status -= mExportAVI_Status; - } - withEventsField_mExportAVI = value; - if (withEventsField_mExportAVI != null) - { - withEventsField_mExportAVI.Status += mExportAVI_Status; - } - } - } - - #endregion - - #region "Control Events" - - private void btOutputAVI_Click_1(object sender, EventArgs e) - { - SelectOutputAVI(); - } - - private void btBackGroundBrowse_Click(object sender, EventArgs e) - { - SelectBackGroundAVI(); - } - - private void btConvert_Click(object sender, EventArgs e) - { - ConvertAVI(); - } - - private void tbFPS_KeyPress(object sender, KeyPressEventArgs e) - { - /* - if ((Strings.Asc(e.KeyChar) >= Keys.D0 & Strings.Asc(e.KeyChar) <= Keys.D9) | Strings.Asc(e.KeyChar) == Keys.Back | e.KeyChar == ".") { - e.Handled = false; - } else { - e.Handled = true; - } - */ - } - - private void btBrowseCDG_Click(object sender, EventArgs e) - { - OpenFileDialog1.Filter = "CDG or Zip Files (*.zip, *.cdg)|*.zip;*.cdg"; - OpenFileDialog1.ShowDialog(); - tbFileName.Text = OpenFileDialog1.FileName; - } - - private void chkBackGraph_CheckedChanged(object sender, EventArgs e) - { - if (chkBackGround.Checked && chkBackGraph.Checked) - { - chkBackGround.Checked = false; - } - ToggleCheckBox(); - } - - private void chkBackGround_CheckedChanged(object sender, EventArgs e) - { - if (chkBackGraph.Checked && chkBackGround.Checked) - { - chkBackGraph.Checked = false; - } - ToggleCheckBox(); - } - - private void btBrowseImg_Click(object sender, EventArgs e) - { - SelectBackGroundGraphic(); - } - - #endregion - - #region "Private Methods" - - private void SelectOutputAVI() - { - SaveFileDialog1.Filter = "AVI Files (*.avi)|*.avi"; - SaveFileDialog1.ShowDialog(); - tbAVIFile.Text = SaveFileDialog1.FileName; - } - - private void SelectBackGroundAVI() - { - OpenFileDialog1.Filter = "Movie Files (*.avi, *.mpg, *.wmv)|*.avi;*.mpg;*.wmv"; - OpenFileDialog1.ShowDialog(); - tbBackGroundAVI.Text = OpenFileDialog1.FileName; - } - - private void SelectBackGroundGraphic() - { - OpenFileDialog1.Filter = "Graphic Files|*.jpg;*.bmp;*.png;*.tif;*.tiff;*.gif;*.wmf"; - OpenFileDialog1.ShowDialog(); - tbBackGroundImg.Text = OpenFileDialog1.FileName; - } - - private void ConvertAVI() - { - try - { - PreProcessFiles(); - if (string.IsNullOrEmpty(mCDGFileName) | string.IsNullOrEmpty(mMP3FileName)) - { - MessageBox.Show("Cannot find a CDG and MP3 file to convert together."); - return; - } - } - catch (Exception ex) - { - //Do nothing for now - } - mExportAVI = new ExportAVI(); - pbAVI.Value = 0; - var backGroundFilename = ""; - if (chkBackGraph.Checked) - backGroundFilename = tbBackGroundImg.Text; - if (chkBackGround.Checked) - backGroundFilename = tbBackGroundAVI.Text; - mExportAVI.CDGtoAVI(tbAVIFile.Text, mCDGFileName, mMP3FileName, Convert.ToDouble(tbFPS.Text), - backGroundFilename); - pbAVI.Value = 0; - try - { - CleanUp(); - } - catch (Exception ex) - { - //Do nothing for now - } - } - - private void CleanUp() - { - if (!string.IsNullOrEmpty(mTempDir)) - { - try - { - Directory.Delete(mTempDir, true); - } - catch (Exception ex) - { - } - } - mTempDir = ""; - } - - private void PreProcessFiles() - { - - string myCDGFileName = ""; - if (Regex.IsMatch(tbFileName.Text, "\\.zip$")) { - string myTempDir = Path.GetTempPath() + Path.GetRandomFileName(); - Directory.CreateDirectory(myTempDir); - mTempDir = myTempDir; - myCDGFileName = Unzip.UnzipMP3GFiles(tbFileName.Text, myTempDir); - } else if (Regex.IsMatch(tbFileName.Text, "\\.cdg$")) { - myCDGFileName = tbFileName.Text; - PairUpFiles: - string myMP3FileName = System.Text.RegularExpressions.Regex.Replace(myCDGFileName, "\\.cdg$", ".mp3"); - if (File.Exists(myMP3FileName)) { - mMP3FileName = myMP3FileName; - mCDGFileName = myCDGFileName; - mTempDir = ""; - } - } - - } - - - private void ToggleCheckBox() - { - tbBackGroundAVI.Enabled = chkBackGround.Checked; - btBackGroundBrowse.Enabled = chkBackGround.Checked; - tbBackGroundImg.Enabled = chkBackGraph.Checked; - btBrowseImg.Enabled = chkBackGraph.Checked; - } - - #endregion - - private void Panel1_Paint(object sender, PaintEventArgs e) - { - - } - - private void Panel2_Paint(object sender, PaintEventArgs e) - { - - } - - private void Form1_Load(object sender, EventArgs e) - { - - - - } - } -} \ No newline at end of file diff --git a/KaraokeConverter/Form1.resx b/KaraokeConverter/Form1.resx deleted file mode 100644 index fdfe6a4..0000000 --- a/KaraokeConverter/Form1.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - 159, 17 - - \ No newline at end of file diff --git a/KaraokeConverter/KaraokeConverter.csproj b/KaraokeConverter/KaraokeConverter.csproj deleted file mode 100644 index 20e5da4..0000000 --- a/KaraokeConverter/KaraokeConverter.csproj +++ /dev/null @@ -1,147 +0,0 @@ - - - - - Debug - AnyCPU - {2821C26D-52D8-43D9-BEF4-7CE4DFA60776} - WinExe - Properties - KaraokeConverter - KaraokeConverter - v4.6 - 512 - true - - - - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - lib\AviFile.dll - - - False - lib\DirectShowLib-2005.dll - - - ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll - True - - - False - False - lib\Interop.DexterLib.dll - - - ..\packages\NReco.VideoConverter.1.0.8.0\lib\net20\NReco.VideoConverter.dll - True - - - False - lib\NReco.VideoInfo.dll - - - - - - - - - - - - - - - - - - Form - - - Form1.cs - - - - - - - Form1.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - - - - Always - - - Always - - - Always - - - Always - - - - - - - - {3203dfd2-da5b-47b3-b009-18dd9c401fc3} - CdgLib - - - - - \ No newline at end of file diff --git a/KaraokeConverter/MovieFrameExtractor.cs b/KaraokeConverter/MovieFrameExtractor.cs deleted file mode 100644 index 1d43a86..0000000 --- a/KaraokeConverter/MovieFrameExtractor.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Diagnostics; -using System.Drawing; -using System.IO; -using DexterLib; -using DirectShowLib.DMO; -using NReco.VideoConverter; - -namespace KaraokeConverter -{ - public class MovieFrameExtractor - { - public static Bitmap GetBitmap(double position, string movieFileName, int width, int height) - { - var stopWatch = new Stopwatch(); - stopWatch.Start(); - var ffProbe = new NReco.VideoInfo.FFProbe(); - var mediaInfo = ffProbe.GetMediaInfo(movieFileName); - var videoDuration = (int)mediaInfo.Duration.TotalSeconds; - - var ffMpeg = new FFMpegConverter(); - using (var ms = new MemoryStream()) - { - ffMpeg.GetVideoThumbnail(movieFileName, ms, (float)position % videoDuration); - var bitmap = new Bitmap(ms); - stopWatch.Stop(); - Debug.Print(stopWatch.ElapsedMilliseconds.ToString()); - return bitmap; - } - } - } -} \ No newline at end of file diff --git a/KaraokeConverter/Program.cs b/KaraokeConverter/Program.cs deleted file mode 100644 index d5d1945..0000000 --- a/KaraokeConverter/Program.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Windows.Forms; - -namespace KaraokeConverter -{ - internal static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - private static void Main() - { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new Form1()); - } - } -} \ No newline at end of file diff --git a/KaraokeConverter/Properties/AssemblyInfo.cs b/KaraokeConverter/Properties/AssemblyInfo.cs deleted file mode 100644 index d2cf5df..0000000 --- a/KaraokeConverter/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. - -[assembly: AssemblyTitle("KaraokeConverter")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("KaraokeConverter")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. - -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM - -[assembly: Guid("2821c26d-52d8-43d9-bef4-7ce4dfa60776")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] - -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/KaraokeConverter/Properties/Resources.Designer.cs b/KaraokeConverter/Properties/Resources.Designer.cs deleted file mode 100644 index 272bd2d..0000000 --- a/KaraokeConverter/Properties/Resources.Designer.cs +++ /dev/null @@ -1,73 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace KaraokeConverter.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("KaraokeConverter.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Google { - get { - object obj = ResourceManager.GetObject("Google", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - } -} diff --git a/KaraokeConverter/Properties/Resources.resx b/KaraokeConverter/Properties/Resources.resx deleted file mode 100644 index ee4e93d..0000000 --- a/KaraokeConverter/Properties/Resources.resx +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - ..\Resources\Google.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - \ No newline at end of file diff --git a/KaraokeConverter/Properties/Settings.Designer.cs b/KaraokeConverter/Properties/Settings.Designer.cs deleted file mode 100644 index 86bce9f..0000000 --- a/KaraokeConverter/Properties/Settings.Designer.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace KaraokeConverter.Properties -{ - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { - return defaultInstance; - } - } - } -} diff --git a/KaraokeConverter/Properties/Settings.settings b/KaraokeConverter/Properties/Settings.settings deleted file mode 100644 index e04fc63..0000000 --- a/KaraokeConverter/Properties/Settings.settings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/KaraokeConverter/Resources/Google.png b/KaraokeConverter/Resources/Google.png deleted file mode 100644 index 4cd9cd9..0000000 Binary files a/KaraokeConverter/Resources/Google.png and /dev/null differ diff --git a/KaraokeConverter/Unzip.cs b/KaraokeConverter/Unzip.cs deleted file mode 100644 index 7bd1c55..0000000 --- a/KaraokeConverter/Unzip.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.IO; -using ICSharpCode.SharpZipLib.Zip; - -namespace KaraokeConverter -{ - public class Unzip - { - public static string UnzipMP3GFiles(string zipFilename, string outputPath) - { - string functionReturnValue = null; - functionReturnValue = ""; - try - { - var myZip = new FastZip(); - myZip.ExtractZip(zipFilename, outputPath, ""); - var myDirInfo = new DirectoryInfo(outputPath); - var myFileInfo = myDirInfo.GetFiles("*.cdg", SearchOption.AllDirectories); - if (myFileInfo.Length > 0) - { - functionReturnValue = myFileInfo[0].FullName; - } - } - catch (Exception ex) - { - } - return functionReturnValue; - } - } -} \ No newline at end of file diff --git a/KaraokeConverter/lib/AviFile.dll b/KaraokeConverter/lib/AviFile.dll deleted file mode 100644 index 0019757..0000000 Binary files a/KaraokeConverter/lib/AviFile.dll and /dev/null differ diff --git a/KaraokeConverter/lib/DirectShowLib-2005.dll b/KaraokeConverter/lib/DirectShowLib-2005.dll deleted file mode 100644 index ba11a16..0000000 Binary files a/KaraokeConverter/lib/DirectShowLib-2005.dll and /dev/null differ diff --git a/KaraokeConverter/lib/Interop.DexterLib.dll b/KaraokeConverter/lib/Interop.DexterLib.dll deleted file mode 100644 index b5b2c9b..0000000 Binary files a/KaraokeConverter/lib/Interop.DexterLib.dll and /dev/null differ diff --git a/KaraokeConverter/lib/NReco.VideoInfo.XML b/KaraokeConverter/lib/NReco.VideoInfo.XML deleted file mode 100644 index 5905fad..0000000 --- a/KaraokeConverter/lib/NReco.VideoInfo.XML +++ /dev/null @@ -1,162 +0,0 @@ - - - - NReco.VideoInfo - - - - - The exception that is thrown when FFProbe process retruns non-zero error exit code - - - - - Get FFMpeg process error code - - - - - Provides information about media streams, video or audio files (wrapper for FFProbe command line tool) - - - - - Create new instance of HtmlToPdfConverter - - - - - Returns information about local media file or online stream (URL). - - local file path or URL - Structured information about media - - - - Gets or sets path where FFProbe.exe is extracted - - - By default this property initialized with folder with application assemblies. - For ASP.NET applications it is recommended to use "~/App_Code/". - - - - - Get or set FFProbe tool executive file name ('ffprobe.exe' by default) - - - - - Get or set custom WkHtmlToImage command line arguments - - - - - Gets or sets FFProbe process priority (Normal by default) - - - - - Gets or sets maximum execution time for running FFProbe process (null is by default = no timeout) - - - - - Include information about file format. - - - - - Include information about media streams. - - - - - Represents information about media file or stream. - - - - - Returns attribute value from FFProbe XML result. - - XPath selector - attribute value or null - - - - Media container format identifier. - - - - - Human-readable container format name. - - - - - List of media container tags. - - - - - List of media streams. - - - - - Total duration of the media. - - - - - FFProble XML result. - - - - - Represents information about stream. - - - - - Stream index - - - - - Codec name identifier - - - - - Human-readable codec name. - - - - - Codec type (video, audio). - - - - - Video stream pixel format (if applicable). - - Null is returned if pixel format is not available. - - - - Video frame width (if applicable). - - - - - Video frame height (if applicable) - - - - - Video frame rate per second (if applicable). - - - - diff --git a/KaraokeConverter/lib/NReco.VideoInfo.dll b/KaraokeConverter/lib/NReco.VideoInfo.dll deleted file mode 100644 index 727e72c..0000000 Binary files a/KaraokeConverter/lib/NReco.VideoInfo.dll and /dev/null differ diff --git a/KaraokeConverter/lib/mencoder.exe b/KaraokeConverter/lib/mencoder.exe deleted file mode 100644 index df8e2d8..0000000 Binary files a/KaraokeConverter/lib/mencoder.exe and /dev/null differ diff --git a/KaraokeConverter/packages.config b/KaraokeConverter/packages.config deleted file mode 100644 index 651fdca..0000000 --- a/KaraokeConverter/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file