├── .gitignore ├── AboutBox.Designer.cs ├── AboutBox.cs ├── AboutBox.resx ├── App.config ├── LICENSE ├── Main.Designer.cs ├── Main.cs ├── Main.resx ├── Program.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── README.md ├── YTP++.csproj ├── YTP++.sln ├── YTPPlus ├── EffectsFactory.cs ├── Utilities.cs └── YTPGenerator.cs ├── iconwide.ico └── packages.config /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015/2017 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # Visual Studio 2017 auto generated files 33 | Generated\ Files/ 34 | 35 | # MSTest test Results 36 | [Tt]est[Rr]esult*/ 37 | [Bb]uild[Ll]og.* 38 | 39 | # NUNIT 40 | *.VisualState.xml 41 | TestResult.xml 42 | 43 | # Build Results of an ATL Project 44 | [Dd]ebugPS/ 45 | [Rr]eleasePS/ 46 | dlldata.c 47 | 48 | # Benchmark Results 49 | BenchmarkDotNet.Artifacts/ 50 | 51 | # .NET Core 52 | project.lock.json 53 | project.fragment.lock.json 54 | artifacts/ 55 | **/Properties/launchSettings.json 56 | 57 | # StyleCop 58 | StyleCopReport.xml 59 | 60 | # Files built by Visual Studio 61 | *_i.c 62 | *_p.c 63 | *_i.h 64 | *.ilk 65 | *.meta 66 | *.obj 67 | *.iobj 68 | *.pch 69 | *.pdb 70 | *.ipdb 71 | *.pgc 72 | *.pgd 73 | *.rsp 74 | *.sbr 75 | *.tlb 76 | *.tli 77 | *.tlh 78 | *.tmp 79 | *.tmp_proj 80 | *.log 81 | *.vspscc 82 | *.vssscc 83 | .builds 84 | *.pidb 85 | *.svclog 86 | *.scc 87 | 88 | # Chutzpah Test files 89 | _Chutzpah* 90 | 91 | # Visual C++ cache files 92 | ipch/ 93 | *.aps 94 | *.ncb 95 | *.opendb 96 | *.opensdf 97 | *.sdf 98 | *.cachefile 99 | *.VC.db 100 | *.VC.VC.opendb 101 | 102 | # Visual Studio profiler 103 | *.psess 104 | *.vsp 105 | *.vspx 106 | *.sap 107 | 108 | # Visual Studio Trace Files 109 | *.e2e 110 | 111 | # TFS 2012 Local Workspace 112 | $tf/ 113 | 114 | # Guidance Automation Toolkit 115 | *.gpState 116 | 117 | # ReSharper is a .NET coding add-in 118 | _ReSharper*/ 119 | *.[Rr]e[Ss]harper 120 | *.DotSettings.user 121 | 122 | # JustCode is a .NET coding add-in 123 | .JustCode 124 | 125 | # TeamCity is a build add-in 126 | _TeamCity* 127 | 128 | # DotCover is a Code Coverage Tool 129 | *.dotCover 130 | 131 | # AxoCover is a Code Coverage Tool 132 | .axoCover/* 133 | !.axoCover/settings.json 134 | 135 | # Visual Studio code coverage results 136 | *.coverage 137 | *.coveragexml 138 | 139 | # NCrunch 140 | _NCrunch_* 141 | .*crunch*.local.xml 142 | nCrunchTemp_* 143 | 144 | # MightyMoose 145 | *.mm.* 146 | AutoTest.Net/ 147 | 148 | # Web workbench (sass) 149 | .sass-cache/ 150 | 151 | # Installshield output folder 152 | [Ee]xpress/ 153 | 154 | # DocProject is a documentation generator add-in 155 | DocProject/buildhelp/ 156 | DocProject/Help/*.HxT 157 | DocProject/Help/*.HxC 158 | DocProject/Help/*.hhc 159 | DocProject/Help/*.hhk 160 | DocProject/Help/*.hhp 161 | DocProject/Help/Html2 162 | DocProject/Help/html 163 | 164 | # Click-Once directory 165 | publish/ 166 | 167 | # Publish Web Output 168 | *.[Pp]ublish.xml 169 | *.azurePubxml 170 | # Note: Comment the next line if you want to checkin your web deploy settings, 171 | # but database connection strings (with potential passwords) will be unencrypted 172 | *.pubxml 173 | *.publishproj 174 | 175 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 176 | # checkin your Azure Web App publish settings, but sensitive information contained 177 | # in these scripts will be unencrypted 178 | PublishScripts/ 179 | 180 | # NuGet Packages 181 | *.nupkg 182 | # The packages folder can be ignored because of Package Restore 183 | **/[Pp]ackages/* 184 | # except build/, which is used as an MSBuild target. 185 | !**/[Pp]ackages/build/ 186 | # Uncomment if necessary however generally it will be regenerated when needed 187 | #!**/[Pp]ackages/repositories.config 188 | # NuGet v3's project.json files produces more ignorable files 189 | *.nuget.props 190 | *.nuget.targets 191 | 192 | # Microsoft Azure Build Output 193 | csx/ 194 | *.build.csdef 195 | 196 | # Microsoft Azure Emulator 197 | ecf/ 198 | rcf/ 199 | 200 | # Windows Store app package directories and files 201 | AppPackages/ 202 | BundleArtifacts/ 203 | Package.StoreAssociation.xml 204 | _pkginfo.txt 205 | *.appx 206 | 207 | # Visual Studio cache files 208 | # files ending in .cache can be ignored 209 | *.[Cc]ache 210 | # but keep track of directories ending in .cache 211 | !*.[Cc]ache/ 212 | 213 | # Others 214 | ClientBin/ 215 | ~$* 216 | *~ 217 | *.dbmdl 218 | *.dbproj.schemaview 219 | *.jfm 220 | *.pfx 221 | *.publishsettings 222 | orleans.codegen.cs 223 | 224 | # Including strong name files can present a security risk 225 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 226 | #*.snk 227 | 228 | # Since there are multiple workflows, uncomment next line to ignore bower_components 229 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 230 | #bower_components/ 231 | 232 | # RIA/Silverlight projects 233 | Generated_Code/ 234 | 235 | # Backup & report files from converting an old project file 236 | # to a newer Visual Studio version. Backup files are not needed, 237 | # because we have git ;-) 238 | _UpgradeReport_Files/ 239 | Backup*/ 240 | UpgradeLog*.XML 241 | UpgradeLog*.htm 242 | ServiceFabricBackup/ 243 | *.rptproj.bak 244 | 245 | # SQL Server files 246 | *.mdf 247 | *.ldf 248 | *.ndf 249 | 250 | # Business Intelligence projects 251 | *.rdl.data 252 | *.bim.layout 253 | *.bim_*.settings 254 | *.rptproj.rsuser 255 | 256 | # Microsoft Fakes 257 | FakesAssemblies/ 258 | 259 | # GhostDoc plugin setting file 260 | *.GhostDoc.xml 261 | 262 | # Node.js Tools for Visual Studio 263 | .ntvs_analysis.dat 264 | node_modules/ 265 | 266 | # Visual Studio 6 build log 267 | *.plg 268 | 269 | # Visual Studio 6 workspace options file 270 | *.opt 271 | 272 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 273 | *.vbw 274 | 275 | # Visual Studio LightSwitch build output 276 | **/*.HTMLClient/GeneratedArtifacts 277 | **/*.DesktopClient/GeneratedArtifacts 278 | **/*.DesktopClient/ModelManifest.xml 279 | **/*.Server/GeneratedArtifacts 280 | **/*.Server/ModelManifest.xml 281 | _Pvt_Extensions 282 | 283 | # Paket dependency manager 284 | .paket/paket.exe 285 | paket-files/ 286 | 287 | # FAKE - F# Make 288 | .fake/ 289 | 290 | # JetBrains Rider 291 | .idea/ 292 | *.sln.iml 293 | 294 | # CodeRush 295 | .cr/ 296 | 297 | # Python Tools for Visual Studio (PTVS) 298 | __pycache__/ 299 | *.pyc 300 | 301 | # Cake - Uncomment if you are using it 302 | # tools/** 303 | # !tools/packages.config 304 | 305 | # Tabs Studio 306 | *.tss 307 | 308 | # Telerik's JustMock configuration file 309 | *.jmconfig 310 | 311 | # BizTalk build output 312 | *.btp.cs 313 | *.btm.cs 314 | *.odx.cs 315 | *.xsd.cs 316 | 317 | # OpenCover UI analysis results 318 | OpenCover/ 319 | 320 | # Azure Stream Analytics local run output 321 | ASALocalRun/ 322 | 323 | # MSBuild Binary and Structured Log 324 | *.binlog 325 | 326 | # NVidia Nsight GPU debugger configuration file 327 | *.nvuser 328 | 329 | # MFractors (Xamarin productivity tool) working folder 330 | .mfractor/ 331 | -------------------------------------------------------------------------------- /AboutBox.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace YTPPlusPlus 2 | { 3 | partial class AboutBox 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | protected override void Dispose(bool disposing) 14 | { 15 | if (disposing && (components != null)) 16 | { 17 | components.Dispose(); 18 | } 19 | base.Dispose(disposing); 20 | } 21 | 22 | #region Windows Form Designer generated code 23 | 24 | /// 25 | /// Required method for Designer support - do not modify 26 | /// the contents of this method with the code editor. 27 | /// 28 | private void InitializeComponent() 29 | { 30 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox)); 31 | this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); 32 | this.logoPictureBox = new System.Windows.Forms.PictureBox(); 33 | this.labelProductName = new System.Windows.Forms.Label(); 34 | this.labelVersion = new System.Windows.Forms.Label(); 35 | this.labelCopyright = new System.Windows.Forms.Label(); 36 | this.labelCompanyName = new System.Windows.Forms.Label(); 37 | this.textBoxDescription = new System.Windows.Forms.TextBox(); 38 | this.okButton = new System.Windows.Forms.Button(); 39 | this.tableLayoutPanel.SuspendLayout(); 40 | ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit(); 41 | this.SuspendLayout(); 42 | // 43 | // tableLayoutPanel 44 | // 45 | this.tableLayoutPanel.ColumnCount = 2; 46 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F)); 47 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67F)); 48 | this.tableLayoutPanel.Controls.Add(this.logoPictureBox, 0, 0); 49 | this.tableLayoutPanel.Controls.Add(this.labelProductName, 1, 0); 50 | this.tableLayoutPanel.Controls.Add(this.labelVersion, 1, 1); 51 | this.tableLayoutPanel.Controls.Add(this.labelCopyright, 1, 2); 52 | this.tableLayoutPanel.Controls.Add(this.labelCompanyName, 1, 3); 53 | this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4); 54 | this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5); 55 | this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; 56 | this.tableLayoutPanel.Location = new System.Drawing.Point(9, 9); 57 | this.tableLayoutPanel.Name = "tableLayoutPanel"; 58 | this.tableLayoutPanel.RowCount = 6; 59 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 60 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 61 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 62 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 63 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); 64 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 65 | this.tableLayoutPanel.Size = new System.Drawing.Size(417, 265); 66 | this.tableLayoutPanel.TabIndex = 0; 67 | // 68 | // logoPictureBox 69 | // 70 | this.logoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill; 71 | this.logoPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("logoPictureBox.Image"))); 72 | this.logoPictureBox.Location = new System.Drawing.Point(3, 3); 73 | this.logoPictureBox.Name = "logoPictureBox"; 74 | this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 6); 75 | this.logoPictureBox.Size = new System.Drawing.Size(131, 259); 76 | this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 77 | this.logoPictureBox.TabIndex = 12; 78 | this.logoPictureBox.TabStop = false; 79 | // 80 | // labelProductName 81 | // 82 | this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill; 83 | this.labelProductName.Location = new System.Drawing.Point(143, 0); 84 | this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); 85 | this.labelProductName.MaximumSize = new System.Drawing.Size(0, 17); 86 | this.labelProductName.Name = "labelProductName"; 87 | this.labelProductName.Size = new System.Drawing.Size(271, 17); 88 | this.labelProductName.TabIndex = 19; 89 | this.labelProductName.Text = "YTP++"; 90 | this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 91 | // 92 | // labelVersion 93 | // 94 | this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill; 95 | this.labelVersion.Location = new System.Drawing.Point(143, 26); 96 | this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); 97 | this.labelVersion.MaximumSize = new System.Drawing.Size(0, 17); 98 | this.labelVersion.Name = "labelVersion"; 99 | this.labelVersion.Size = new System.Drawing.Size(271, 17); 100 | this.labelVersion.TabIndex = 0; 101 | this.labelVersion.Text = "Version 2.4"; 102 | this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 103 | // 104 | // labelCopyright 105 | // 106 | this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill; 107 | this.labelCopyright.Location = new System.Drawing.Point(143, 52); 108 | this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); 109 | this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 17); 110 | this.labelCopyright.Name = "labelCopyright"; 111 | this.labelCopyright.Size = new System.Drawing.Size(271, 17); 112 | this.labelCopyright.TabIndex = 21; 113 | this.labelCopyright.Text = "GNU General Public License Version 3\r\n"; 114 | this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 115 | // 116 | // labelCompanyName 117 | // 118 | this.labelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill; 119 | this.labelCompanyName.Location = new System.Drawing.Point(143, 78); 120 | this.labelCompanyName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); 121 | this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 17); 122 | this.labelCompanyName.Name = "labelCompanyName"; 123 | this.labelCompanyName.Size = new System.Drawing.Size(271, 17); 124 | this.labelCompanyName.TabIndex = 22; 125 | this.labelCompanyName.Text = "Fixed and enhanced by Devan Wolf"; 126 | this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 127 | // 128 | // textBoxDescription 129 | // 130 | this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill; 131 | this.textBoxDescription.Location = new System.Drawing.Point(143, 107); 132 | this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3); 133 | this.textBoxDescription.Multiline = true; 134 | this.textBoxDescription.Name = "textBoxDescription"; 135 | this.textBoxDescription.ReadOnly = true; 136 | this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both; 137 | this.textBoxDescription.Size = new System.Drawing.Size(271, 126); 138 | this.textBoxDescription.TabIndex = 23; 139 | this.textBoxDescription.TabStop = false; 140 | this.textBoxDescription.Text = resources.GetString("textBoxDescription.Text"); 141 | // 142 | // okButton 143 | // 144 | this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 145 | this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; 146 | this.okButton.Location = new System.Drawing.Point(339, 239); 147 | this.okButton.Name = "okButton"; 148 | this.okButton.Size = new System.Drawing.Size(75, 23); 149 | this.okButton.TabIndex = 24; 150 | this.okButton.Text = "&OK"; 151 | // 152 | // AboutBox 153 | // 154 | this.AcceptButton = this.okButton; 155 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 156 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 157 | this.ClientSize = new System.Drawing.Size(435, 283); 158 | this.Controls.Add(this.tableLayoutPanel); 159 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 160 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 161 | this.MaximizeBox = false; 162 | this.MinimizeBox = false; 163 | this.Name = "AboutBox"; 164 | this.Padding = new System.Windows.Forms.Padding(9); 165 | this.ShowInTaskbar = false; 166 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 167 | this.Text = "About YTP++"; 168 | this.tableLayoutPanel.ResumeLayout(false); 169 | this.tableLayoutPanel.PerformLayout(); 170 | ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit(); 171 | this.ResumeLayout(false); 172 | 173 | } 174 | 175 | #endregion 176 | 177 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel; 178 | private System.Windows.Forms.Label labelProductName; 179 | private System.Windows.Forms.Label labelVersion; 180 | private System.Windows.Forms.Label labelCopyright; 181 | private System.Windows.Forms.Label labelCompanyName; 182 | private System.Windows.Forms.TextBox textBoxDescription; 183 | private System.Windows.Forms.Button okButton; 184 | private System.Windows.Forms.PictureBox logoPictureBox; 185 | } 186 | } 187 | -------------------------------------------------------------------------------- /AboutBox.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Forms; 2 | 3 | namespace YTPPlusPlus 4 | { 5 | public partial class AboutBox : Form 6 | { 7 | public AboutBox() 8 | { 9 | InitializeComponent(); 10 | /* 11 | this.Text = String.Format("About {0}", AssemblyTitle); 12 | this.labelProductName.Text = AssemblyProduct; 13 | this.labelVersion.Text = String.Format("Version {0}", AssemblyVersion); 14 | this.labelCopyright.Text = AssemblyCopyright; 15 | this.labelCompanyName.Text = AssemblyCompany; 16 | this.textBoxDescription.Text = AssemblyDescription; 17 | */ 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | C:\Program Files (x86)\VideoLAN\VLC 15 | 16 | 17 | Dark 18 | 19 | 20 | True 21 | 22 | 23 | True 24 | 25 | 26 | True 27 | 28 | 29 | True 30 | 31 | 32 | True 33 | 34 | 35 | True 36 | 37 | 38 | True 39 | 40 | 41 | True 42 | 43 | 44 | True 45 | 46 | 47 | True 48 | 49 | 50 | True 51 | 52 | 53 | True 54 | 55 | 56 | True 57 | 58 | 59 | True 60 | 61 | 62 | True 63 | 64 | 65 | True 66 | 67 | 68 | True 69 | 70 | 71 | True 72 | 73 | 74 | True 75 | 76 | 77 | True 78 | 79 | 80 | True 81 | 82 | 83 | True 84 | 85 | 86 | True 87 | 88 | 89 | True 90 | 91 | 92 | True 93 | 94 | 95 | True 96 | 97 | 98 | False 99 | 100 | 101 | True 102 | 103 | 104 | False 105 | 106 | 107 | False 108 | 109 | 110 | 20 111 | 112 | 113 | 640 114 | 115 | 116 | 480 117 | 118 | 119 | 0.2 120 | 121 | 122 | 0.4 123 | 124 | 125 | resources\intro.mp4 126 | 127 | 128 | resources\outro.mp4 129 | 130 | 131 | ffmpeg.exe 132 | 133 | 134 | ffprobe.exe 135 | 136 | 137 | magick 138 | 139 | 140 | sources\ 141 | 142 | 143 | temp\ 144 | 145 | 146 | sounds\ 147 | 148 | 149 | music\ 150 | 151 | 152 | resources\ 153 | 154 | 155 | sources\ 156 | 157 | 158 | 159 | 160 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . -------------------------------------------------------------------------------- /Main.cs: -------------------------------------------------------------------------------- 1 | using DiscordRPC; 2 | using DiscordRPC.Logging; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.ComponentModel; 6 | using System.Diagnostics; 7 | using System.Drawing; 8 | using System.Globalization; 9 | using System.IO; 10 | using System.Runtime.InteropServices; 11 | using System.Windows.Forms; 12 | using YTPPlus; 13 | 14 | namespace YTPPlusPlus 15 | { 16 | public partial class YTPPlusPlus : Form 17 | { 18 | //vlc check 19 | Vlc.DotNet.Forms.VlcControl Player; 20 | bool renderComplete = true; 21 | //tool variables 22 | string ffmpeg = "ffmpeg.exe"; 23 | string ffprobe = "ffprobe.exe"; 24 | string magick = "magick"; 25 | string temp = "temp\\"; 26 | string sounds = "sounds\\"; 27 | string music = "music\\"; 28 | string resources = "resources\\"; 29 | string[] sources = new string[0]; 30 | //default variables 31 | bool transitionsDef = true; 32 | bool effect1Def = true; 33 | bool effect2Def = true; 34 | bool effect3Def = true; 35 | bool effect4Def = true; 36 | bool effect5Def = true; 37 | bool effect6Def = true; 38 | bool effect7Def = true; 39 | bool effect8Def = true; 40 | bool effect9Def = true; 41 | bool effect10Def = true; 42 | bool effect11Def = true; 43 | bool effect12Def = true; 44 | bool effect13Def = true; 45 | bool effect14Def = true; 46 | bool effect15Def = true; 47 | bool effect16Def = true; 48 | bool effect17Def = true; 49 | bool effect18Def = true; 50 | bool effect19Def = true; 51 | bool effect20Def = true; 52 | bool effect21Def = true; 53 | bool effect22Def = true; 54 | bool effect23Def = true; 55 | bool effect24Def = true; 56 | bool effect25Def = true; 57 | bool effect26Def = true; 58 | bool introBoolDef = false; 59 | bool outroBoolDef = false; 60 | bool pluginTestDef = false; 61 | int clipCountDef = 20; 62 | int widthDef = 640; 63 | int heightDef = 480; 64 | decimal minStreamDef = 0.2M; 65 | decimal maxStreamDef = 0.4M; 66 | string introDef = "resources\\intro.mp4"; 67 | string outroDef = "resources\\outro.mp4"; 68 | string ffmpegDef = "ffmpeg.exe"; 69 | string ffprobeDef = "ffprobe.exe"; 70 | string magickDef = "magick"; 71 | string sourcesDef = "sources\\"; 72 | string tempDef = "temp\\"; 73 | string soundsDef = "sounds\\"; 74 | string musicDef = "music\\"; 75 | string resourcesDef = "resources\\"; 76 | YTPGenerator globalGen; 77 | int pluginCount = 0; 78 | List enabledPlugins = new List(); 79 | Microsoft.WindowsAPICodePack.Taskbar.TaskbarManager taskbarInstance; 80 | System.Media.SoundPlayer renderCompleteSnd; 81 | System.Media.SoundPlayer renderFailedSnd; 82 | public DiscordRpcClient client; 83 | public DiscordRPC.Timestamps timestamps = new DiscordRPC.Timestamps(DateTime.UtcNow); 84 | public void ResetVars() 85 | { 86 | this.InsertTransitions.Checked = transitionsDef; 87 | this.effect_RandomSound.Checked = effect1Def; 88 | this.effect_RandomSoundMute.Checked = effect2Def; 89 | this.effect_Reverse.Checked = effect3Def; 90 | this.effect_SpeedUp.Checked = effect4Def; 91 | this.effect_SlowDown.Checked = effect5Def; 92 | this.effect_Chorus.Checked = effect6Def; 93 | this.effect_Vibrato.Checked = effect7Def; 94 | this.effect_Tremolo.Checked = effect8Def; 95 | this.effect_Earrape.Checked = effect9Def; 96 | this.effect_SpeedUpHighPitch.Checked = effect10Def; 97 | this.effect_SlowDownLowPitch.Checked = effect11Def; 98 | this.effect_HighPitch.Checked = effect12Def; 99 | this.effect_LowPitch.Checked = effect13Def; 100 | this.effect_ForwardReverse.Checked = effect14Def; 101 | this.effect_ReverseForward.Checked = effect15Def; 102 | this.effect_Pixelate.Checked = effect16Def; 103 | this.effect_BadQuality.Checked = effect17Def; 104 | this.effect_Emboss.Checked = effect18Def; 105 | this.effect_SymmetryHorizontal1.Checked = effect19Def; 106 | this.effect_SymmetryHorizontal2.Checked = effect20Def; 107 | this.effect_SymmetryVertical1.Checked = effect21Def; 108 | this.effect_SymmetryVertical2.Checked = effect22Def; 109 | this.effect_GMajor.Checked = effect23Def; 110 | this.effect_Dance.Checked = effect24Def; 111 | this.effect_Squidward.Checked = effect25Def; 112 | this.effect_SpartaRemix.Checked = effect26Def; 113 | this.pluginTest.Checked = pluginTestDef; 114 | this.InsertIntro.Checked = introBoolDef; 115 | this.InsertOutro.Checked = outroBoolDef; 116 | this.Clips.Value = clipCountDef; 117 | this.WidthSet.Value = widthDef; 118 | this.HeightSet.Value = heightDef; 119 | this.MinStreamDur.Value = minStreamDef; 120 | this.MaxStreamDur.Value = maxStreamDef; 121 | this.Intro.Text = introDef; 122 | this.Outro.Text = outroDef; 123 | this.ffmpeg = ffmpegDef; 124 | this.ffprobe = ffprobeDef; 125 | this.magick = magickDef; 126 | this.TransitionDir.Text = sourcesDef; 127 | this.temp = tempDef; 128 | this.sounds = soundsDef; 129 | this.music = musicDef; 130 | this.resources = resourcesDef; 131 | pluginCount = 0; 132 | enabledPlugins.Clear(); 133 | plugins.MenuItems.Clear(); 134 | this.renderCompleteSnd = new System.Media.SoundPlayer(this.resources + "\\rendercomplete.wav"); 135 | this.renderFailedSnd = new System.Media.SoundPlayer(this.resources + "\\renderfailed.wav"); 136 | if (Directory.Exists("plugins")) { 137 | string[] d = Directory.GetFiles("plugins", "*.bat"); 138 | foreach (string s in d) 139 | { 140 | void f(object sender, EventArgs args) 141 | { 142 | MenuItem ss = (MenuItem)sender; 143 | ss.Checked = !ss.Checked; 144 | if (ss.Checked == true) 145 | { 146 | pluginCount++; 147 | enabledPlugins.Add(s); 148 | } 149 | else 150 | { 151 | pluginCount--; 152 | enabledPlugins.Remove(s); 153 | } 154 | } 155 | plugins.MenuItems.Remove(noPlugins); 156 | string newstring = s.Replace("plugins\\", ""); 157 | plugins.MenuItems.Add(new MenuItem(newstring, f)); 158 | } 159 | } 160 | 161 | } 162 | //end default variables 163 | 164 | public void SetVars() 165 | { 166 | this.InsertTransitions.Checked = Properties.Settings.Default.InsertTransitions; 167 | this.effect_RandomSound.Checked = Properties.Settings.Default.effect_RandomSound; 168 | this.effect_RandomSoundMute.Checked = Properties.Settings.Default.effect_RandomSoundMute; 169 | this.effect_Reverse.Checked = Properties.Settings.Default.effect_Reverse; 170 | this.effect_SpeedUp.Checked = Properties.Settings.Default.effect_SpeedUp; 171 | this.effect_SlowDown.Checked = Properties.Settings.Default.effect_SlowDown; 172 | this.effect_Chorus.Checked = Properties.Settings.Default.effect_Chorus; 173 | this.effect_Vibrato.Checked = Properties.Settings.Default.effect_Vibrato; 174 | this.effect_Tremolo.Checked = Properties.Settings.Default.effect_Tremolo; 175 | this.effect_Earrape.Checked = Properties.Settings.Default.effect_Earrape; 176 | this.effect_SpeedUpHighPitch.Checked = Properties.Settings.Default.effect_SpeedUpHighPitch; 177 | this.effect_SlowDownLowPitch.Checked = Properties.Settings.Default.effect_SlowDownLowPitch; 178 | this.effect_HighPitch.Checked = Properties.Settings.Default.effect_HighPitch; 179 | this.effect_LowPitch.Checked = Properties.Settings.Default.effect_LowPitch; 180 | this.effect_ForwardReverse.Checked = Properties.Settings.Default.effect_ForwardReverse; 181 | this.effect_ReverseForward.Checked = Properties.Settings.Default.effect_ReverseForward; 182 | this.effect_Pixelate.Checked = Properties.Settings.Default.effect_Pixelate; 183 | this.effect_BadQuality.Checked = Properties.Settings.Default.effect_BadQuality; 184 | this.effect_Emboss.Checked = Properties.Settings.Default.effect_Emboss; 185 | this.effect_SymmetryHorizontal1.Checked = Properties.Settings.Default.effect_SymmetryHorizontal1; 186 | this.effect_SymmetryHorizontal2.Checked = Properties.Settings.Default.effect_SymmetryHorizontal2; 187 | this.effect_SymmetryVertical1.Checked = Properties.Settings.Default.effect_SymmetryVertical1; 188 | this.effect_SymmetryVertical2.Checked = Properties.Settings.Default.effect_SymmetryVertical2; 189 | this.effect_GMajor.Checked = Properties.Settings.Default.effect_GMajor; 190 | this.effect_Dance.Checked = Properties.Settings.Default.effect_Dance; 191 | this.effect_Squidward.Checked = Properties.Settings.Default.effect_Squidward; 192 | this.pluginTest.Checked = Properties.Settings.Default.PluginTest; 193 | this.InsertIntro.Checked = Properties.Settings.Default.InsertIntro; 194 | this.InsertOutro.Checked = Properties.Settings.Default.InsertOutro; 195 | this.Clips.Value = Properties.Settings.Default.Clips; 196 | this.WidthSet.Value = Properties.Settings.Default.Width; 197 | this.HeightSet.Value = Properties.Settings.Default.Height; 198 | this.MinStreamDur.Value = Properties.Settings.Default.MinStreamDur; 199 | this.MaxStreamDur.Value = Properties.Settings.Default.MaxStreamDur; 200 | this.Intro.Text = Properties.Settings.Default.Intro; 201 | this.Outro.Text = Properties.Settings.Default.Outro; 202 | this.ffmpeg = Properties.Settings.Default.FFmpeg; 203 | this.ffprobe = Properties.Settings.Default.FFprobe; 204 | this.magick = magickDef; 205 | this.TransitionDir.Text = Properties.Settings.Default.TransitionDir; 206 | this.temp = Properties.Settings.Default.Temp; 207 | this.sounds = Properties.Settings.Default.Sounds; 208 | this.music = Properties.Settings.Default.Music; 209 | this.resources = Properties.Settings.Default.Resources; 210 | if (Properties.Settings.Default.Theme == "Dark") 211 | { 212 | theme_light.Checked = false; 213 | theme_dark.Checked = true; 214 | switchTheme(Color.FromName("ControlDarkDark"), Color.FromName("ControlDark"), Color.FromName("Control"), Color.FromName("ControlText")); 215 | } 216 | else if (Properties.Settings.Default.Theme == "Light") 217 | { 218 | theme_light.Checked = true; 219 | theme_dark.Checked = false; 220 | switchTheme(Color.FromName("ControlLightLight"), Color.FromName("ControlLight"), Color.FromName("Control"), Color.FromName("ControlText")); 221 | } 222 | pluginCount = 0; 223 | enabledPlugins.Clear(); 224 | plugins.MenuItems.Clear(); 225 | this.renderCompleteSnd = new System.Media.SoundPlayer(this.resources + "\\rendercomplete.wav"); 226 | this.renderFailedSnd = new System.Media.SoundPlayer(this.resources + "\\renderfailed.wav"); 227 | if (Directory.Exists("plugins")) 228 | { 229 | string[] d = Directory.GetFiles("plugins", "*.bat"); 230 | foreach (string s in d) 231 | { 232 | void f(object sender, EventArgs args) 233 | { 234 | MenuItem ss = (MenuItem)sender; 235 | ss.Checked = !ss.Checked; 236 | if (ss.Checked == true) 237 | { 238 | pluginCount++; 239 | enabledPlugins.Add(s); 240 | } 241 | else 242 | { 243 | pluginCount--; 244 | enabledPlugins.Remove(s); 245 | } 246 | } 247 | plugins.MenuItems.Remove(noPlugins); 248 | string newstring = s.Replace("plugins\\", ""); 249 | plugins.MenuItems.Add(new MenuItem(newstring, f)); 250 | } 251 | } 252 | 253 | } 254 | 255 | 256 | //console import 257 | [DllImport("kernel32.dll", SetLastError = true)] 258 | static extern bool AllocConsole(); 259 | 260 | [DllImport("kernel32.dll")] 261 | static extern IntPtr GetConsoleWindow(); 262 | 263 | [DllImport("user32.dll")] 264 | static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); 265 | 266 | const int SW_HIDE = 0; 267 | const int SW_SHOW = 5; 268 | bool ConsoleShowing = false; 269 | 270 | public static void ShowConsoleWindow() 271 | { 272 | var handle = GetConsoleWindow(); 273 | 274 | if (handle == IntPtr.Zero) 275 | { 276 | AllocConsole(); 277 | } 278 | else 279 | { 280 | ShowWindow(handle, SW_SHOW); 281 | } 282 | } 283 | 284 | public static void HideConsoleWindow() 285 | { 286 | var handle = GetConsoleWindow(); 287 | ShowWindow(handle, SW_HIDE); 288 | } 289 | //end console import 290 | 291 | 292 | public String[] titles = {"Yo", "Mmmmm!", "I'm the invisible man...", "Luigi, look!", "You want it?", "WTF Booooooooooom"}; 293 | public FileInfo fi; 294 | public void TestMagick() 295 | { 296 | try 297 | { 298 | System.Diagnostics.Process process = new System.Diagnostics.Process(); 299 | System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); 300 | startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; 301 | startInfo.FileName = magick; 302 | startInfo.UseShellExecute = false; 303 | startInfo.RedirectStandardOutput = true; 304 | process.StartInfo = startInfo; 305 | 306 | process.Start(); 307 | process.WaitForExit(); 308 | if (process.ExitCode == 1) 309 | { 310 | alert("ImageMagick is not installed. The Squidward effect has been disabled.\nPlease install ImageMagick and add it to your system PATH, or select \"Set magick.exe\" in the Tools menu."); 311 | effect_Squidward.Enabled = false; 312 | effect_Squidward.Checked = false; 313 | } 314 | else 315 | { 316 | effect_Squidward.Enabled = true; 317 | effect_Squidward.Checked = true; 318 | } 319 | } 320 | catch 321 | { 322 | alert("ImageMagick is not installed. The Squidward effect has been disabled.\nPlease install ImageMagick and add it to your system PATH, or select \"Set magick.exe\" in the Tools menu."); 323 | effect_Squidward.Enabled = false; 324 | effect_Squidward.Checked = false; 325 | } 326 | } 327 | public void TestFFMPEG() 328 | { 329 | try 330 | { 331 | System.Diagnostics.Process process = new System.Diagnostics.Process(); 332 | System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); 333 | startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; 334 | startInfo.FileName = ffmpeg; 335 | startInfo.UseShellExecute = false; 336 | startInfo.RedirectStandardOutput = true; 337 | process.StartInfo = startInfo; 338 | 339 | process.Start(); 340 | process.WaitForExit(); 341 | } 342 | catch 343 | { 344 | alert("FFMPEG is not installed. It may have been misplaced, make sure it is in the same directory as YTP++!"); 345 | System.Environment.Exit(1); 346 | } 347 | } 348 | public void TestFFPROBE() 349 | { 350 | try 351 | { 352 | System.Diagnostics.Process process = new System.Diagnostics.Process(); 353 | System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); 354 | startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; 355 | startInfo.FileName = ffprobe; 356 | startInfo.UseShellExecute = false; 357 | startInfo.RedirectStandardOutput = true; 358 | process.StartInfo = startInfo; 359 | 360 | process.Start(); 361 | process.WaitForExit(); 362 | } 363 | catch 364 | { 365 | alert("FFPROBE is not installed. It may have been misplaced, make sure it is in the same directory as YTP++!"); 366 | System.Environment.Exit(1); 367 | } 368 | } 369 | public void vlcC(DirectoryInfo dir) 370 | { 371 | this.Player = new Vlc.DotNet.Forms.VlcControl(); 372 | ((System.ComponentModel.ISupportInitialize)(this.Player)).BeginInit(); 373 | this.Player.Anchor = System.Windows.Forms.AnchorStyles.Top; 374 | this.Player.BackColor = System.Drawing.Color.Black; 375 | this.Player.Enabled = false; 376 | this.Player.Location = new System.Drawing.Point(-1, -1); 377 | this.Player.Name = "Player"; 378 | this.Player.Size = new System.Drawing.Size(320, 240); 379 | this.Player.Spu = -1; 380 | this.Player.TabIndex = 0; 381 | this.Player.VlcMediaplayerOptions = null; 382 | this.Player.VlcLibDirectory = dir; 383 | this.Video.Controls.Add(this.Player); 384 | ((System.ComponentModel.ISupportInitialize)(this.Player)).EndInit(); 385 | //VLCCheck.global.Close(); 386 | Player.Enabled = true; 387 | SetVars(); 388 | HideConsoleWindow(); 389 | this.Player.Enabled = false; 390 | this.m_saveas.Enabled = false; 391 | this.SaveAs.Enabled = false; 392 | TestFFMPEG(); 393 | TestFFPROBE(); 394 | TestMagick(); 395 | } 396 | public YTPPlusPlus() 397 | { 398 | InitializeComponent(); 399 | if (Directory.Exists(Properties.Settings.Default.VLC)) 400 | { 401 | vlcC(new DirectoryInfo(Properties.Settings.Default.VLC)); 402 | } 403 | else 404 | { 405 | DialogResult result = folderBrowserVLC.ShowDialog(); 406 | if (result == DialogResult.OK) 407 | { 408 | Properties.Settings.Default.VLC = folderBrowserVLC.SelectedPath; 409 | vlcC(new DirectoryInfo(folderBrowserVLC.SelectedPath)); 410 | } 411 | else 412 | { 413 | PausePlay.Enabled = false; 414 | Start.Enabled = false; 415 | End.Enabled = false; 416 | SetVars(); 417 | HideConsoleWindow(); 418 | this.SaveAs.Enabled = false; 419 | this.m_saveas.Enabled = false; 420 | TestFFMPEG(); 421 | TestFFPROBE(); 422 | TestMagick(); 423 | } 424 | } 425 | 426 | //DISCORD RPC 427 | /* 428 | Create a discord client 429 | NOTE: If you are using Unity3D, you must use the full constructor and define 430 | the pipe connection. 431 | */ 432 | client = new DiscordRpcClient("655125577669410829"); 433 | 434 | //Set the logger 435 | client.Logger = new ConsoleLogger() { Level = LogLevel.Warning }; 436 | 437 | //Subscribe to events 438 | client.OnReady += (sender, e) => 439 | { 440 | Console.WriteLine("Received Ready from user {0}", e.User.Username); 441 | }; 442 | //Connect to the RPC 443 | client.Initialize(); 444 | 445 | //Set the rich presence 446 | //Call this as many times as you want and anywhere in your code. 447 | client.SetPresence(new RichPresence() 448 | { 449 | Details = titles[new Random().Next(0, titles.Length)], 450 | Assets = new Assets() 451 | { 452 | LargeImageKey = "icon", 453 | LargeImageText = "YTP++, made with ❤ in C#." 454 | }, 455 | State = "Idle", 456 | Timestamps = timestamps 457 | }); 458 | } 459 | private void YTPPlusPlus_FormClosing(object sender, FormClosingEventArgs e) 460 | { 461 | Properties.Settings.Default.Save(); 462 | } 463 | public void PlayVideo(FileInfo fil) 464 | { 465 | fi = fil; 466 | 467 | this.Player.SetMedia(fi); 468 | this.Player.Play(); 469 | } 470 | private void PausePlay_Click(object sender, EventArgs e) 471 | { 472 | if (Microsoft.WindowsAPICodePack.Taskbar.TaskbarManager.IsPlatformSupported) 473 | { 474 | taskbarInstance.SetProgressState(Microsoft.WindowsAPICodePack.Taskbar.TaskbarProgressBarState.NoProgress); 475 | } 476 | if (this.Player.IsPlaying) 477 | { 478 | this.PausePlay.Text = "▶️"; 479 | this.Player.Pause(); 480 | } 481 | else 482 | { 483 | this.PausePlay.Text = "| |"; 484 | this.Player.Play(); 485 | } 486 | client.SetPresence(new RichPresence() 487 | { 488 | Details = titles[new Random().Next(0, titles.Length)], 489 | Assets = new Assets() 490 | { 491 | LargeImageKey = "icon", 492 | LargeImageText = "YTP++, made with ❤ in C#." 493 | }, 494 | State = "Idle", 495 | Timestamps = timestamps 496 | }); 497 | } 498 | 499 | private void Start_Click(object sender, EventArgs e) 500 | { 501 | if (Microsoft.WindowsAPICodePack.Taskbar.TaskbarManager.IsPlatformSupported) 502 | { 503 | taskbarInstance.SetProgressState(Microsoft.WindowsAPICodePack.Taskbar.TaskbarProgressBarState.NoProgress); 504 | } 505 | if (fi != null) 506 | { 507 | 508 | this.Player.SetMedia(fi); 509 | this.Player.Position = 0; 510 | this.Player.Play(); 511 | this.PausePlay.Text = "| |"; 512 | } 513 | client.SetPresence(new RichPresence() 514 | { 515 | Details = titles[new Random().Next(0, titles.Length)], 516 | Assets = new Assets() 517 | { 518 | LargeImageKey = "icon", 519 | LargeImageText = "YTP++, made with ❤ in C#." 520 | }, 521 | State = "Idle", 522 | Timestamps = timestamps 523 | }); 524 | } 525 | 526 | private void End_Click(object sender, EventArgs e) 527 | { 528 | if (Microsoft.WindowsAPICodePack.Taskbar.TaskbarManager.IsPlatformSupported) 529 | { 530 | taskbarInstance.SetProgressState(Microsoft.WindowsAPICodePack.Taskbar.TaskbarProgressBarState.NoProgress); 531 | } 532 | this.Player.Position += 0.1f; 533 | if (this.Player.Position > 1f) 534 | this.Player.Position = 0.999f; 535 | client.SetPresence(new RichPresence() 536 | { 537 | Details = titles[new Random().Next(0, titles.Length)], 538 | Assets = new Assets() 539 | { 540 | LargeImageKey = "icon", 541 | LargeImageText = "YTP++, made with ❤ in C#." 542 | }, 543 | State = "Idle", 544 | Timestamps = timestamps 545 | }); 546 | } 547 | 548 | private void m_console_Click(object sender, EventArgs e) 549 | { 550 | var handle = GetConsoleWindow(); 551 | if (ConsoleShowing) 552 | { 553 | // Hide console 554 | HideConsoleWindow(); 555 | } 556 | else 557 | { 558 | // Show console 559 | ShowConsoleWindow(); 560 | } 561 | ConsoleShowing = !ConsoleShowing; 562 | m_console.Checked = ConsoleShowing; 563 | } 564 | public void alert(string alertText) 565 | { 566 | MessageBox.Show(this, alertText, titles[new Random().Next(0, titles.Length)]); 567 | } 568 | private void m_helpeffects_Click(object sender, EventArgs e) 569 | { 570 | alert("From the YTP+ Documentation: \n\"Currently, these effects are based on a switch statement, and each effect has an equal chance of appearing, which means if you turn one of them off, there will be more unedited clips. Additionally, there is a 1/2 chance of there even being an effect on a clip. You do the math. There's 11 effects. 1/2 chance of each effect occuring. That means, regardless of being turned on or off, each effect has a 1/22 chance of occuring. Pretty nasty, right? I'll add sliders for \"frequency\" in the future...\n\nThis might be beneficial to know also: There's a 1/15 chance of a \"transition\" clip being used in place of your sources, too. So for every 15 clips you tell YTP+ to generate, one of them will be a transition clip from the folder you provide the program. It's a big mess of numbers.\n\nThe reason there aren't frequency sliders now is because someone will probably break them somehow and I don't have the time to debug. Give me a few weeks for an update...\""); 571 | } 572 | 573 | private void m_helpconfigure_Click(object sender, EventArgs e) 574 | { 575 | alert("Configuration can be done within the \"Tools\" menu.\n\nYou can set folders that will be used for things such as temporary files, source clips, sound effects, and music. Music and sound effect directories should contain *.mp3 files only, while videos (source clips) should all be *.mp4 files.\n\nAs for Magick and FFMPEG/FFPROBE configuration, Magick is only needed for the \"Squidward\" effect as all other effects use the FFMPEG/FFPROBE libraries within distributions of the applications. Licenses for FFMPEG and FFPROBE can be found in the \"Help\" menu.\n\nBy default, all settings should be correct unless you are on a 32 bit system, in which case there may be a possibility where you have to set the directory for Magick. If anything goes wrong, reset and check your settings."); 576 | } 577 | 578 | private void m_ytphubdiscord_Click(object sender, EventArgs e) 579 | { 580 | System.Diagnostics.Process.Start("http://discord.gg/bzhzRmg"); 581 | } 582 | 583 | private void m_reset_Click(object sender, EventArgs e) 584 | { 585 | ResetVars(); 586 | } 587 | 588 | private void m_magick_Click(object sender, EventArgs e) 589 | { 590 | // Show the dialog and get result. 591 | DialogResult result = openFileDialogMagick.ShowDialog(); 592 | if (result == DialogResult.OK) 593 | { 594 | magick = openFileDialogMagick.FileName; 595 | TestMagick(); 596 | } 597 | } 598 | 599 | private void m_temp_Click(object sender, EventArgs e) 600 | { 601 | // Show the dialog and get result. 602 | DialogResult result = folderBrowserTemp.ShowDialog(); 603 | if (result == DialogResult.OK) 604 | { 605 | temp = folderBrowserTemp.SelectedPath; 606 | } 607 | } 608 | 609 | private void m_sounds_Click(object sender, EventArgs e) 610 | { 611 | // Show the dialog and get result. 612 | DialogResult result = folderBrowserSounds.ShowDialog(); 613 | if (result == DialogResult.OK) 614 | { 615 | sounds = folderBrowserSounds.SelectedPath; 616 | } 617 | } 618 | 619 | private void m_music_Click(object sender, EventArgs e) 620 | { 621 | // Show the dialog and get result. 622 | DialogResult result = folderBrowserMusic.ShowDialog(); 623 | if (result == DialogResult.OK) 624 | { 625 | music = folderBrowserMusic.SelectedPath; 626 | } 627 | } 628 | 629 | private void m_resources_Click(object sender, EventArgs e) 630 | { 631 | // Show the dialog and get result. 632 | DialogResult result = folderBrowserResources.ShowDialog(); 633 | if (result == DialogResult.OK) 634 | { 635 | resources = folderBrowserResources.SelectedPath; 636 | } 637 | } 638 | public void addSource() 639 | { 640 | // Show the dialog and get result. 641 | DialogResult result = openFileDialogSource.ShowDialog(); 642 | if (result == DialogResult.OK) 643 | { 644 | foreach (String file in openFileDialogSource.FileNames) 645 | { 646 | Array.Resize(ref sources, sources.Length + 1); 647 | sources[sources.GetUpperBound(0)] = file; 648 | Material.Text += file + "\n"; 649 | } 650 | } 651 | } 652 | public void clearSources() 653 | { 654 | sources = new string[0]; 655 | Material.Text = ""; 656 | } 657 | 658 | private void AddMaterial_Click(object sender, EventArgs e) 659 | { 660 | addSource(); 661 | } 662 | 663 | private void m_addmaterial_Click(object sender, EventArgs e) 664 | { 665 | addSource(); 666 | } 667 | 668 | private void ClearMaterial_Click(object sender, EventArgs e) 669 | { 670 | clearSources(); 671 | } 672 | 673 | private void m_clearmaterials_Click(object sender, EventArgs e) 674 | { 675 | clearSources(); 676 | } 677 | private static long nanoTime() 678 | { 679 | long nano = 10000L * Stopwatch.GetTimestamp(); 680 | nano /= TimeSpan.TicksPerMillisecond; 681 | nano *= 100L; 682 | return nano; 683 | } 684 | public void progress(object sender, ProgressChangedEventArgs e) 685 | { 686 | progressBar1.Value = e.ProgressPercentage; 687 | if (Microsoft.WindowsAPICodePack.Taskbar.TaskbarManager.IsPlatformSupported) 688 | { 689 | taskbarInstance.SetProgressValue(e.ProgressPercentage,100); 690 | } 691 | client.SetPresence(new RichPresence() 692 | { 693 | Details = titles[new Random().Next(0, titles.Length)], 694 | Assets = new Assets() 695 | { 696 | LargeImageKey = "icon", 697 | LargeImageText = "YTP++, made with ❤ in C#." 698 | }, 699 | State = "Rendering... ("+ e.ProgressPercentage+"%)", 700 | Timestamps = timestamps 701 | }); 702 | } 703 | public void complete(object sender, RunWorkerCompletedEventArgs e) 704 | { 705 | progressBar1.Value = 100; 706 | if (Microsoft.WindowsAPICodePack.Taskbar.TaskbarManager.IsPlatformSupported) 707 | { 708 | taskbarInstance.SetProgressValue(100, 100); 709 | } 710 | if (this.Player != null) 711 | this.Player.Enabled = true; 712 | renderComplete = true; 713 | this.SaveAs.Enabled = true; 714 | this.m_saveas.Enabled = true; 715 | if (this.Player != null) 716 | this.Player.Stop(); 717 | fi = new FileInfo(temp + "tempoutput.mp4"); 718 | if (this.Player != null) 719 | this.Player.SetMedia(fi); 720 | this.PausePlay.Text = "▶️"; 721 | Render.Enabled = true; 722 | m_render.Enabled = true; 723 | if (globalGen.failed) 724 | { 725 | if (Microsoft.WindowsAPICodePack.Taskbar.TaskbarManager.IsPlatformSupported) 726 | { 727 | taskbarInstance.SetProgressState(Microsoft.WindowsAPICodePack.Taskbar.TaskbarProgressBarState.Error); 728 | } 729 | client.SetPresence(new RichPresence() 730 | { 731 | Details = titles[new Random().Next(0, titles.Length)], 732 | Assets = new Assets() 733 | { 734 | LargeImageKey = "icon", 735 | LargeImageText = "YTP++, made with ❤ in C#." 736 | }, 737 | State = "Render failed", 738 | Timestamps = timestamps 739 | }); 740 | if (File.Exists(this.resources + "\\renderfailed.wav")) 741 | { 742 | renderFailedSnd.Play(); 743 | } 744 | alert("An exception has occured during rendering. Rendering may have not produced a result.\n\nThe last exception to occur was:\n" + globalGen.exc.Message); 745 | } else 746 | { 747 | if (File.Exists(this.resources + "\\rendercomplete.wav")) 748 | { 749 | renderCompleteSnd.Play(); 750 | } 751 | client.SetPresence(new RichPresence() 752 | { 753 | Details = titles[new Random().Next(0, titles.Length)], 754 | Assets = new Assets() 755 | { 756 | LargeImageKey = "icon", 757 | LargeImageText = "YTP++, made with ❤ in C#." 758 | }, 759 | State = "Render complete", 760 | Timestamps = timestamps 761 | }); 762 | } 763 | } 764 | public void RenderVideo() 765 | { 766 | if (sources.Length == 0 && InsertTransitions.Checked == false) 767 | { 768 | alert("You need some sources..."); 769 | } 770 | else 771 | { 772 | try 773 | { 774 | client.SetPresence(new RichPresence() 775 | { 776 | Details = titles[new Random().Next(0, titles.Length)], 777 | Assets = new Assets() 778 | { 779 | LargeImageKey = "icon", 780 | LargeImageText = "YTP++, made with ❤ in C#." 781 | }, 782 | State = "Rendering...", 783 | Timestamps = timestamps 784 | }); 785 | if (Microsoft.WindowsAPICodePack.Taskbar.TaskbarManager.IsPlatformSupported) 786 | { 787 | taskbarInstance = Microsoft.WindowsAPICodePack.Taskbar.TaskbarManager.Instance; 788 | } 789 | if (this.Player != null) 790 | this.Player.Stop(); 791 | renderComplete = false; 792 | if(this.Player != null) 793 | this.Player.Enabled = false; 794 | this.m_saveas.Enabled = false; 795 | this.SaveAs.Enabled = false; 796 | Render.Enabled = false; 797 | m_render.Enabled = false; 798 | YTPGenerator generator = new YTPGenerator(temp + "tempoutput.mp4"); 799 | generator.toolBox.FFMPEG = "\"" + ffmpeg + "\""; 800 | generator.toolBox.FFPROBE = "\"" + ffprobe + "\""; 801 | generator.toolBox.MAGICK = "\"" + magick + "\""; 802 | string jobDir = temp + "job_" + DateTimeOffset.Now.ToUnixTimeMilliseconds() + "\\"; 803 | generator.toolBox.TEMP = jobDir; 804 | Directory.CreateDirectory(jobDir); 805 | Directory.CreateDirectory(generator.toolBox.TEMP); 806 | generator.toolBox.SOUNDS = sounds; 807 | generator.toolBox.MUSIC = music; 808 | generator.toolBox.RESOURCES = resources; 809 | generator.toolBox.SOURCES = this.TransitionDir.Text; 810 | generator.toolBox.intro = this.Intro.Text; 811 | generator.toolBox.outro = this.Outro.Text; 812 | generator.effect1 = this.effect_RandomSound.Checked; 813 | generator.effect2 = this.effect_RandomSoundMute.Checked; 814 | generator.effect3 = this.effect_Reverse.Checked; 815 | generator.effect4 = this.effect_SpeedUp.Checked; 816 | generator.effect5 = this.effect_SlowDown.Checked; 817 | generator.effect6 = this.effect_Chorus.Checked; 818 | generator.effect7 = this.effect_Vibrato.Checked; 819 | generator.effect8 = this.effect_Tremolo.Checked; 820 | generator.effect9 = this.effect_Earrape.Checked; 821 | generator.effect10 = this.effect_SpeedUpHighPitch.Checked; 822 | generator.effect11 = this.effect_SlowDownLowPitch.Checked; 823 | generator.effect12 = this.effect_HighPitch.Checked; 824 | generator.effect13 = this.effect_LowPitch.Checked; 825 | generator.effect14 = this.effect_ForwardReverse.Checked; 826 | generator.effect15 = this.effect_ReverseForward.Checked; 827 | generator.effect16 = this.effect_Pixelate.Checked; 828 | generator.effect17 = this.effect_BadQuality.Checked; 829 | generator.effect18 = this.effect_Emboss.Checked; 830 | generator.effect19 = this.effect_SymmetryHorizontal1.Checked; 831 | generator.effect20 = this.effect_SymmetryHorizontal2.Checked; 832 | generator.effect21 = this.effect_SymmetryVertical1.Checked; 833 | generator.effect22 = this.effect_SymmetryVertical2.Checked; 834 | generator.effect23 = this.effect_GMajor.Checked; 835 | generator.effect24 = this.effect_Dance.Checked; 836 | generator.effect25 = this.effect_Squidward.Checked; 837 | generator.effect26 = this.effect_SpartaRemix.Checked; 838 | generator.pluginCount = pluginCount; 839 | generator.plugins = enabledPlugins; 840 | generator.insertTransitionClips = InsertTransitions.Checked; 841 | generator.width = Convert.ToInt32(this.WidthSet.Value, new CultureInfo("en-US")); 842 | generator.height = Convert.ToInt32(this.HeightSet.Value, new CultureInfo("en-US")); 843 | generator.intro = this.InsertIntro.Checked; 844 | generator.outro = this.InsertOutro.Checked; 845 | generator.pluginTest = pluginTest.Checked; 846 | foreach (string sourcem in sources) 847 | { 848 | generator.addSource("\"" + sourcem + "\""); 849 | } 850 | int maxclips = Convert.ToInt32(Clips.Value, new CultureInfo("en-US")); 851 | generator.setMaxClips(Convert.ToInt32(Clips.Value, new CultureInfo("en-US"))); 852 | generator.setMaxDuration(Convert.ToDouble(MaxStreamDur.Value, new CultureInfo("en-US"))); 853 | generator.setMinDuration(Convert.ToDouble(MinStreamDur.Value, new CultureInfo("en-US"))); 854 | 855 | double timeStarted = nanoTime(); 856 | double elapsedTime = nanoTime() - timeStarted; 857 | 858 | if (Microsoft.WindowsAPICodePack.Taskbar.TaskbarManager.IsPlatformSupported) 859 | { 860 | taskbarInstance.SetProgressState(Microsoft.WindowsAPICodePack.Taskbar.TaskbarProgressBarState.Normal); 861 | } 862 | globalGen = generator.go(new ProgressChangedEventHandler(progress), new RunWorkerCompletedEventHandler(complete)); 863 | } 864 | catch (Exception ex) 865 | { 866 | Render.Enabled = true; 867 | Console.WriteLine(ex.StackTrace); 868 | } 869 | } 870 | } 871 | private void Render_Click(object sender, EventArgs e) 872 | { 873 | RenderVideo(); 874 | } 875 | 876 | private void m_render_Click(object sender, EventArgs e) 877 | { 878 | RenderVideo(); 879 | } 880 | 881 | private void m_ffmpeg_Click(object sender, EventArgs e) 882 | { 883 | // Show the dialog and get result. 884 | DialogResult result = openFileDialogFFmpeg.ShowDialog(); 885 | if (result == DialogResult.OK) 886 | { 887 | ffmpeg = openFileDialogFFmpeg.FileName; 888 | TestFFMPEG(); 889 | } 890 | } 891 | 892 | private void m_ffprobe_Click(object sender, EventArgs e) 893 | { 894 | // Show the dialog and get result. 895 | DialogResult result = openFileDialogFFProbe.ShowDialog(); 896 | if (result == DialogResult.OK) 897 | { 898 | ffmpeg = openFileDialogFFProbe.FileName; 899 | TestFFPROBE(); 900 | } 901 | } 902 | 903 | private void m_about_Click(object sender, EventArgs e) 904 | { 905 | AboutBox dialog = new AboutBox(); 906 | dialog.ShowDialog(); 907 | } 908 | 909 | private void SaveAs_Click(object sender, EventArgs e) 910 | { 911 | if (Microsoft.WindowsAPICodePack.Taskbar.TaskbarManager.IsPlatformSupported) 912 | { 913 | taskbarInstance.SetProgressState(Microsoft.WindowsAPICodePack.Taskbar.TaskbarProgressBarState.NoProgress); 914 | } 915 | if (renderComplete) 916 | { 917 | if (saveFileDialog.ShowDialog() == DialogResult.OK) 918 | { 919 | if (File.Exists(temp + "tempoutput.mp4")) 920 | { 921 | FileInfo file = new FileInfo(temp + "tempoutput.mp4"); 922 | file.CopyTo(saveFileDialog.FileName); 923 | } 924 | } 925 | } 926 | client.SetPresence(new RichPresence() 927 | { 928 | Details = titles[new Random().Next(0, titles.Length)], 929 | Assets = new Assets() 930 | { 931 | LargeImageKey = "icon", 932 | LargeImageText = "YTP++, made with ❤ in C#." 933 | }, 934 | State = "Idle", 935 | Timestamps = timestamps 936 | }); 937 | } 938 | 939 | private void m_printconfig_Click(object sender, EventArgs e) 940 | { 941 | alert("My FFMPEG is: " + ffmpeg 942 | + "\n\n" + "My FFPROBE is: " + ffprobe 943 | + "\n\n" + "My MAGICK is: " + magick 944 | + "\n\n" + "My TEMP is: " + temp 945 | + "\n\n" + "My SOUNDS is: " + sounds 946 | + "\n\n" + "My SOURCES is: " + TransitionDir.Text 947 | + "\n\n" + "My MUSIC is: " + music 948 | + "\n\n" + "My RESOURCES is: " + resources 949 | + "\n\n" + "My VLC is: " + Properties.Settings.Default.VLC); 950 | } 951 | 952 | private void m_saveas_Click(object sender, EventArgs e) 953 | { 954 | if (renderComplete) 955 | { 956 | if (saveFileDialog.ShowDialog() == DialogResult.OK) 957 | { 958 | if (File.Exists(temp + "tempoutput.mp4")) 959 | { 960 | FileInfo file = new FileInfo(temp + "tempoutput.mp4"); 961 | file.CopyTo(saveFileDialog.FileName); 962 | } 963 | } 964 | } 965 | } 966 | 967 | private void effect_Reverse_Click(object sender, EventArgs e) 968 | { 969 | effect_Reverse.Checked = !effect_Reverse.Checked; 970 | Properties.Settings.Default.effect_Reverse = effect_Reverse.Checked; 971 | } 972 | 973 | private void effect_ForwardReverse_Click(object sender, EventArgs e) 974 | { 975 | effect_ForwardReverse.Checked = !effect_ForwardReverse.Checked; 976 | Properties.Settings.Default.effect_ForwardReverse = effect_ForwardReverse.Checked; 977 | } 978 | 979 | private void effect_ReverseForward_Click(object sender, EventArgs e) 980 | { 981 | effect_ReverseForward.Checked = !effect_ReverseForward.Checked; 982 | Properties.Settings.Default.effect_ReverseForward = effect_ReverseForward.Checked; 983 | } 984 | 985 | private void effect_SpeedUpHighPitch_Click(object sender, EventArgs e) 986 | { 987 | effect_SpeedUpHighPitch.Checked = !effect_SpeedUpHighPitch.Checked; 988 | Properties.Settings.Default.effect_SpeedUpHighPitch = effect_SpeedUpHighPitch.Checked; 989 | } 990 | 991 | private void effect_SpeedUp_Click(object sender, EventArgs e) 992 | { 993 | effect_SpeedUp.Checked = !effect_SpeedUp.Checked; 994 | Properties.Settings.Default.effect_SpeedUp = effect_SpeedUp.Checked; 995 | } 996 | 997 | private void effect_HighPitch_Click(object sender, EventArgs e) 998 | { 999 | effect_HighPitch.Checked = !effect_HighPitch.Checked; 1000 | Properties.Settings.Default.effect_HighPitch = effect_HighPitch.Checked; 1001 | } 1002 | 1003 | private void effect_SlowDownLowPitch_Click(object sender, EventArgs e) 1004 | { 1005 | effect_SlowDownLowPitch.Checked = !effect_SlowDownLowPitch.Checked; 1006 | Properties.Settings.Default.effect_SlowDownLowPitch = effect_SlowDownLowPitch.Checked; 1007 | } 1008 | 1009 | private void effect_SlowDown_Click(object sender, EventArgs e) 1010 | { 1011 | effect_SlowDown.Checked = !effect_SlowDown.Checked; 1012 | Properties.Settings.Default.effect_SlowDown = effect_SlowDown.Checked; 1013 | } 1014 | 1015 | private void effect_LowPitch_Click(object sender, EventArgs e) 1016 | { 1017 | effect_LowPitch.Checked = !effect_LowPitch.Checked; 1018 | Properties.Settings.Default.effect_LowPitch = effect_LowPitch.Checked; 1019 | } 1020 | 1021 | private void effect_Pixelate_Click(object sender, EventArgs e) 1022 | { 1023 | effect_Pixelate.Checked = !effect_Pixelate.Checked; 1024 | Properties.Settings.Default.effect_Pixelate = effect_Pixelate.Checked; 1025 | } 1026 | 1027 | private void effect_BadQuality_Click(object sender, EventArgs e) 1028 | { 1029 | effect_BadQuality.Checked = !effect_BadQuality.Checked; 1030 | Properties.Settings.Default.effect_BadQuality = effect_BadQuality.Checked; 1031 | } 1032 | 1033 | private void effect_Emboss_Click(object sender, EventArgs e) 1034 | { 1035 | effect_Emboss.Checked = !effect_Emboss.Checked; 1036 | Properties.Settings.Default.effect_Emboss = effect_Emboss.Checked; 1037 | } 1038 | 1039 | private void effect_SymmetryHorizontal1_Click(object sender, EventArgs e) 1040 | { 1041 | effect_SymmetryHorizontal1.Checked = !effect_SymmetryHorizontal1.Checked; 1042 | Properties.Settings.Default.effect_SymmetryHorizontal1 = effect_SymmetryHorizontal1.Checked; 1043 | } 1044 | 1045 | private void effect_SymmetryHorizontal2_Click(object sender, EventArgs e) 1046 | { 1047 | effect_SymmetryHorizontal2.Checked = !effect_SymmetryHorizontal2.Checked; 1048 | Properties.Settings.Default.effect_SymmetryHorizontal2 = effect_SymmetryHorizontal2.Checked; 1049 | } 1050 | 1051 | private void effect_SymmetryVertical1_Click(object sender, EventArgs e) 1052 | { 1053 | effect_SymmetryVertical1.Checked = !effect_SymmetryVertical1.Checked; 1054 | Properties.Settings.Default.effect_SymmetryVertical1 = effect_SymmetryVertical1.Checked; 1055 | } 1056 | 1057 | private void effect_SymmetryVertical2_Click(object sender, EventArgs e) 1058 | { 1059 | effect_SymmetryVertical2.Checked = !effect_SymmetryVertical2.Checked; 1060 | Properties.Settings.Default.effect_SymmetryVertical2 = effect_SymmetryVertical2.Checked; 1061 | } 1062 | 1063 | private void effect_GMajor_Click(object sender, EventArgs e) 1064 | { 1065 | effect_GMajor.Checked = !effect_GMajor.Checked; 1066 | Properties.Settings.Default.effect_GMajor = effect_GMajor.Checked; 1067 | } 1068 | 1069 | private void effect_Dance_Click(object sender, EventArgs e) 1070 | { 1071 | effect_Dance.Checked = !effect_Dance.Checked; 1072 | Properties.Settings.Default.effect_Dance = effect_Dance.Checked; 1073 | } 1074 | 1075 | private void effect_Squidward_Click(object sender, EventArgs e) 1076 | { 1077 | effect_Squidward.Checked = !effect_Squidward.Checked; 1078 | Properties.Settings.Default.effect_Squidward = effect_Squidward.Checked; 1079 | } 1080 | 1081 | private void effect_SpartaRemix_Click(object sender, EventArgs e) 1082 | { 1083 | effect_SpartaRemix.Checked = !effect_SpartaRemix.Checked; 1084 | Properties.Settings.Default.effect_SpartaRemix = effect_SpartaRemix.Checked; 1085 | } 1086 | 1087 | private void effect_RandomSound_Click(object sender, EventArgs e) 1088 | { 1089 | effect_RandomSound.Checked = !effect_RandomSound.Checked; 1090 | Properties.Settings.Default.effect_RandomSound = effect_RandomSound.Checked; 1091 | } 1092 | private void effect_RandomSoundMute_Click(object sender, EventArgs e) 1093 | { 1094 | effect_RandomSoundMute.Checked = !effect_RandomSoundMute.Checked; 1095 | Properties.Settings.Default.effect_RandomSoundMute = effect_RandomSoundMute.Checked; 1096 | } 1097 | 1098 | private void effect_Chorus_Click(object sender, EventArgs e) 1099 | { 1100 | effect_Chorus.Checked = !effect_Chorus.Checked; 1101 | Properties.Settings.Default.effect_Chorus = effect_Chorus.Checked; 1102 | } 1103 | 1104 | private void effect_Vibrato_Click(object sender, EventArgs e) 1105 | { 1106 | effect_Vibrato.Checked = !effect_Vibrato.Checked; 1107 | Properties.Settings.Default.effect_Vibrato = effect_Vibrato.Checked; 1108 | } 1109 | 1110 | private void effect_Tremolo_Click(object sender, EventArgs e) 1111 | { 1112 | effect_Tremolo.Checked = !effect_Tremolo.Checked; 1113 | Properties.Settings.Default.effect_Tremolo = effect_Tremolo.Checked; 1114 | } 1115 | 1116 | private void effect_Earrape_Click(object sender, EventArgs e) 1117 | { 1118 | effect_Earrape.Checked = !effect_Earrape.Checked; 1119 | Properties.Settings.Default.effect_Earrape = effect_Earrape.Checked; 1120 | } 1121 | 1122 | private void pluginTest_Click(object sender, EventArgs e) 1123 | { 1124 | pluginTest.Checked = !pluginTest.Checked; 1125 | Properties.Settings.Default.PluginTest = pluginTest.Checked; 1126 | if (pluginTest.Checked) 1127 | { 1128 | alert("Enabling plugin testing will cause the effect switch to only select plugins and no other effects."); 1129 | } 1130 | } 1131 | 1132 | private void theme_dark_Click(object sender, EventArgs e) 1133 | { 1134 | theme_light.Checked = false; 1135 | theme_dark.Checked = true; 1136 | Properties.Settings.Default.Theme = "Dark"; 1137 | switchTheme(Color.FromName("ControlDarkDark"), Color.FromName("ControlDark"), Color.FromName("Control"),Color.FromName("ControlText")); 1138 | } 1139 | 1140 | private void theme_light_Click(object sender, EventArgs e) 1141 | { 1142 | theme_light.Checked = true; 1143 | theme_dark.Checked = false; 1144 | Properties.Settings.Default.Theme = "Light"; 1145 | switchTheme(Color.FromName("ControlLightLight"), Color.FromName("ControlLight"), Color.FromName("Control"), Color.FromName("ControlText")); 1146 | } 1147 | 1148 | public void switchTheme(Color backColor, Color foreColor, Color subColor, Color textColor) 1149 | { 1150 | this.BackColor = backColor; 1151 | 1152 | Video.BackColor = foreColor; 1153 | Materials.BackColor = foreColor; 1154 | Settings.BackColor = foreColor; 1155 | RenderSettings.BackColor = foreColor; 1156 | 1157 | Material.BackColor = subColor; 1158 | Render.BackColor = subColor; 1159 | Start.BackColor = subColor; 1160 | PausePlay.BackColor = subColor; 1161 | End.BackColor = subColor; 1162 | SaveAs.BackColor = subColor; 1163 | AddMaterial.BackColor = subColor; 1164 | ClearMaterial.BackColor = subColor; 1165 | progressBar1.BackColor = subColor; 1166 | 1167 | Material.ForeColor = textColor; 1168 | Render.ForeColor = textColor; 1169 | Start.ForeColor = textColor; 1170 | PausePlay.ForeColor = textColor; 1171 | End.ForeColor = textColor; 1172 | SaveAs.ForeColor = textColor; 1173 | AddMaterial.ForeColor = textColor; 1174 | ClearMaterial.ForeColor = textColor; 1175 | progressBar1.ForeColor = textColor; 1176 | MaterialLabel.ForeColor = textColor; 1177 | RenderSettingsLabel.ForeColor = textColor; 1178 | } 1179 | 1180 | private void YTPPlusPlus_Load(object sender, EventArgs e) 1181 | { 1182 | this.FormClosing += YTPPlusPlus_FormClosing; 1183 | } 1184 | } 1185 | } 1186 | -------------------------------------------------------------------------------- /Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace YTPPlusPlus 5 | { 6 | static class Program 7 | { 8 | /// 9 | /// The main entry point for the application. 10 | /// 11 | [STAThread] 12 | static void Main() 13 | { 14 | Application.EnableVisualStyles(); 15 | Application.SetCompatibleTextRenderingDefault(false); 16 | Application.Run(new YTPPlusPlus()); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("YTP++")] 8 | [assembly: AssemblyDescription("YouTube Poop Generator")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("LimeQuartz/TeamPopplio/Devan Wolf")] 11 | [assembly: AssemblyProduct("YTP++")] 12 | [assembly: AssemblyCopyright("Copyleft (ɔ) 2019-2020")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("9745a375-7e9a-498f-aa58-c87d117c1b5f")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("2.4.0.0")] 36 | [assembly: NeutralResourcesLanguage("en-US")] 37 | -------------------------------------------------------------------------------- /Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace YTPPlusPlus.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("YTPPlusPlus.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace YTPPlusPlus.Properties { 2 | 3 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 4 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.0.0")] 5 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 6 | 7 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 8 | 9 | public static Settings Default { 10 | get { 11 | return defaultInstance; 12 | } 13 | } 14 | 15 | [global::System.Configuration.UserScopedSettingAttribute()] 16 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 17 | [global::System.Configuration.DefaultSettingValueAttribute("C:\\Program Files (x86)\\VideoLAN/VLC")] 18 | public string VLC { 19 | get { 20 | return ((string)(this["VLC"])); 21 | } 22 | set { 23 | this["VLC"] = value; 24 | } 25 | } 26 | 27 | [global::System.Configuration.UserScopedSettingAttribute()] 28 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 29 | [global::System.Configuration.DefaultSettingValueAttribute("Dark")] 30 | public string Theme { 31 | get { 32 | return ((string)(this["Theme"])); 33 | } 34 | set { 35 | this["Theme"] = value; 36 | } 37 | } 38 | 39 | [global::System.Configuration.UserScopedSettingAttribute()] 40 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 41 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 42 | public bool effect_RandomSound { 43 | get { 44 | return ((bool)(this["effect_RandomSound"])); 45 | } 46 | set { 47 | this["effect_RandomSound"] = value; 48 | } 49 | } 50 | 51 | [global::System.Configuration.UserScopedSettingAttribute()] 52 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 53 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 54 | public bool effect_RandomSoundMute { 55 | get { 56 | return ((bool)(this["effect_RandomSoundMute"])); 57 | } 58 | set { 59 | this["effect_RandomSoundMute"] = value; 60 | } 61 | } 62 | 63 | [global::System.Configuration.UserScopedSettingAttribute()] 64 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 65 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 66 | public bool effect_Reverse { 67 | get { 68 | return ((bool)(this["effect_Reverse"])); 69 | } 70 | set { 71 | this["effect_Reverse"] = value; 72 | } 73 | } 74 | 75 | [global::System.Configuration.UserScopedSettingAttribute()] 76 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 77 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 78 | public bool effect_SpeedUp { 79 | get { 80 | return ((bool)(this["effect_SpeedUp"])); 81 | } 82 | set { 83 | this["effect_SpeedUp"] = value; 84 | } 85 | } 86 | 87 | [global::System.Configuration.UserScopedSettingAttribute()] 88 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 89 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 90 | public bool effect_SlowDown { 91 | get { 92 | return ((bool)(this["effect_SlowDown"])); 93 | } 94 | set { 95 | this["effect_SlowDown"] = value; 96 | } 97 | } 98 | 99 | [global::System.Configuration.UserScopedSettingAttribute()] 100 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 101 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 102 | public bool effect_Chorus { 103 | get { 104 | return ((bool)(this["effect_Chorus"])); 105 | } 106 | set { 107 | this["effect_Chorus"] = value; 108 | } 109 | } 110 | 111 | [global::System.Configuration.UserScopedSettingAttribute()] 112 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 113 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 114 | public bool effect_Vibrato { 115 | get { 116 | return ((bool)(this["effect_Vibrato"])); 117 | } 118 | set { 119 | this["effect_Vibrato"] = value; 120 | } 121 | } 122 | 123 | [global::System.Configuration.UserScopedSettingAttribute()] 124 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 125 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 126 | public bool effect_Tremolo { 127 | get { 128 | return ((bool)(this["effect_Tremolo"])); 129 | } 130 | set { 131 | this["effect_Tremolo"] = value; 132 | } 133 | } 134 | 135 | [global::System.Configuration.UserScopedSettingAttribute()] 136 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 137 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 138 | public bool effect_Earrape { 139 | get { 140 | return ((bool)(this["effect_Earrape"])); 141 | } 142 | set { 143 | this["effect_Earrape"] = value; 144 | } 145 | } 146 | 147 | [global::System.Configuration.UserScopedSettingAttribute()] 148 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 149 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 150 | public bool effect_SpeedUpHighPitch { 151 | get { 152 | return ((bool)(this["effect_SpeedUpHighPitch"])); 153 | } 154 | set { 155 | this["effect_SpeedUpHighPitch"] = value; 156 | } 157 | } 158 | 159 | [global::System.Configuration.UserScopedSettingAttribute()] 160 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 161 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 162 | public bool effect_SlowDownLowPitch { 163 | get { 164 | return ((bool)(this["effect_SlowDownLowPitch"])); 165 | } 166 | set { 167 | this["effect_SlowDownLowPitch"] = value; 168 | } 169 | } 170 | 171 | [global::System.Configuration.UserScopedSettingAttribute()] 172 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 173 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 174 | public bool effect_HighPitch { 175 | get { 176 | return ((bool)(this["effect_HighPitch"])); 177 | } 178 | set { 179 | this["effect_HighPitch"] = value; 180 | } 181 | } 182 | 183 | [global::System.Configuration.UserScopedSettingAttribute()] 184 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 185 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 186 | public bool effect_LowPitch { 187 | get { 188 | return ((bool)(this["effect_LowPitch"])); 189 | } 190 | set { 191 | this["effect_LowPitch"] = value; 192 | } 193 | } 194 | 195 | [global::System.Configuration.UserScopedSettingAttribute()] 196 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 197 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 198 | public bool effect_ForwardReverse { 199 | get { 200 | return ((bool)(this["effect_ForwardReverse"])); 201 | } 202 | set { 203 | this["effect_ForwardReverse"] = value; 204 | } 205 | } 206 | 207 | [global::System.Configuration.UserScopedSettingAttribute()] 208 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 209 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 210 | public bool effect_ReverseForward { 211 | get { 212 | return ((bool)(this["effect_ReverseForward"])); 213 | } 214 | set { 215 | this["effect_ReverseForward"] = value; 216 | } 217 | } 218 | 219 | [global::System.Configuration.UserScopedSettingAttribute()] 220 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 221 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 222 | public bool effect_Pixelate { 223 | get { 224 | return ((bool)(this["effect_Pixelate"])); 225 | } 226 | set { 227 | this["effect_Pixelate"] = value; 228 | } 229 | } 230 | 231 | [global::System.Configuration.UserScopedSettingAttribute()] 232 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 233 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 234 | public bool effect_BadQuality { 235 | get { 236 | return ((bool)(this["effect_BadQuality"])); 237 | } 238 | set { 239 | this["effect_BadQuality"] = value; 240 | } 241 | } 242 | 243 | [global::System.Configuration.UserScopedSettingAttribute()] 244 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 245 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 246 | public bool effect_Emboss { 247 | get { 248 | return ((bool)(this["effect_Emboss"])); 249 | } 250 | set { 251 | this["effect_Emboss"] = value; 252 | } 253 | } 254 | 255 | [global::System.Configuration.UserScopedSettingAttribute()] 256 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 257 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 258 | public bool effect_SymmetryHorizontal1 { 259 | get { 260 | return ((bool)(this["effect_SymmetryHorizontal1"])); 261 | } 262 | set { 263 | this["effect_SymmetryHorizontal1"] = value; 264 | } 265 | } 266 | 267 | [global::System.Configuration.UserScopedSettingAttribute()] 268 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 269 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 270 | public bool effect_SymmetryHorizontal2 { 271 | get { 272 | return ((bool)(this["effect_SymmetryHorizontal2"])); 273 | } 274 | set { 275 | this["effect_SymmetryHorizontal2"] = value; 276 | } 277 | } 278 | 279 | [global::System.Configuration.UserScopedSettingAttribute()] 280 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 281 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 282 | public bool effect_SymmetryVertical1 { 283 | get { 284 | return ((bool)(this["effect_SymmetryVertical1"])); 285 | } 286 | set { 287 | this["effect_SymmetryVertical1"] = value; 288 | } 289 | } 290 | 291 | [global::System.Configuration.UserScopedSettingAttribute()] 292 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 293 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 294 | public bool effect_SymmetryVertical2 { 295 | get { 296 | return ((bool)(this["effect_SymmetryVertical2"])); 297 | } 298 | set { 299 | this["effect_SymmetryVertical2"] = value; 300 | } 301 | } 302 | 303 | [global::System.Configuration.UserScopedSettingAttribute()] 304 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 305 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 306 | public bool effect_GMajor { 307 | get { 308 | return ((bool)(this["effect_GMajor"])); 309 | } 310 | set { 311 | this["effect_GMajor"] = value; 312 | } 313 | } 314 | 315 | [global::System.Configuration.UserScopedSettingAttribute()] 316 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 317 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 318 | public bool effect_Dance { 319 | get { 320 | return ((bool)(this["effect_Dance"])); 321 | } 322 | set { 323 | this["effect_Dance"] = value; 324 | } 325 | } 326 | 327 | [global::System.Configuration.UserScopedSettingAttribute()] 328 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 329 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 330 | public bool effect_Squidward { 331 | get { 332 | return ((bool)(this["effect_Squidward"])); 333 | } 334 | set { 335 | this["effect_Squidward"] = value; 336 | } 337 | } 338 | 339 | [global::System.Configuration.UserScopedSettingAttribute()] 340 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 341 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 342 | public bool effect_SpartaRemix { 343 | get { 344 | return ((bool)(this["effect_SpartaRemix"])); 345 | } 346 | set { 347 | this["effect_SpartaRemix"] = value; 348 | } 349 | } 350 | 351 | [global::System.Configuration.UserScopedSettingAttribute()] 352 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 353 | [global::System.Configuration.DefaultSettingValueAttribute("False")] 354 | public bool PluginTest { 355 | get { 356 | return ((bool)(this["PluginTest"])); 357 | } 358 | set { 359 | this["PluginTest"] = value; 360 | } 361 | } 362 | 363 | [global::System.Configuration.UserScopedSettingAttribute()] 364 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 365 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 366 | public bool InsertTransitions { 367 | get { 368 | return ((bool)(this["InsertTransitions"])); 369 | } 370 | set { 371 | this["InsertTransitions"] = value; 372 | } 373 | } 374 | 375 | [global::System.Configuration.UserScopedSettingAttribute()] 376 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 377 | [global::System.Configuration.DefaultSettingValueAttribute("False")] 378 | public bool InsertIntro { 379 | get { 380 | return ((bool)(this["InsertIntro"])); 381 | } 382 | set { 383 | this["InsertIntro"] = value; 384 | } 385 | } 386 | 387 | [global::System.Configuration.UserScopedSettingAttribute()] 388 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 389 | [global::System.Configuration.DefaultSettingValueAttribute("False")] 390 | public bool InsertOutro { 391 | get { 392 | return ((bool)(this["InsertOutro"])); 393 | } 394 | set { 395 | this["InsertOutro"] = value; 396 | } 397 | } 398 | 399 | [global::System.Configuration.UserScopedSettingAttribute()] 400 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 401 | [global::System.Configuration.DefaultSettingValueAttribute("20")] 402 | public int Clips { 403 | get { 404 | return ((int)(this["Clips"])); 405 | } 406 | set { 407 | this["Clips"] = value; 408 | } 409 | } 410 | 411 | [global::System.Configuration.UserScopedSettingAttribute()] 412 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 413 | [global::System.Configuration.DefaultSettingValueAttribute("640")] 414 | public int Width { 415 | get { 416 | return ((int)(this["Width"])); 417 | } 418 | set { 419 | this["Width"] = value; 420 | } 421 | } 422 | 423 | [global::System.Configuration.UserScopedSettingAttribute()] 424 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 425 | [global::System.Configuration.DefaultSettingValueAttribute("480")] 426 | public int Height { 427 | get { 428 | return ((int)(this["Height"])); 429 | } 430 | set { 431 | this["Height"] = value; 432 | } 433 | } 434 | 435 | [global::System.Configuration.UserScopedSettingAttribute()] 436 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 437 | [global::System.Configuration.DefaultSettingValueAttribute("0.2")] 438 | public decimal MinStreamDur { 439 | get { 440 | return ((decimal)(this["MinStreamDur"])); 441 | } 442 | set { 443 | this["MinStreamDur"] = value; 444 | } 445 | } 446 | 447 | [global::System.Configuration.UserScopedSettingAttribute()] 448 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 449 | [global::System.Configuration.DefaultSettingValueAttribute("0.4")] 450 | public decimal MaxStreamDur { 451 | get { 452 | return ((decimal)(this["MaxStreamDur"])); 453 | } 454 | set { 455 | this["MaxStreamDur"] = value; 456 | } 457 | } 458 | 459 | [global::System.Configuration.UserScopedSettingAttribute()] 460 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 461 | [global::System.Configuration.DefaultSettingValueAttribute("resources\\intro.mp4")] 462 | public string Intro { 463 | get { 464 | return ((string)(this["Intro"])); 465 | } 466 | set { 467 | this["Intro"] = value; 468 | } 469 | } 470 | 471 | [global::System.Configuration.UserScopedSettingAttribute()] 472 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 473 | [global::System.Configuration.DefaultSettingValueAttribute("resources\\outro.mp4")] 474 | public string Outro { 475 | get { 476 | return ((string)(this["Outro"])); 477 | } 478 | set { 479 | this["Outro"] = value; 480 | } 481 | } 482 | 483 | [global::System.Configuration.UserScopedSettingAttribute()] 484 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 485 | [global::System.Configuration.DefaultSettingValueAttribute("ffmpeg.exe")] 486 | public string FFmpeg { 487 | get { 488 | return ((string)(this["FFmpeg"])); 489 | } 490 | set { 491 | this["FFmpeg"] = value; 492 | } 493 | } 494 | 495 | [global::System.Configuration.UserScopedSettingAttribute()] 496 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 497 | [global::System.Configuration.DefaultSettingValueAttribute("ffprobe.exe")] 498 | public string FFprobe { 499 | get { 500 | return ((string)(this["FFprobe"])); 501 | } 502 | set { 503 | this["FFprobe"] = value; 504 | } 505 | } 506 | 507 | [global::System.Configuration.UserScopedSettingAttribute()] 508 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 509 | [global::System.Configuration.DefaultSettingValueAttribute("magick")] 510 | public string Magick { 511 | get { 512 | return ((string)(this["Magick"])); 513 | } 514 | set { 515 | this["Magick"] = value; 516 | } 517 | } 518 | 519 | [global::System.Configuration.UserScopedSettingAttribute()] 520 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 521 | [global::System.Configuration.DefaultSettingValueAttribute("sources\\")] 522 | public string Sources { 523 | get { 524 | return ((string)(this["Sources"])); 525 | } 526 | set { 527 | this["Sources"] = value; 528 | } 529 | } 530 | 531 | [global::System.Configuration.UserScopedSettingAttribute()] 532 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 533 | [global::System.Configuration.DefaultSettingValueAttribute("temp\\")] 534 | public string Temp { 535 | get { 536 | return ((string)(this["Temp"])); 537 | } 538 | set { 539 | this["Temp"] = value; 540 | } 541 | } 542 | 543 | [global::System.Configuration.UserScopedSettingAttribute()] 544 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 545 | [global::System.Configuration.DefaultSettingValueAttribute("sounds\\")] 546 | public string Sounds { 547 | get { 548 | return ((string)(this["Sounds"])); 549 | } 550 | set { 551 | this["Sounds"] = value; 552 | } 553 | } 554 | 555 | [global::System.Configuration.UserScopedSettingAttribute()] 556 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 557 | [global::System.Configuration.DefaultSettingValueAttribute("music\\")] 558 | public string Music { 559 | get { 560 | return ((string)(this["Music"])); 561 | } 562 | set { 563 | this["Music"] = value; 564 | } 565 | } 566 | 567 | [global::System.Configuration.UserScopedSettingAttribute()] 568 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 569 | [global::System.Configuration.DefaultSettingValueAttribute("resources\\")] 570 | public string Resources { 571 | get { 572 | return ((string)(this["Resources"])); 573 | } 574 | set { 575 | this["Resources"] = value; 576 | } 577 | } 578 | 579 | [global::System.Configuration.UserScopedSettingAttribute()] 580 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 581 | [global::System.Configuration.DefaultSettingValueAttribute("sources\\")] 582 | public string TransitionDir { 583 | get { 584 | return ((string)(this["TransitionDir"])); 585 | } 586 | set { 587 | this["TransitionDir"] = value; 588 | } 589 | } 590 | } 591 | } 592 | -------------------------------------------------------------------------------- /Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | C:\Program Files (x86)\VideoLAN\VLC 7 | 8 | 9 | Dark 10 | 11 | 12 | True 13 | 14 | 15 | True 16 | 17 | 18 | True 19 | 20 | 21 | True 22 | 23 | 24 | True 25 | 26 | 27 | True 28 | 29 | 30 | True 31 | 32 | 33 | True 34 | 35 | 36 | True 37 | 38 | 39 | True 40 | 41 | 42 | True 43 | 44 | 45 | True 46 | 47 | 48 | True 49 | 50 | 51 | True 52 | 53 | 54 | True 55 | 56 | 57 | True 58 | 59 | 60 | True 61 | 62 | 63 | True 64 | 65 | 66 | True 67 | 68 | 69 | True 70 | 71 | 72 | True 73 | 74 | 75 | True 76 | 77 | 78 | True 79 | 80 | 81 | True 82 | 83 | 84 | True 85 | 86 | 87 | True 88 | 89 | 90 | False 91 | 92 | 93 | True 94 | 95 | 96 | False 97 | 98 | 99 | False 100 | 101 | 102 | 20 103 | 104 | 105 | 640 106 | 107 | 108 | 480 109 | 110 | 111 | 0.2 112 | 113 | 114 | 0.4 115 | 116 | 117 | resources\intro.mp4 118 | 119 | 120 | resources\outro.mp4 121 | 122 | 123 | ffmpeg.exe 124 | 125 | 126 | ffprobe.exe 127 | 128 | 129 | magick 130 | 131 | 132 | sources\ 133 | 134 | 135 | temp\ 136 | 137 | 138 | sounds\ 139 | 140 | 141 | music\ 142 | 143 | 144 | resources\ 145 | 146 | 147 | sources\ 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 |

