_
39 | Protected Overrides Function OnInitialize(ByVal commandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String)) As Boolean
40 | Me.MinimumSplashScreenDisplayTime = 0
41 | Return MyBase.OnInitialize(commandLineArgs)
42 | End Function
43 | End Class
44 | End Namespace
45 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | SimpleVideoEditor
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | A simple video editor that acts as an easy to use frontend for [ffmpeg](https://ffmpeg.org/). Licensed under GPL v3.
16 |
17 | To use this application, download and extract the zip from https://github.com/OPS-Solutions/SimpleVideoEditor/releases. It contains the license, and the two executables needed. As long as these files are present, the application is fully portable.
18 | Run the SimpleVideoEditor.exe to open the main GUI.
19 |
20 | **Video Editing Features:**
21 | - Trim start/end (frame perfect)
22 | - Crop (manual and automatic)
23 | - Rotate
24 | - Reduce resolution
25 | - Convert file type
26 | - Modify volume
27 | - Delete duplicate frames
28 | - Change playback speed
29 | - Reduce framerate
30 | - Color key
31 |
32 | **Advanced Features:**
33 | - Detect and remove duplicate content from multiple videos
34 | - Create videos from collections of images
35 | - Subtitle editor
36 | - Generate command line arguments for use in other ffmpeg scripts
37 | - Generate batch scripts to easily process many videos
38 | - Export frames, individually, or combined and overlaid using alpha blend
39 |
40 | # Interface Overview
41 | 
42 |
--------------------------------------------------------------------------------
/SimpleVideoEditor/Subtitle/SubEntry.vb:
--------------------------------------------------------------------------------
1 | Imports System.Text
2 | Imports System.Text.RegularExpressions
3 |
4 | Public Class SubEntry
5 | Public SectionID As Integer
6 | Public StartTime As TimeSpan
7 | Public EndTime As TimeSpan
8 | Public Text As String
9 | Public SeedString As String
10 |
11 | Public Shared Function FromString(sectionText As String) As SubEntry
12 | Try
13 | Dim sectionLines() As String = Regex.Split(sectionText, "\r\n|\n|\r")
14 | Dim id As Integer = Integer.Parse(sectionLines(0).Trim)
15 | Dim timeRegex As New RegularExpressions.Regex("(\d*):(\d*):(\d*),(\d\d\d) --> (\d*):(\d*):(\d*),(\d\d\d)")
16 | Dim timeMatch As RegularExpressions.Match = timeRegex.Match(sectionLines(1).Trim)
17 |
18 | Dim startTime As New TimeSpan(0, Integer.Parse(timeMatch.Groups(1).Value), Integer.Parse(timeMatch.Groups(2).Value), Integer.Parse(timeMatch.Groups(3).Value), Integer.Parse(timeMatch.Groups(4).Value))
19 | Dim endTime As New TimeSpan(0, Integer.Parse(timeMatch.Groups(5).Value), Integer.Parse(timeMatch.Groups(6).Value), Integer.Parse(timeMatch.Groups(7).Value), Integer.Parse(timeMatch.Groups(8).Value))
20 | Dim fullText As New StringBuilder
21 | If sectionLines.Count > 2 Then
22 | For index As Integer = 2 To sectionLines.Count - 1
23 | fullText.AppendLine(sectionLines(index))
24 | Next
25 | End If
26 | Return New SubEntry With {
27 | .SectionID = id,
28 | .StartTime = startTime,
29 | .EndTime = endTime,
30 | .Text = If(sectionLines.Count > 2, fullText.ToString.Trim, ""),
31 | .SeedString = sectionText.Replace(vbCrLf, vbLf)
32 | }
33 | Catch ex As Exception
34 | Return Nothing
35 | End Try
36 | End Function
37 |
38 | Public Overrides Function ToString() As String
39 | Dim subBuilder As New StringBuilder
40 | subBuilder.AppendLine(SectionID)
41 | subBuilder.AppendLine($"{StartTime.ToString("hh\:mm\:ss\,fff")} --> {EndTime.ToString("hh\:mm\:ss\,fff")}")
42 | subBuilder.AppendLine(Text)
43 | Return subBuilder.ToString()
44 | End Function
45 | End Class
46 |
--------------------------------------------------------------------------------
/SimpleVideoEditor/ManualEntryForm.vb:
--------------------------------------------------------------------------------
1 | '''
2 | ''' A form for modification of a string
3 | '''
4 | Public Class ManualEntryForm
5 | Public ModifiedText As String = ""
6 |
7 | Public Property Persistent As Boolean = False
8 |
9 | Public Sub New(ByRef text As String)
10 | ' This call is required by the designer.
11 | InitializeComponent()
12 |
13 | ' Add any initialization after the InitializeComponent() call.
14 | ModifiedText = text
15 | txtConsole.Text = text
16 | End Sub
17 | Private Sub txtConsole_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles txtConsole.PreviewKeyDown
18 | ModifiedText = txtConsole.Text
19 | Select Case e.KeyCode
20 | Case Keys.Enter
21 | If Not My.Computer.Keyboard.ShiftKeyDown Then
22 | Me.DialogResult = DialogResult.OK
23 | Me.Close()
24 | End If
25 | Case Keys.Return
26 | If Not My.Computer.Keyboard.ShiftKeyDown Then
27 | Me.DialogResult = DialogResult.OK
28 | Me.Close()
29 | End If
30 | Case Keys.Escape
31 | Me.DialogResult = DialogResult.Cancel
32 | Me.Close()
33 | End Select
34 | End Sub
35 |
36 | Private Sub txtConsole_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtConsole.KeyPress
37 | 'Manually implement select all because multiline texboxes for some reason disable this functionality
38 | Select Case e.KeyChar
39 | Case ChrW(1)
40 | If My.Computer.Keyboard.CtrlKeyDown Then
41 | txtConsole.SelectAll()
42 | End If
43 | End Select
44 | End Sub
45 |
46 | '''
47 | ''' Sets the console textbox to display the current text, scrolled to the bottom
48 | '''
49 | Public Sub SetText(newText As String)
50 | If Me.InvokeRequired Then
51 | Me.Invoke(Sub() SetText(newText))
52 | Else
53 | txtConsole.Text = newText
54 | txtConsole.SelectionStart = newText.Length
55 | txtConsole.ScrollToCaret()
56 | End If
57 | End Sub
58 |
59 | Private Sub ManualEntryForm_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
60 | If Persistent AndAlso e.CloseReason = CloseReason.UserClosing Then
61 | Me.Hide()
62 | e.Cancel = True
63 | End If
64 | End Sub
65 | End Class
--------------------------------------------------------------------------------
/SimpleVideoEditor/ManualEntryForm.Designer.vb:
--------------------------------------------------------------------------------
1 |
2 | Partial Class ManualEntryForm
3 | Inherits System.Windows.Forms.Form
4 |
5 | 'Form overrides dispose to clean up the component list.
6 |
7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean)
8 | Try
9 | If disposing AndAlso components IsNot Nothing Then
10 | components.Dispose()
11 | End If
12 | Finally
13 | MyBase.Dispose(disposing)
14 | End Try
15 | End Sub
16 |
17 | 'Required by the Windows Form Designer
18 | Private components As System.ComponentModel.IContainer
19 |
20 | 'NOTE: The following procedure is required by the Windows Form Designer
21 | 'It can be modified using the Windows Form Designer.
22 | 'Do not modify it using the code editor.
23 |
24 | Private Sub InitializeComponent()
25 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(ManualEntryForm))
26 | Me.txtConsole = New System.Windows.Forms.TextBox()
27 | Me.SuspendLayout()
28 | '
29 | 'txtConsole
30 | '
31 | Me.txtConsole.BackColor = System.Drawing.Color.Black
32 | Me.txtConsole.Dock = System.Windows.Forms.DockStyle.Fill
33 | Me.txtConsole.Font = New System.Drawing.Font("Consolas", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
34 | Me.txtConsole.ForeColor = System.Drawing.Color.White
35 | Me.txtConsole.Location = New System.Drawing.Point(0, 0)
36 | Me.txtConsole.Multiline = True
37 | Me.txtConsole.Name = "txtConsole"
38 | Me.txtConsole.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
39 | Me.txtConsole.Size = New System.Drawing.Size(344, 161)
40 | Me.txtConsole.TabIndex = 0
41 | '
42 | 'ManualEntryForm
43 | '
44 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
45 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
46 | Me.ClientSize = New System.Drawing.Size(344, 161)
47 | Me.Controls.Add(Me.txtConsole)
48 | Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
49 | Me.Name = "ManualEntryForm"
50 | Me.Text = "Manual Entry"
51 | Me.ResumeLayout(False)
52 | Me.PerformLayout()
53 |
54 | End Sub
55 |
56 | Friend WithEvents txtConsole As TextBox
57 | End Class
58 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/SimpleVideoEditor/Data/SpecialOutputProperties.vb:
--------------------------------------------------------------------------------
1 | Imports System.Text.RegularExpressions
2 |
3 | Public Class SpecialOutputProperties
4 | Implements ICloneable
5 |
6 | Public Decimate As Boolean
7 | Public FPS As Double
8 | Public ColorKey As Color
9 | Public PlaybackSpeed As Double = 1
10 | Public PlaybackVolume As Double = 1
11 | Public QScale As Double
12 | Public Rotation As System.Drawing.RotateFlipType = RotateFlipType.RotateNoneFlipNone 'Keeps track of how the user wants to rotate the image
13 | Public Subtitles As String = ""
14 | Public BakeSubs As Boolean = True
15 | Public Trim As TrimData = Nothing
16 | Public Crop As Rectangle?
17 | Public VerticalResolution As Integer
18 | '''
19 | ''' Angle of rotation in degrees
20 | '''
21 | '''
22 | Public Property RotationAngle As Integer
23 | Get
24 | Select Case Rotation
25 | Case RotateFlipType.RotateNoneFlipNone
26 | Return 0
27 | Case RotateFlipType.Rotate90FlipNone
28 | Return 90
29 | Case RotateFlipType.Rotate180FlipNone
30 | Return 180
31 | Case RotateFlipType.Rotate270FlipNone
32 | Return 270
33 | Case Else
34 | Return 0
35 | End Select
36 | End Get
37 | Set(value As Integer)
38 | Select Case value
39 | Case 0
40 | Rotation = RotateFlipType.RotateNoneFlipNone
41 | Case 90
42 | Rotation = RotateFlipType.Rotate90FlipNone
43 | Case 180
44 | Rotation = RotateFlipType.Rotate180FlipNone
45 | Case 270
46 | Rotation = RotateFlipType.Rotate270FlipNone
47 | Case Else
48 | Rotation = 0
49 | End Select
50 | End Set
51 | End Property
52 |
53 | '''
54 | ''' Sets the vertical resolution based on a string like 120p, setting to 0 otherwise
55 | '''
56 | '''
57 | Public Sub SetResolution(resolutionString As String)
58 | Dim resMatch As Match = Regex.Match(resolutionString, "\d+")
59 | If resMatch.Success Then
60 | VerticalResolution = Integer.Parse(resMatch.Value)
61 | Else
62 | VerticalResolution = 0
63 | End If
64 | End Sub
65 |
66 |
67 | Public Function Clone() As Object Implements ICloneable.Clone
68 | Return Me.MemberwiseClone
69 | End Function
70 | End Class
71 |
72 | Public Class TrimData
73 | Public StartFrame As Integer
74 | Public EndFrame As Integer
75 | Public StartPTS As Decimal
76 | Public EndPTS As Decimal
77 | End Class
--------------------------------------------------------------------------------
/SimpleVideoEditor/My Project/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/SimpleVideoEditor/Resources/BatchTemplate.bat:
--------------------------------------------------------------------------------
1 | @ECHO off
2 | ECHO This batch script was generated by Simple Video Editor ?>
3 | ECHO #Batch inputs
4 | ECHO WorkingDir= %cd%
5 | ECHO BatchDir= %~dp0
6 | ECHO File/Dir= %1
7 | ECHO.
8 | rem Set name of subdirectory to create and use for outputs generated by the batch script
9 | set outDirectoryName=SHINY
10 |
11 | rem Path replaced by SVE based on where SVE was ran from
12 | set ffmpegPath="?>"
13 | rem Check a few places where ffmpeg might be just in case SVE is moved, or the file is shared to others
14 | ECHO #Checking for ffmpeg.exe
15 | if exist "%~dp0..\ffmpeg.exe" (
16 | ECHO Detected ffmpeg in script parent folder
17 | set ffmpegPath="%~dp0..\ffmpeg.exe"
18 | )
19 | rem Path for SVE users using program files directory
20 | if exist "C:\Program Files\Simple Video Editor\ffmpeg.exe" (
21 | ECHO Detected ffmpeg in SVE installation
22 | set ffmpegPath="C:\Program Files\Simple Video Editor\ffmpeg.exe"
23 | )
24 | rem Path for people who put the exe in the same folder as the scripts
25 | if exist "ffmpeg.exe" (
26 | ECHO Detected ffmpeg in working directory
27 | set ffmpegPath="ffmpeg.exe"
28 | )
29 | ECHO.
30 |
31 | rem Warn inexperienced users who double click the file about how to use it correctly
32 | if [%1] == [] goto missingInput
33 | goto hasInput
34 |
35 | :missingInput
36 | ECHO No source file/directory was provided
37 | ECHO Please drag and drop source video(s) or a directory containing source videos onto the .bat file, or provide it as a command line argument
38 | pause
39 | rem Exit script and set error level
40 | exit /b 2
41 |
42 | :hasInput
43 | rem Check if the input is a directory or file
44 | set Attribute=%~a1
45 | set DirectoryAttribute=%Attribute:~0,1%
46 | if /I "%DirectoryAttribute%"=="d" goto isDirectory
47 | goto isFile
48 |
49 | :isDirectory
50 | ECHO Creating output directory %~1\%outDirectoryName%
51 | mkdir "%~1\%outDirectoryName%"
52 | ECHO.
53 | rem Loop over each file in the directory, applying the SVE produced script to each file
54 | rem Contents should have input replaced with %%F by SVE, and output replaced with a new directory like "%~dp1\%outDirectoryName%\%%~nF.ext"
55 | ECHO #Applying script to all files in "%~1"
56 | SETLOCAL EnableDelayedExpansion
57 | for /f "delims=" %%F in ('dir /b /a-d %~1\*?> ^| sort') do (
58 | ECHO %%~F
59 | call %ffmpegPath% -v error -stats ?>
60 | )
61 | ENDLOCAL
62 | ECHO.
63 | goto endProcess
64 |
65 | :isFile
66 | ECHO Creating output directory %~dp1\%outDirectoryName%
67 | mkdir "%~dp1\%outDirectoryName%"
68 | ECHO.
69 | rem Apply SVE produced script to each file argument one by one
70 | rem Contents should have input replaced with "%%~F" by SVE, and output like "%%~dpF\%outDirectoryName%\%%~nF.ext"
71 | SETLOCAL EnableDelayedExpansion
72 | ECHO #Applying script to all arguments
73 | for %%F in (%*) do (
74 | ECHO %%~F
75 | call %ffmpegPath% -v error -stats ?>
76 | )
77 | ENDLOCAL
78 | ECHO.
79 |
80 | :endProcess
81 | ECHO Process finished, you may close this window.
82 | pause
--------------------------------------------------------------------------------
/SimpleVideoEditor/My Project/Settings.Designer.vb:
--------------------------------------------------------------------------------
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 | Option Strict On
12 | Option Explicit On
13 |
14 |
15 | Namespace My
16 |
17 | _
20 | Partial Friend NotInheritable Class MySettings
21 | Inherits Global.System.Configuration.ApplicationSettingsBase
22 |
23 | Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
24 |
25 | #Region "My.Settings Auto-Save Functionality"
26 | #If _MyType = "WindowsForms" Then
27 | Private Shared addedHandler As Boolean
28 |
29 | Private Shared addedHandlerLockObject As New Object
30 |
31 | _
32 | Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
33 | If My.Application.SaveMySettingsOnExit Then
34 | My.Settings.Save()
35 | End If
36 | End Sub
37 | #End If
38 | #End Region
39 |
40 | Public Shared ReadOnly Property [Default]() As MySettings
41 | Get
42 |
43 | #If _MyType = "WindowsForms" Then
44 | If Not addedHandler Then
45 | SyncLock addedHandlerLockObject
46 | If Not addedHandler Then
47 | AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
48 | addedHandler = True
49 | End If
50 | End SyncLock
51 | End If
52 | #End If
53 | Return defaultInstance
54 | End Get
55 | End Property
56 | End Class
57 | End Namespace
58 |
59 | Namespace My
60 |
61 | _
64 | Friend Module MySettingsProperty
65 |
66 | _
67 | Friend ReadOnly Property Settings() As Global.SimpleVideoEditor.My.MySettings
68 | Get
69 | Return Global.SimpleVideoEditor.My.MySettings.Default
70 | End Get
71 | End Property
72 | End Module
73 | End Namespace
74 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.sln.docstates
8 |
9 | # Build results
10 | [Dd]ebug/
11 | [Dd]ebugPublic/
12 | [Rr]elease/
13 | x64/
14 | build/
15 | bld/
16 | [Bb]in/
17 | [Oo]bj/
18 |
19 | # Roslyn cache directories
20 | *.ide/
21 |
22 | # MSTest test Results
23 | [Tt]est[Rr]esult*/
24 | [Bb]uild[Ll]og.*
25 |
26 | #NUNIT
27 | *.VisualState.xml
28 | TestResult.xml
29 |
30 | # Build Results of an ATL Project
31 | [Dd]ebugPS/
32 | [Rr]eleasePS/
33 | dlldata.c
34 |
35 | *_i.c
36 | *_p.c
37 | *_i.h
38 | *.ilk
39 | *.meta
40 | *.obj
41 | *.pch
42 | *.pdb
43 | *.pgc
44 | *.pgd
45 | *.rsp
46 | *.sbr
47 | *.tlb
48 | *.tli
49 | *.tlh
50 | *.tmp
51 | *.tmp_proj
52 | *.log
53 | *.vspscc
54 | *.vssscc
55 | .builds
56 | *.pidb
57 | *.svclog
58 | *.scc
59 |
60 | # Chutzpah Test files
61 | _Chutzpah*
62 |
63 | # Visual C++ cache files
64 | ipch/
65 | *.aps
66 | *.ncb
67 | *.opensdf
68 | *.sdf
69 | *.cachefile
70 |
71 | # Visual Studio profiler
72 | *.psess
73 | *.vsp
74 | *.vspx
75 |
76 | # TFS 2012 Local Workspace
77 | $tf/
78 |
79 | # Guidance Automation Toolkit
80 | *.gpState
81 |
82 | # ReSharper is a .NET coding add-in
83 | _ReSharper*/
84 | *.[Rr]e[Ss]harper
85 | *.DotSettings.user
86 |
87 | # JustCode is a .NET coding addin-in
88 | .JustCode
89 |
90 | # TeamCity is a build add-in
91 | _TeamCity*
92 |
93 | # DotCover is a Code Coverage Tool
94 | *.dotCover
95 |
96 | # NCrunch
97 | _NCrunch_*
98 | .*crunch*.local.xml
99 |
100 | # MightyMoose
101 | *.mm.*
102 | AutoTest.Net/
103 |
104 | # Web workbench (sass)
105 | .sass-cache/
106 |
107 | # Installshield output folder
108 | [Ee]xpress/
109 |
110 | # DocProject is a documentation generator add-in
111 | DocProject/buildhelp/
112 | DocProject/Help/*.HxT
113 | DocProject/Help/*.HxC
114 | DocProject/Help/*.hhc
115 | DocProject/Help/*.hhk
116 | DocProject/Help/*.hhp
117 | DocProject/Help/Html2
118 | DocProject/Help/html
119 |
120 | # Click-Once directory
121 | publish/
122 |
123 | # Publish Web Output
124 | *.[Pp]ublish.xml
125 | *.azurePubxml
126 | ## TODO: Comment the next line if you want to checkin your
127 | ## web deploy settings but do note that will include unencrypted
128 | ## passwords
129 | #*.pubxml
130 |
131 | # NuGet Packages Directory
132 | packages/*
133 | ## TODO: If the tool you use requires repositories.config
134 | ## uncomment the next line
135 | #!packages/repositories.config
136 |
137 | # Enable "build/" folder in the NuGet Packages folder since
138 | # NuGet packages use it for MSBuild targets.
139 | # This line needs to be after the ignore of the build folder
140 | # (and the packages folder if the line above has been uncommented)
141 | !packages/build/
142 |
143 | # Windows Azure Build Output
144 | csx/
145 | *.build.csdef
146 |
147 | # Windows Store app package directory
148 | AppPackages/
149 |
150 | # Others
151 | sql/
152 | *.Cache
153 | ClientBin/
154 | [Ss]tyle[Cc]op.*
155 | ~$*
156 | *~
157 | *.dbmdl
158 | *.dbproj.schemaview
159 | *.pfx
160 | *.publishsettings
161 | node_modules/
162 |
163 | # RIA/Silverlight projects
164 | Generated_Code/
165 |
166 | # Backup & report files from converting an old project file
167 | # to a newer Visual Studio version. Backup files are not needed,
168 | # because we have git ;-)
169 | _UpgradeReport_Files/
170 | Backup*/
171 | UpgradeLog*.XML
172 | UpgradeLog*.htm
173 |
174 | # SQL Server files
175 | *.mdf
176 | *.ldf
177 |
178 | # Business Intelligence projects
179 | *.rdl.data
180 | *.bim.layout
181 | *.bim_*.settings
182 |
183 | # Microsoft Fakes
184 | FakesAssemblies/
185 |
186 | # LightSwitch generated files
187 | GeneratedArtifacts/
188 | _Pvt_Extensions/
189 | ModelManifest.xml
190 | /.vs
191 | /Simple Video Editor.zip
192 | .vs/
193 |
--------------------------------------------------------------------------------
/SimpleVideoEditor/Controls/RichTextBoxPlus.vb:
--------------------------------------------------------------------------------
1 | Imports System.Runtime.CompilerServices
2 | Imports System.Runtime.InteropServices
3 |
4 | Public Class RichTextBoxPlus
5 | Inherits RichTextBox
6 |
7 | '''
8 | ''' Controls whether TextChanged or SelectionChanged will raise
9 | ''' Set false to allow non-signalling property sets
10 | '''
11 | Public EventsEnabled As Boolean = True
12 | Private Const WM_SETREDRAW As Integer = &HB
13 | Private Const WM_MOUSEACTIVATE As Integer = &H21
14 | Private Const WM_USER As Integer = &H400
15 | Private Const EM_GETEVENTMASK As Integer = WM_USER + 59
16 | Private Const EM_SETEVENTMASK As Integer = WM_USER + 69
17 | Private Const EM_GETSCROLLPOS As Integer = WM_USER + 221
18 | Private Const EM_SETSCROLLPOS As Integer = WM_USER + 222
19 | Private _ScrollPoint As Point
20 | Private _Painting As Boolean = True
21 | Private _EventMask As IntPtr
22 | Private _SuspendIndex As Integer = 0
23 | Private _SuspendLength As Integer = 0
24 |
25 |
26 |
27 | Private Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal wMsg As Int32, ByVal wParam As Int32, ByRef lParam As Point) As IntPtr
28 | End Function
29 |
30 | Protected Overrides Sub WndProc(ByRef m As Message)
31 | 'Fixes an issue where clicking on the textbox while the form that it lives on isn't in focus
32 | 'would only focus it, not change the selection
33 | If m.Msg = WM_MOUSEACTIVATE Then
34 | Me.Focus()
35 | End If
36 |
37 | MyBase.WndProc(m)
38 | End Sub
39 |
40 | 'See https://stackoverflow.com/questions/6547193/how-to-append-text-to-richtextbox-without-scrolling-and-losing-selection
41 |
42 | '''
43 | ''' Supress paint events and auto scrolling until EndUpdate is called
44 | '''
45 | Public Sub BeginUpdate()
46 | If _Painting Then
47 | _SuspendIndex = Me.SelectionStart
48 | _SuspendLength = Me.SelectionLength
49 | SendMessage(Me.Handle, EM_GETSCROLLPOS, 0, _ScrollPoint)
50 | SendMessage(Me.Handle, WM_SETREDRAW, 0, IntPtr.Zero)
51 | _EventMask = SendMessage(Me.Handle, EM_GETEVENTMASK, 0, IntPtr.Zero)
52 | _Painting = False
53 | End If
54 | End Sub
55 |
56 | '''
57 | ''' Resumes control painting, use after BeginUpdate
58 | '''
59 | Public Sub EndUpdate()
60 | If Not _Painting Then
61 | Me.[Select](_SuspendIndex, _SuspendLength)
62 | SendMessage(Me.Handle, EM_SETSCROLLPOS, 0, _ScrollPoint)
63 | SendMessage(Me.Handle, EM_SETEVENTMASK, 0, _EventMask)
64 | SendMessage(Me.Handle, WM_SETREDRAW, 1, IntPtr.Zero)
65 | _Painting = True
66 | Me.Invalidate()
67 | End If
68 | End Sub
69 |
70 | '''
71 | ''' Sets the text value of the control without signalling an event raise
72 | '''
73 | Public Sub SetText(newText As String)
74 | EventsEnabled = False
75 | Dim lastSelection As Integer = Me.SelectionStart
76 | Dim lastSelectionLength As Integer = Me.SelectionLength
77 | Me.Text = newText
78 | Me.SelectionStart = lastSelection
79 | Me.SelectionLength = lastSelectionLength
80 | EventsEnabled = True
81 | End Sub
82 |
83 | Protected Overrides Sub OnHandleCreated(e As EventArgs)
84 | MyBase.OnHandleCreated(e)
85 | 'Fixes a bug in RichTextbox that causes this property, even when false, to make selecting while dragging cursor select full words
86 | 'See https://stackoverflow.com/questions/3678620/c-sharp-richtextbox-selection-problem
87 | If Not MyBase.AutoWordSelection Then
88 | MyBase.AutoWordSelection = True
89 | MyBase.AutoWordSelection = False
90 | End If
91 | End Sub
92 |
93 | Protected Overrides Sub OnTextChanged(e As EventArgs)
94 | If Not EventsEnabled Then
95 | Exit Sub
96 | End If
97 | MyBase.OnTextChanged(e)
98 | End Sub
99 |
100 | Protected Overrides Sub OnSelectionChanged(e As EventArgs)
101 | If Not EventsEnabled Then
102 | Exit Sub
103 | End If
104 | MyBase.OnSelectionChanged(e)
105 | End Sub
106 |
107 |
108 | Private Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr
109 | End Function
110 | End Class
111 |
--------------------------------------------------------------------------------
/SimpleVideoEditor/Controls/ImageSwitch.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 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/SimpleVideoEditor/Controls/VideoSeeker.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 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/SimpleVideoEditor/Subtitle/SubRip.vb:
--------------------------------------------------------------------------------
1 | Imports System.Text
2 | Imports System.Text.RegularExpressions
3 |
4 | Public Class SubRip
5 | Public Shared SubRipMatcher As Regex = New Regex("(?\d*)\s*(?