YTP++

3 |

Made with ❤ in C#.

4 |

5 | YTP+ Hub 6 | GitHub issues 7 | GitHub last commit 8 | GitHub license 9 | Downloads 10 | Latest release 11 |

12 |

13 | 14 | ## YTP++ is an iteration of [YTP+](https://github.com/philosophofee/YTPPlus), written in C#. 15 | ### It includes new features and benefits over the previous iteration, such as: 16 | 17 | - Intro and outro, with toggles 18 | - Setting width/height for rendered videos 19 | - Includes FFMPEG, FFPROBE and frei0r 20 | - Error handling 21 | - New additional effects (Earrape, Pixelated Video, Sparta Remix, etc.) 22 | - [Plugin support](https://github.com/DevanWolf/YTPPlusPlus/wiki/Plugin-Creation) 23 | 24 | ## A warning call 25 | For those of you using plugins, please be aware that YTP++ has no mind in what is a real plugin batch and what isn't. Any non-verified plugins have the potential to be malicious, be on the look out for the malicious use of plugins as there is a possibility that a plugin can be harmful. Remember to **NEVER** start YTP++ as an administrator. 26 | 27 | ## What is YTP+ and YTP++? 28 | YTP+ is the name given to a set of tools to automatically generate YouTube Poop videos. 29 | YTP++ is the name given to the second iteration of the software, however there was once a [YTP++ made in Electron and Node.JS](https://github.com/TeamPopplio/ytpplus-node-ui). 30 | 31 | ## How do I configure YTP++? 32 | All configuration settings may be found in the application itself, either on the interface or in the Tools menu. [ImageMagick](https://imagemagick.org) is required for the Squidward effect but is otherwise not needed. 33 | A 32-bit version of [VLC](http://videolan.org/vlc) is recommended to run this software, please install it beforehand for enhanced functionality. 34 | 35 | ## I can't run YTP++, it just blinks and dissapears! 36 | Try installing the [.NET Framework 4.7.2](https://dotnet.microsoft.com/download/dotnet-framework/net472) or newer runtime. Please note that YTP++ does not currently run on Windows Vista or below and has only been tested under Windows 10, thus requiring Windows 7 or later. 37 | 38 | ## I installed VLC, but it's still giving me an error? 39 | Make sure it is the **32-bit** version of VLC as the 64-bit one will not work unless you select it manually. 40 | 41 | ## I installed ImageMagick, but Squidward is still disabled? 42 | Try adding magick.exe to your system path. If you've checked the box needed in the installation prompt for ImageMagick, try restarting your computer. If all else fails, try setting magick.exe manually via the Tools menu. 43 | 44 | ## I got a great idea for the program, where to start? 45 | Anyone is welcome to submit a pull request or suggest ideas via the [Discord server](https://discord.gg/bzhzRmg). 46 | 47 | ## OSS Credits 48 | [FFmpeg](https://github.com/FFmpeg/FFmpeg), [LibVLC](https://github.com/videolan/vlc), and [Vlc.DotNet](https://github.com/ZeBobo5/Vlc.DotNet). 49 | -------------------------------------------------------------------------------- /YTP++.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {9745A375-7E9A-498F-AA58-C87D117C1B5F} 8 | Exe 9 | YTPPlusPlus 10 | YTP++ 11 | v4.7.2 12 | 10.0.18362.0 13 | 512 14 | true 15 | true 16 | false 17 | 18 | 19 | publish\ 20 | true 21 | Disk 22 | false 23 | Foreground 24 | 7 25 | Days 26 | false 27 | false 28 | true 29 | 0 30 | 1.0.0.%2a 31 | false 32 | true 33 | 34 | 35 | AnyCPU 36 | true 37 | full 38 | false 39 | bin\Debug\ 40 | DEBUG;TRACE 41 | prompt 42 | 4 43 | 44 | 45 | AnyCPU 46 | none 47 | true 48 | bin\Release\ 49 | 50 | prompt 51 | 4 52 | 53 | 54 | bin\x86\Debug\ 55 | x86 56 | 57 | 58 | 59 | 60 | 61 | 62 | iconwide.ico 63 | 64 | 65 | x86 66 | 67 | 68 | Internet 69 | 70 | 71 | false 72 | 73 | 74 | true 75 | 76 | 77 | 78 | packages\DiscordRichPresence.1.0.121\lib\net35\DiscordRPC.dll 79 | 80 | 81 | packages\WindowsAPICodePack-Core.1.1.2\lib\Microsoft.WindowsAPICodePack.dll 82 | 83 | 84 | packages\WindowsAPICodePack-Shell.1.1.1\lib\Microsoft.WindowsAPICodePack.Shell.dll 85 | 86 | 87 | packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | packages\Vlc.DotNet.Core.3.0.0\lib\net45\Vlc.DotNet.Core.dll 104 | 105 | 106 | packages\Vlc.DotNet.Core.Interops.3.0.0\lib\net45\Vlc.DotNet.Core.Interops.dll 107 | 108 | 109 | packages\Vlc.DotNet.Forms.3.0.0\lib\net45\Vlc.DotNet.Forms.dll 110 | 111 | 112 | 113 | 114 | Form 115 | 116 | 117 | AboutBox.cs 118 | 119 | 120 | Form 121 | 122 | 123 | Main.cs 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | AboutBox.cs 132 | 133 | 134 | Main.cs 135 | 136 | 137 | ResXFileCodeGenerator 138 | Resources.Designer.cs 139 | Designer 140 | 141 | 142 | True 143 | Resources.resx 144 | True 145 | 146 | 147 | 148 | SettingsSingleFileGenerator 149 | Settings.Designer.cs 150 | 151 | 152 | True 153 | Settings.settings 154 | True 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | {6BF52A50-394A-11D3-B153-00C04F79FAA6} 163 | 1 164 | 0 165 | 0 166 | aximp 167 | False 168 | 169 | 170 | {6BF52A50-394A-11D3-B153-00C04F79FAA6} 171 | 1 172 | 0 173 | 0 174 | tlbimp 175 | False 176 | True 177 | 178 | 179 | 180 | 181 | False 182 | Microsoft .NET Framework 4.7.2 %28x86 and x64%29 183 | true 184 | 185 | 186 | False 187 | .NET Framework 3.5 SP1 188 | false 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 199 | 200 | 201 | 202 | 203 | -------------------------------------------------------------------------------- /YTP++.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29503.13 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YTP++", "YTP++.csproj", "{9745A375-7E9A-498F-AA58-C87D117C1B5F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Debug|x86 = Debug|x86 12 | Release|Any CPU = Release|Any CPU 13 | Release|x86 = Release|x86 14 | Description = YouTube Poop Generator 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {9745A375-7E9A-498F-AA58-C87D117C1B5F}.Debug|Any CPU.ActiveCfg = Debug|x86 18 | {9745A375-7E9A-498F-AA58-C87D117C1B5F}.Debug|Any CPU.Build.0 = Debug|x86 19 | {9745A375-7E9A-498F-AA58-C87D117C1B5F}.Debug|x86.ActiveCfg = Debug|x86 20 | {9745A375-7E9A-498F-AA58-C87D117C1B5F}.Debug|x86.Build.0 = Debug|x86 21 | {9745A375-7E9A-498F-AA58-C87D117C1B5F}.Release|Any CPU.ActiveCfg = Release|Any CPU 22 | {9745A375-7E9A-498F-AA58-C87D117C1B5F}.Release|Any CPU.Build.0 = Release|Any CPU 23 | {9745A375-7E9A-498F-AA58-C87D117C1B5F}.Release|x86.ActiveCfg = Release|Any CPU 24 | {9745A375-7E9A-498F-AA58-C87D117C1B5F}.Release|x86.Build.0 = Release|Any CPU 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | GlobalSection(ExtensibilityGlobals) = postSolution 30 | SolutionGuid = {DC5061A6-01CA-45E9-AB83-8B1F048C0B3A} 31 | EndGlobalSection 32 | EndGlobal 33 | -------------------------------------------------------------------------------- /YTPPlus/Utilities.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.IO; 4 | using System.Threading; 5 | 6 | /** 7 | * FFMPEG utilities toolbox for YTP+ 8 | * 9 | * @author benb 10 | * @author LimeQuartz 11 | */ 12 | namespace YTPPlus 13 | { 14 | public class Utilities 15 | { 16 | public string FFPROBE; 17 | public string FFMPEG; 18 | public string MAGICK; 19 | 20 | public string TEMP = ""; 21 | public string SOURCES = ""; 22 | public string SOUNDS = ""; 23 | public string MUSIC = ""; 24 | public string RESOURCES = ""; 25 | 26 | public string intro = ""; 27 | public string outro = ""; 28 | 29 | /** 30 | * Return the length of a video (in seconds) 31 | * 32 | * @param video input video filename to work with 33 | * @return Video length as a string (output from ffprobe) 34 | */ 35 | public string getVideoLength(string video) 36 | { 37 | try 38 | { 39 | System.Diagnostics.Process process = new System.Diagnostics.Process(); 40 | System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); 41 | startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; 42 | startInfo.FileName = FFPROBE; 43 | startInfo.Arguments = "-v error -sexagesimal -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 \"" + video + "\""; 44 | startInfo.UseShellExecute = false; 45 | startInfo.RedirectStandardOutput = true; 46 | process.StartInfo = startInfo; 47 | process.Start(); 48 | // Read stderr synchronously (on another thread) 49 | string s; 50 | string errorText = null; 51 | var stderrThread = new Thread(() => { errorText = process.StandardOutput.ReadToEnd(); }); 52 | stderrThread.Start(); 53 | 54 | // Read stdout synchronously (on this thread) 55 | 56 | while (true) 57 | { 58 | var line = process.StandardOutput.ReadLine(); 59 | if (line == null) 60 | break; 61 | s = line; 62 | Console.WriteLine(line); 63 | } 64 | 65 | process.WaitForExit(); 66 | stderrThread.Join(); 67 | return errorText; 68 | } 69 | catch (Exception ex) { Console.WriteLine(ex.StackTrace); return ""; } 70 | } 71 | 72 | public string getLength(string file) 73 | { 74 | try 75 | { 76 | System.Diagnostics.Process process = new System.Diagnostics.Process(); 77 | System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); 78 | startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; 79 | startInfo.FileName = FFPROBE; 80 | if (file.StartsWith("\"")) 81 | { 82 | file = file.Substring(1); 83 | } 84 | if (file.EndsWith("\"")) 85 | { 86 | file = file.Substring(0, file.Length - 1); 87 | } 88 | startInfo.Arguments = "-i \"" + file + "\" -show_entries format=duration -v quiet -of csv=\"p=0\""; 89 | startInfo.UseShellExecute = false; 90 | startInfo.RedirectStandardOutput = true; 91 | process.StartInfo = startInfo; 92 | process.Start(); 93 | string s = ""; 94 | // Read stdout synchronously (on this thread) 95 | 96 | while (true) 97 | { 98 | var line = process.StandardOutput.ReadLine(); 99 | if (line == null) 100 | break; 101 | Console.WriteLine(line); 102 | s = line; 103 | } 104 | 105 | process.WaitForExit(); 106 | Console.WriteLine(s); 107 | return s; 108 | 109 | } 110 | catch (Exception ex) { Console.WriteLine(ex.StackTrace); return ""; } 111 | } 112 | 113 | /** 114 | * Snip a video file between the start and end time, and save it to an output file. 115 | * 116 | * @param video input video filename to work with 117 | * @param startTime start time (in TimeStamp format, e.g. new TimeStamp(seconds);) 118 | * @param endTime start time (in TimeStamp format, e.g. new TimeStamp(seconds);) 119 | * @param output output video filename to save the snipped clip to 120 | */ 121 | public void snipVideo(string video, double startTime, double endTime, string output, int width, int height) 122 | { 123 | try 124 | { 125 | System.Diagnostics.Process process = new System.Diagnostics.Process(); 126 | System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); 127 | startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; 128 | startInfo.FileName = FFMPEG; 129 | if (video.StartsWith("\"")) 130 | { 131 | video = video.Substring(1); 132 | } 133 | if (video.EndsWith("\"")) 134 | { 135 | video = video.Substring(0, video.Length - 1); 136 | } 137 | startInfo.Arguments = "-i \"" + video + "\" -ss " + startTime.ToString("0.#########################", new CultureInfo("en-US")) + " -to " + endTime.ToString("0.#########################", new CultureInfo("en-US")) + " -ar 44100 -ac 2 -vf scale=" + width.ToString("0.#########################", new CultureInfo("en-US")) + "x" + height.ToString("0.#########################", new CultureInfo("en-US")) + ",setsar=1:1,fps=fps=30 -map_metadata -1 -y \"" + output + ".mp4\""; 138 | startInfo.UseShellExecute = false; 139 | startInfo.RedirectStandardOutput = true; 140 | process.StartInfo = startInfo; 141 | process.Start(); 142 | // Read stderr synchronously (on another thread) 143 | 144 | string errorText = null; 145 | var stderrThread = new Thread(() => { errorText = process.StandardOutput.ReadToEnd(); }); 146 | stderrThread.Start(); 147 | 148 | // Read stdout synchronously (on this thread) 149 | 150 | while (true) 151 | { 152 | var line = process.StandardOutput.ReadLine(); 153 | if (line == null) 154 | break; 155 | 156 | Console.WriteLine(line); 157 | } 158 | 159 | process.WaitForExit(); 160 | stderrThread.Join(); 161 | 162 | if (process.HasExited && process.ExitCode == 1) 163 | { 164 | Console.WriteLine("ERROR"); 165 | } 166 | } 167 | catch (Exception ex) { Console.WriteLine(ex.StackTrace); } 168 | } 169 | 170 | /** 171 | * Copies a video and encodes it in the proper format without changes. 172 | * 173 | * @param video input video filename to work with 174 | * @param output output video filename to save the snipped clip to 175 | */ 176 | public void copyVideo(string video, string output, int width, int height) 177 | { 178 | try 179 | { 180 | System.Diagnostics.Process process = new System.Diagnostics.Process(); 181 | System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); 182 | startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; 183 | startInfo.FileName = FFMPEG; 184 | if (video.StartsWith("\"")) 185 | { 186 | video = video.Substring(1); 187 | } 188 | if (video.EndsWith("\"")) 189 | { 190 | video = video.Substring(0, video.Length - 1); 191 | } 192 | startInfo.Arguments = "-i \"" + video + "\" -vf scale=" + width.ToString("0.#########################", new CultureInfo("en-US")) + "x" + height.ToString("0.#########################", new CultureInfo("en-US")) + ",setsar=1:1,fps=fps=30 -ar 44100 -ac 2 -map_metadata -1 -y \"" + output + ".mp4\""; 193 | startInfo.UseShellExecute = false; 194 | startInfo.RedirectStandardOutput = true; 195 | process.StartInfo = startInfo; 196 | process.Start(); 197 | // Read stderr synchronously (on another thread) 198 | 199 | string errorText = null; 200 | var stderrThread = new Thread(() => { errorText = process.StandardOutput.ReadToEnd(); }); 201 | stderrThread.Start(); 202 | 203 | // Read stdout synchronously (on this thread) 204 | 205 | while (true) 206 | { 207 | var line = process.StandardOutput.ReadLine(); 208 | if (line == null) 209 | break; 210 | 211 | Console.WriteLine(line); 212 | } 213 | 214 | process.WaitForExit(); 215 | stderrThread.Join(); 216 | 217 | 218 | if (process.HasExited && process.ExitCode == 1) 219 | { 220 | Console.WriteLine("ERROR"); 221 | } 222 | } 223 | catch (Exception ex) { Console.WriteLine(ex.StackTrace); } 224 | } 225 | 226 | /** 227 | * Concatenate videos by count 228 | * 229 | * @param count number of input videos to concatenate 230 | * @param out output video filename 231 | */ 232 | public void concatenateVideo(int count, string ou) 233 | { 234 | try 235 | { 236 | if (File.Exists(ou)) 237 | File.Delete(ou); 238 | 239 | string command1 = ""; 240 | 241 | for (int i = 0; i < count; i++) 242 | { 243 | if (File.Exists(TEMP + "video" + i + ".mp4")) 244 | { 245 | command1 += (" -i \"" + TEMP + "video" + i + ".mp4\""); 246 | } 247 | } 248 | command1 += (" -filter_complex \""); 249 | 250 | int realcount = 0; 251 | for (int i = 0; i < count; i++) 252 | { 253 | if (File.Exists(TEMP + "video" + i + ".mp4")) 254 | { 255 | realcount += 1; 256 | } 257 | } 258 | 259 | command1 += ("concat=n=" + realcount + ":v=1:a=1[outv][outa]\" -map [outv] -map [outa] -y \"" + ou + "\""); 260 | Console.WriteLine(command1); 261 | 262 | System.Diagnostics.Process process = new System.Diagnostics.Process(); 263 | System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); 264 | startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; 265 | startInfo.FileName = FFMPEG; 266 | startInfo.Arguments = command1; 267 | startInfo.UseShellExecute = false; 268 | startInfo.RedirectStandardOutput = true; 269 | process.StartInfo = startInfo; 270 | process.Start(); 271 | // Read stderr synchronously (on another thread) 272 | 273 | string errorText = null; 274 | var stderrThread = new Thread(() => { errorText = process.StandardOutput.ReadToEnd(); }); 275 | stderrThread.Start(); 276 | 277 | // Read stdout synchronously (on this thread) 278 | 279 | while (true) 280 | { 281 | var line = process.StandardOutput.ReadLine(); 282 | if (line == null) 283 | break; 284 | 285 | Console.WriteLine(line); 286 | } 287 | 288 | process.WaitForExit(); 289 | stderrThread.Join(); 290 | } 291 | catch (Exception ex) { Console.WriteLine(ex.StackTrace); } 292 | } 293 | } 294 | } 295 | -------------------------------------------------------------------------------- /YTPPlus/YTPGenerator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.ComponentModel; 5 | using System.Globalization; 6 | using System.IO; 7 | 8 | namespace YTPPlus 9 | { 10 | public class YTPGenerator 11 | { 12 | public double MAX_STREAM_DURATION = 0.4; //default: 2s 13 | public double MIN_STREAM_DURATION = 0.2; //default: 0.2s 14 | public int MAX_CLIPS = 20; //default: 5 clips 15 | public string INPUT_FILE; //Input video file 16 | public string OUTPUT_FILE; //the video file that will be produced in the end 17 | 18 | public bool failed = false; //if the application has failed 19 | public Exception exc; //set when the application fails to give more information 20 | 21 | public bool effect1; 22 | public bool effect2; 23 | public bool effect3; 24 | public bool effect4; 25 | public bool effect5; 26 | public bool effect6; 27 | public bool effect7; 28 | public bool effect8; 29 | public bool effect9; 30 | public bool effect10; 31 | public bool effect11; 32 | public bool effect12; 33 | public bool effect13; 34 | public bool effect14; 35 | public bool effect15; 36 | public bool effect16; 37 | public bool effect17; 38 | public bool effect18; 39 | public bool effect19; 40 | public bool effect20; 41 | public bool effect21; 42 | public bool effect22; 43 | public bool effect23; 44 | public bool effect24; 45 | public bool effect25; 46 | public bool effect26; 47 | 48 | public bool pluginTest = false; 49 | public int pluginCount = 0; 50 | public List plugins = new List(); 51 | 52 | public bool insertTransitionClips; 53 | 54 | public int width = 640; 55 | public int height = 480; 56 | public bool intro = false; 57 | public bool outro = false; 58 | 59 | public Utilities toolBox = new Utilities(); 60 | 61 | EffectsFactory effectsFactory; 62 | ArrayList sourceList = new ArrayList(); 63 | public bool done = false; 64 | public decimal doneCount = 0; 65 | 66 | public YTPGenerator(string output) 67 | { 68 | this.OUTPUT_FILE = output; 69 | } 70 | public void setMaxClips(int clips) 71 | { 72 | this.MAX_CLIPS = clips; 73 | } 74 | public void setMinDuration(double min) 75 | { 76 | this.MIN_STREAM_DURATION = min; 77 | } 78 | public void setMaxDuration(double max) 79 | { 80 | this.MAX_STREAM_DURATION = max; 81 | } 82 | 83 | public void addSource(String sourceName) 84 | { 85 | sourceList.Add(sourceName); 86 | } 87 | public BackgroundWorker vidThreadWorker = new BackgroundWorker(); 88 | 89 | public void vidThread(object sender, DoWorkEventArgs e) 90 | { 91 | if (sourceList.Count == 0 && insertTransitionClips == false) 92 | { 93 | Console.WriteLine("No sources added..."); 94 | return; 95 | } 96 | 97 | if (File.Exists(OUTPUT_FILE)) 98 | File.Delete(OUTPUT_FILE); 99 | 100 | try 101 | { 102 | Directory.CreateDirectory(toolBox.TEMP); 103 | int endofclips = MAX_CLIPS - 1; 104 | failed = false; 105 | for (int i = 0; i < MAX_CLIPS; i++) 106 | { 107 | Console.WriteLine("STARTING CLIP " + "video" + i); 108 | if (i == 0 && intro) 109 | { 110 | MAX_CLIPS++; 111 | Console.WriteLine("Intro clip enabled, adding 1 to max clips. New max clips is " + MAX_CLIPS + "."); 112 | Console.WriteLine("Done: " + Decimal.Divide(i, MAX_CLIPS)); 113 | vidThreadWorker.ReportProgress(Convert.ToInt32(Decimal.Divide(i, MAX_CLIPS) * 100, new CultureInfo("en-US"))); 114 | Console.WriteLine(toolBox.intro); 115 | toolBox.copyVideo(toolBox.intro, toolBox.TEMP + "video" + i, width, height); 116 | } 117 | else 118 | { 119 | Console.WriteLine("Done: " + Decimal.Divide(i, MAX_CLIPS)); 120 | vidThreadWorker.ReportProgress(Convert.ToInt32(Decimal.Divide(i, MAX_CLIPS) * 100, new CultureInfo("en-US"))); 121 | if ((randomInt(0, 15) == 15 && insertTransitionClips == true) || sourceList.Count == 0) 122 | { 123 | Console.WriteLine("Tryina use a diff source"); 124 | toolBox.copyVideo(toolBox.SOURCES + effectsFactory.pickSource(), toolBox.TEMP + "video" + i, width, height); 125 | } 126 | else 127 | { 128 | string sourceToPick = sourceList[randomInt(0, sourceList.Count - 1)].ToString(); 129 | Console.WriteLine(sourceToPick); 130 | decimal source = decimal.Parse(toolBox.getLength(sourceToPick), NumberStyles.Any, new CultureInfo("en-US")); 131 | string output = source.ToString("0.#########################", new CultureInfo("en-US")); 132 | Console.WriteLine(toolBox.getLength(sourceToPick) + " -> " + output + " -> " + double.Parse(output, NumberStyles.Any, new CultureInfo("en-US"))); 133 | double boy = double.Parse(output, NumberStyles.Any, new CultureInfo("en-US")); 134 | Console.WriteLine(boy); 135 | double startOfClip = randomDouble(0.0, boy - MAX_STREAM_DURATION); 136 | double endOfClip = startOfClip + randomDouble(MIN_STREAM_DURATION, MAX_STREAM_DURATION); 137 | Console.WriteLine("Beginning of clip " + i + ": " + startOfClip.ToString("0.#########################", new CultureInfo("en-US"))); 138 | Console.WriteLine("Ending of clip " + i + ": " + endOfClip.ToString("0.#########################", new CultureInfo("en-US")) + ", in seconds: "); 139 | toolBox.snipVideo(sourceToPick, startOfClip, endOfClip, toolBox.TEMP + "video" + i, width, height); 140 | } 141 | //Add a random effect to the video 142 | int effect = 0; 143 | if (pluginTest) 144 | effect = 28; 145 | else 146 | { 147 | effect = randomInt(0, 27 + pluginCount); 148 | if (effect > 0) 149 | Console.WriteLine("STARTING EFFECT ON CLIP " + i + " EFFECT" + effect); 150 | } 151 | String clipToWorkWith = toolBox.TEMP + "video" + i + ".mp4"; 152 | switch (effect) 153 | { 154 | case 1: 155 | if (effect1 == true) 156 | effectsFactory.effect_RandomSound(clipToWorkWith); 157 | break; 158 | case 2: 159 | if (effect2 == true) 160 | effectsFactory.effect_RandomSoundMute(clipToWorkWith); 161 | break; 162 | case 3: 163 | if (effect3 == true) 164 | effectsFactory.effect_Reverse(clipToWorkWith); 165 | break; 166 | case 4: 167 | if (effect4 == true) 168 | effectsFactory.effect_SpeedUp(clipToWorkWith); 169 | break; 170 | case 5: 171 | if (effect5 == true) 172 | effectsFactory.effect_SlowDown(clipToWorkWith); 173 | break; 174 | case 6: 175 | if (effect6 == true) 176 | effectsFactory.effect_Chorus(clipToWorkWith); 177 | break; 178 | case 7: 179 | if (effect7 == true) 180 | effectsFactory.effect_Vibrato(clipToWorkWith); 181 | break; 182 | case 8: 183 | if (effect8 == true) 184 | effectsFactory.effect_Tremolo(clipToWorkWith); 185 | break; 186 | case 9: 187 | if (effect9 == true) 188 | effectsFactory.effect_Earrape(clipToWorkWith); 189 | break; 190 | case 10: 191 | if (effect10 == true) 192 | effectsFactory.effect_SpeedUpHighPitch(clipToWorkWith); 193 | break; 194 | case 11: 195 | if (effect11 == true) 196 | effectsFactory.effect_SlowDownLowPitch(clipToWorkWith); 197 | break; 198 | case 12: 199 | if (effect12 == true) 200 | effectsFactory.effect_HighPitch(clipToWorkWith); 201 | break; 202 | case 13: 203 | if (effect13 == true) 204 | effectsFactory.effect_LowPitch(clipToWorkWith); 205 | break; 206 | case 14: 207 | if (effect14 == true) 208 | effectsFactory.effect_ForwardReverse(clipToWorkWith); 209 | break; 210 | case 15: 211 | if (effect15 == true) 212 | effectsFactory.effect_ReverseForward(clipToWorkWith); 213 | break; 214 | case 16: 215 | if (effect16 == true) 216 | effectsFactory.effect_Pixelate(clipToWorkWith, width, height); 217 | break; 218 | case 17: 219 | if (effect17 == true) 220 | effectsFactory.effect_BadQuality(clipToWorkWith, width, height); 221 | break; 222 | case 18: 223 | if (effect18 == true) 224 | effectsFactory.effect_Emboss(clipToWorkWith); 225 | break; 226 | case 19: 227 | if (effect19 == true) 228 | effectsFactory.effect_SymmetryHorizontal1(clipToWorkWith); 229 | break; 230 | case 20: 231 | if (effect20 == true) 232 | effectsFactory.effect_SymmetryHorizontal2(clipToWorkWith); 233 | break; 234 | case 21: 235 | if (effect21 == true) 236 | effectsFactory.effect_SymmetryVertical1(clipToWorkWith); 237 | break; 238 | case 22: 239 | if (effect22 == true) 240 | effectsFactory.effect_SymmetryVertical2(clipToWorkWith); 241 | break; 242 | case 23: 243 | if (effect23 == true) 244 | effectsFactory.effect_GMajor(clipToWorkWith); 245 | break; 246 | case 24: 247 | if (effect24 == true) 248 | effectsFactory.effect_Dance(clipToWorkWith); 249 | break; 250 | case 25: 251 | if (effect25 == true) 252 | effectsFactory.effect_Squidward(clipToWorkWith, width, height); 253 | break; 254 | case 26: 255 | if (effect26 == true) 256 | effectsFactory.effect_SpartaRemix(clipToWorkWith, width, height); 257 | break; 258 | default: 259 | if (effect >= 28 && effect <= 27+pluginCount) 260 | effectsFactory.effect_Plugin(clipToWorkWith, width, height, plugins[rnd.Next(plugins.Count)]); 261 | break; 262 | } 263 | } 264 | } 265 | if (outro) 266 | { 267 | Console.WriteLine("Outro clip enabled."); 268 | Console.WriteLine("Done: " + Decimal.Divide(MAX_CLIPS - 1, MAX_CLIPS)); 269 | vidThreadWorker.ReportProgress(Convert.ToInt32(Decimal.Divide(MAX_CLIPS - 1, MAX_CLIPS) * 100, new CultureInfo("en-US"))); 270 | Console.WriteLine(toolBox.outro); 271 | Console.WriteLine("STARTING CLIP " + "video" + MAX_CLIPS); 272 | toolBox.copyVideo(toolBox.outro, toolBox.TEMP + "video" + MAX_CLIPS, width, height); 273 | MAX_CLIPS++; 274 | } 275 | toolBox.concatenateVideo(MAX_CLIPS, OUTPUT_FILE); 276 | 277 | } 278 | catch (Exception ex) 279 | { 280 | Console.WriteLine(ex.StackTrace); 281 | exc = ex; 282 | failed = true; 283 | } 284 | cleanUp(); 285 | rmDir(toolBox.TEMP); 286 | } 287 | void vidThreadWorker_ProgressChanged(object sender, ProgressChangedEventArgs e) 288 | { 289 | // This function fires on the UI thread so it's safe to edit 290 | // the UI control directly, no funny business with Control.Invoke :) 291 | // Update the progressBar with the integer supplied to us from the 292 | // ReportProgress() function. 293 | doneCount = e.ProgressPercentage; 294 | } 295 | void vidThreadWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) 296 | { 297 | done = true; 298 | } 299 | public YTPGenerator go(ProgressChangedEventHandler progressReporter, RunWorkerCompletedEventHandler completedReporter) 300 | { 301 | effectsFactory = new EffectsFactory(toolBox); //hacky but works 302 | vidThreadWorker.DoWork += new DoWorkEventHandler(vidThread); 303 | vidThreadWorker.WorkerReportsProgress = true; 304 | vidThreadWorker.WorkerSupportsCancellation = true; 305 | vidThreadWorker.ProgressChanged += progressReporter; 306 | vidThreadWorker.RunWorkerCompleted += completedReporter; 307 | vidThreadWorker.RunWorkerAsync(); 308 | return this; 309 | } 310 | 311 | public bool isDone() 312 | { 313 | return done; 314 | } 315 | public Random rnd = new Random(); 316 | public int randomInt(int min, int max) 317 | { 318 | return rnd.Next((max - min) + 1) + min; 319 | } 320 | public double randomDouble(double min, double max) 321 | { 322 | double finalVal = -1; 323 | while (finalVal < 0) 324 | { 325 | double x = (rnd.NextDouble() * ((max - min) + 0)) + min; 326 | finalVal = Math.Round(x * 100.0) / 100.0; 327 | } 328 | return finalVal; 329 | } 330 | public void cleanUp() 331 | { 332 | if (File.Exists(toolBox.TEMP + "temp.mp4")) 333 | File.Delete(toolBox.TEMP + "temp.mp4"); 334 | for (int i = 0; i < MAX_CLIPS; i++) 335 | { 336 | if (File.Exists(toolBox.TEMP + "video" + i + ".mp4")) 337 | { 338 | Console.WriteLine(i + " Exists"); 339 | File.Delete(toolBox.TEMP + "video" + i + ".mp4"); 340 | } 341 | } 342 | 343 | } 344 | public void rmDir(string file) 345 | { 346 | foreach (string fi in Directory.GetFiles(file)) 347 | { 348 | File.Delete(fi); 349 | } 350 | Directory.Delete(file); 351 | } 352 | 353 | } 354 | } 355 | -------------------------------------------------------------------------------- /iconwide.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevanWolf/YTPPlusPlus/0b4c13161e610144191cf0dfe51ad22c01577e87/iconwide.ico -------------------------------------------------------------------------------- /packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | --------------------------------------------------------------------------------