This commit is contained in:
niksedk 2023-03-10 22:48:42 +01:00
parent d1bc24f83c
commit 5b7ac012ad
13 changed files with 1646 additions and 310 deletions

View File

@ -47,14 +47,14 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
byte[] buffer = { 0xEA, 0x22, 1, 0 }; // header
fs.Write(buffer, 0, buffer.Length);
int numberOfLines = subtitle.Paragraphs.Count;
var numberOfLines = subtitle.Paragraphs.Count;
fs.WriteByte((byte)(numberOfLines % 256)); // paragraphs - low byte
fs.WriteByte((byte)(numberOfLines / 256)); // paragraphs - high byte
buffer = new byte[] { 9, 0xA8, 0xAF, 0x4F }; // ?
fs.Write(buffer, 0, buffer.Length);
for (int i = 0; i < 118; i++)
for (var i = 0; i < 118; i++)
{
fs.WriteByte(0);
}
@ -62,11 +62,11 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
var dictionaryLatinCode = DicCodeLatin.ToLookup(pair => pair.Value, pair => pair.Key);
// paragraphs
for (int index = 0; index < subtitle.Paragraphs.Count; index++)
for (var index = 0; index < subtitle.Paragraphs.Count; index++)
{
var p = subtitle.Paragraphs[index];
var next = subtitle.GetParagraphOrDefault(index + 1);
string text = p.Text;
var text = p.Text;
var bufferShort = new byte[]
{
@ -166,8 +166,8 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
}
}
int length = textBytes.Count + 20;
long end = fs.Position + length;
var length = textBytes.Count + 20;
var end = fs.Position + length;
if (Configuration.Settings.SubtitleSettings.CheetahCaptionAlwayWriteEndTime || next == null || next.StartTime.TotalMilliseconds - p.EndTime.TotalMilliseconds >= 1500)
{
fs.WriteByte((byte)length);
@ -194,7 +194,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
fs.Write(bufferShort, 0, bufferShort.Length); // styles
}
foreach (byte b in textBytes) // text
foreach (var b in textBytes) // text
{
fs.WriteByte(b);
}
@ -224,8 +224,8 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
{
if (fileName.EndsWith(".cap", StringComparison.OrdinalIgnoreCase))
{
byte[] buffer = FileUtil.ReadAllBytesShared(fileName);
for (int i = 0; i < buffer.Length - 20; i++)
var buffer = FileUtil.ReadAllBytesShared(fileName);
for (var i = 0; i < buffer.Length - 20; i++)
{
if (buffer[i + 0] == 0xEA &&
buffer[i + 1] == 0x22 &&
@ -251,9 +251,9 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
{
subtitle.Paragraphs.Clear();
subtitle.Header = null;
byte[] buffer = FileUtil.ReadAllBytesShared(fileName);
var buffer = FileUtil.ReadAllBytesShared(fileName);
int i = 128;
var i = 128;
Paragraph last = null;
var sb = new StringBuilder();
while (i < buffer.Length - 16)
@ -261,7 +261,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
var p = new Paragraph();
int length = buffer[i];
int usedBytes = 20;
var usedBytes = 20;
p.StartTime = DecodeTimestamp(buffer, i + 2);
p.EndTime = DecodeTimestamp(buffer, i + 6);
@ -271,9 +271,9 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
usedBytes = 20 - 4;
}
int textLength = length - usedBytes;
int start = usedBytes - 1;
for (int j = 0; j < 4 && i + start - 1 < buffer.Length; j++)
var textLength = length - usedBytes;
var start = usedBytes - 1;
for (var j = 0; j < 4 && i + start - 1 < buffer.Length; j++)
{
if (buffer[i + start - 1] > 0x10)
{
@ -290,12 +290,12 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
}
sb.Clear();
int j = 0;
bool italics = false;
var j = 0;
var italics = false;
var encoding = Encoding.GetEncoding(1252);
while (j < textLength)
{
int index = i + start + j;
var index = i + start + j;
if (buffer[index] == 0)
{
if (italics)

View File

@ -471,7 +471,7 @@ namespace Nikse.SubtitleEdit.Forms
fileName += ".x264";
}
if (checkBoxCut.Enabled)
if (checkBoxCut.Enabled && checkBoxCut.Checked)
{
fileName += $".{numericUpDownCutFromHours.Text}-{numericUpDownCutFromMinutes.Text}-{numericUpDownCutFromSeconds.Text}_{numericUpDownCutToHours.Text}-{numericUpDownCutToMinutes.Text}-{numericUpDownCutToSeconds.Text}";
}

View File

@ -0,0 +1,511 @@

namespace Nikse.SubtitleEdit.Forms
{
partial class GenerateVideoWithSoftSubs
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.buttonGenerate = new System.Windows.Forms.Button();
this.buttonCancel = new System.Windows.Forms.Button();
this.labelInputVideoFile = new System.Windows.Forms.Label();
this.groupBoxSettings = new System.Windows.Forms.GroupBox();
this.buttonClear = new System.Windows.Forms.Button();
this.ButtonRemoveSubtitles = new System.Windows.Forms.Button();
this.ButtonMoveSubDown = new System.Windows.Forms.Button();
this.ButtonMoveSubUp = new System.Windows.Forms.Button();
this.buttonAddSubtitles = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.listViewSubtitles = new System.Windows.Forms.ListView();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.contextMenuSubtitles = new System.Windows.Forms.ContextMenuStrip(this.components);
this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItemStorageRemove = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItemStorageRemoveAll = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItemStorageMoveUp = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItemStorageMoveDown = new System.Windows.Forms.ToolStripMenuItem();
this.buttonOpenVideoFile = new System.Windows.Forms.Button();
this.textBoxInputFileName = new System.Windows.Forms.TextBox();
this.textBoxLog = new System.Windows.Forms.TextBox();
this.contextMenuStripRes = new System.Windows.Forms.ContextMenuStrip(this.components);
this.x2160ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.uHD3840x2160ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.k2048x1080ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.dCI2KScope2048x858ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.dCI2KFlat1998x1080ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.p1920x1080ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.x1080ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.p1280x720ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.x720ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.p848x480ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.pAL720x576ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.nTSC720x480ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.x352ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.x272ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.groupBoxSettings.SuspendLayout();
this.contextMenuSubtitles.SuspendLayout();
this.contextMenuStripRes.SuspendLayout();
this.SuspendLayout();
//
// buttonGenerate
//
this.buttonGenerate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonGenerate.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonGenerate.Location = new System.Drawing.Point(655, 570);
this.buttonGenerate.Name = "buttonGenerate";
this.buttonGenerate.Size = new System.Drawing.Size(121, 23);
this.buttonGenerate.TabIndex = 4;
this.buttonGenerate.Text = "Generate";
this.buttonGenerate.UseVisualStyleBackColor = true;
this.buttonGenerate.Click += new System.EventHandler(this.buttonOK_Click);
//
// buttonCancel
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonCancel.Location = new System.Drawing.Point(782, 570);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.TabIndex = 6;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
// labelInputVideoFile
//
this.labelInputVideoFile.AutoSize = true;
this.labelInputVideoFile.Location = new System.Drawing.Point(19, 28);
this.labelInputVideoFile.Name = "labelInputVideoFile";
this.labelInputVideoFile.Size = new System.Drawing.Size(76, 13);
this.labelInputVideoFile.TabIndex = 0;
this.labelInputVideoFile.Text = "Input video file";
//
// groupBoxSettings
//
this.groupBoxSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxSettings.Controls.Add(this.buttonClear);
this.groupBoxSettings.Controls.Add(this.ButtonRemoveSubtitles);
this.groupBoxSettings.Controls.Add(this.ButtonMoveSubDown);
this.groupBoxSettings.Controls.Add(this.ButtonMoveSubUp);
this.groupBoxSettings.Controls.Add(this.buttonAddSubtitles);
this.groupBoxSettings.Controls.Add(this.label1);
this.groupBoxSettings.Controls.Add(this.listViewSubtitles);
this.groupBoxSettings.Controls.Add(this.buttonOpenVideoFile);
this.groupBoxSettings.Controls.Add(this.textBoxInputFileName);
this.groupBoxSettings.Controls.Add(this.labelInputVideoFile);
this.groupBoxSettings.Location = new System.Drawing.Point(12, 13);
this.groupBoxSettings.Name = "groupBoxSettings";
this.groupBoxSettings.Size = new System.Drawing.Size(845, 551);
this.groupBoxSettings.TabIndex = 0;
this.groupBoxSettings.TabStop = false;
//
// buttonClear
//
this.buttonClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonClear.Location = new System.Drawing.Point(747, 155);
this.buttonClear.Name = "buttonClear";
this.buttonClear.Size = new System.Drawing.Size(92, 23);
this.buttonClear.TabIndex = 30;
this.buttonClear.Text = "Remove all";
this.buttonClear.UseVisualStyleBackColor = true;
this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click);
//
// ButtonRemoveSubtitles
//
this.ButtonRemoveSubtitles.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.ButtonRemoveSubtitles.Location = new System.Drawing.Point(748, 127);
this.ButtonRemoveSubtitles.Name = "ButtonRemoveSubtitles";
this.ButtonRemoveSubtitles.Size = new System.Drawing.Size(91, 23);
this.ButtonRemoveSubtitles.TabIndex = 29;
this.ButtonRemoveSubtitles.Text = "Remove";
this.ButtonRemoveSubtitles.UseVisualStyleBackColor = true;
this.ButtonRemoveSubtitles.Click += new System.EventHandler(this.ButtonRemoveSubtitles_Click);
//
// ButtonMoveSubDown
//
this.ButtonMoveSubDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.ButtonMoveSubDown.Location = new System.Drawing.Point(747, 211);
this.ButtonMoveSubDown.Name = "ButtonMoveSubDown";
this.ButtonMoveSubDown.Size = new System.Drawing.Size(92, 23);
this.ButtonMoveSubDown.TabIndex = 32;
this.ButtonMoveSubDown.Text = "Move down";
this.ButtonMoveSubDown.UseVisualStyleBackColor = true;
this.ButtonMoveSubDown.Click += new System.EventHandler(this.ButtonMoveSubDown_Click);
//
// ButtonMoveSubUp
//
this.ButtonMoveSubUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.ButtonMoveSubUp.Location = new System.Drawing.Point(748, 183);
this.ButtonMoveSubUp.Name = "ButtonMoveSubUp";
this.ButtonMoveSubUp.Size = new System.Drawing.Size(91, 23);
this.ButtonMoveSubUp.TabIndex = 31;
this.ButtonMoveSubUp.Text = "Move up";
this.ButtonMoveSubUp.UseVisualStyleBackColor = true;
this.ButtonMoveSubUp.Click += new System.EventHandler(this.ButtonMoveSubUp_Click);
//
// buttonAddSubtitles
//
this.buttonAddSubtitles.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonAddSubtitles.Location = new System.Drawing.Point(748, 98);
this.buttonAddSubtitles.Name = "buttonAddSubtitles";
this.buttonAddSubtitles.Size = new System.Drawing.Size(91, 23);
this.buttonAddSubtitles.TabIndex = 28;
this.buttonAddSubtitles.Text = "Add...";
this.buttonAddSubtitles.UseVisualStyleBackColor = true;
this.buttonAddSubtitles.Click += new System.EventHandler(this.buttonAddSubtitles_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(19, 82);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(47, 13);
this.label1.TabIndex = 26;
this.label1.Text = "Subtitles";
//
// listViewSubtitles
//
this.listViewSubtitles.AllowDrop = true;
this.listViewSubtitles.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listViewSubtitles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1,
this.columnHeader2,
this.columnHeader3,
this.columnHeader4,
this.columnHeader5});
this.listViewSubtitles.ContextMenuStrip = this.contextMenuSubtitles;
this.listViewSubtitles.FullRowSelect = true;
this.listViewSubtitles.HideSelection = false;
this.listViewSubtitles.Location = new System.Drawing.Point(22, 98);
this.listViewSubtitles.Name = "listViewSubtitles";
this.listViewSubtitles.Size = new System.Drawing.Size(719, 447);
this.listViewSubtitles.TabIndex = 25;
this.listViewSubtitles.UseCompatibleStateImageBehavior = false;
this.listViewSubtitles.View = System.Windows.Forms.View.Details;
this.listViewSubtitles.DragDrop += new System.Windows.Forms.DragEventHandler(this.listViewSubtitles_DragDrop);
this.listViewSubtitles.DragEnter += new System.Windows.Forms.DragEventHandler(this.listViewSubtitles_DragEnter);
//
// columnHeader1
//
this.columnHeader1.Text = "Type";
this.columnHeader1.Width = 120;
//
// columnHeader2
//
this.columnHeader2.Text = "Language";
this.columnHeader2.Width = 150;
//
// columnHeader3
//
this.columnHeader3.Text = "Default";
//
// columnHeader4
//
this.columnHeader4.Text = "Forced";
//
// columnHeader5
//
this.columnHeader5.Text = "File name";
this.columnHeader5.Width = 300;
//
// contextMenuSubtitles
//
this.contextMenuSubtitles.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.addToolStripMenuItem,
this.toolStripSeparator1,
this.toolStripMenuItemStorageRemove,
this.toolStripMenuItemStorageRemoveAll,
this.toolStripSeparator2,
this.toolStripMenuItemStorageMoveUp,
this.toolStripMenuItemStorageMoveDown});
this.contextMenuSubtitles.Name = "contextMenuStrip1";
this.contextMenuSubtitles.Size = new System.Drawing.Size(203, 126);
//
// addToolStripMenuItem
//
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
this.addToolStripMenuItem.Size = new System.Drawing.Size(202, 22);
this.addToolStripMenuItem.Text = "Add...";
this.addToolStripMenuItem.Click += new System.EventHandler(this.buttonAddSubtitles_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(199, 6);
//
// toolStripMenuItemStorageRemove
//
this.toolStripMenuItemStorageRemove.Name = "toolStripMenuItemStorageRemove";
this.toolStripMenuItemStorageRemove.ShortcutKeys = System.Windows.Forms.Keys.Delete;
this.toolStripMenuItemStorageRemove.Size = new System.Drawing.Size(202, 22);
this.toolStripMenuItemStorageRemove.Text = "Remove";
this.toolStripMenuItemStorageRemove.Click += new System.EventHandler(this.ButtonRemoveSubtitles_Click);
//
// toolStripMenuItemStorageRemoveAll
//
this.toolStripMenuItemStorageRemoveAll.Name = "toolStripMenuItemStorageRemoveAll";
this.toolStripMenuItemStorageRemoveAll.Size = new System.Drawing.Size(202, 22);
this.toolStripMenuItemStorageRemoveAll.Text = "Remove all";
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(199, 6);
//
// toolStripMenuItemStorageMoveUp
//
this.toolStripMenuItemStorageMoveUp.Name = "toolStripMenuItemStorageMoveUp";
this.toolStripMenuItemStorageMoveUp.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Up)));
this.toolStripMenuItemStorageMoveUp.Size = new System.Drawing.Size(202, 22);
this.toolStripMenuItemStorageMoveUp.Text = "Move up";
this.toolStripMenuItemStorageMoveUp.Click += new System.EventHandler(this.ButtonMoveSubUp_Click);
//
// toolStripMenuItemStorageMoveDown
//
this.toolStripMenuItemStorageMoveDown.Name = "toolStripMenuItemStorageMoveDown";
this.toolStripMenuItemStorageMoveDown.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Down)));
this.toolStripMenuItemStorageMoveDown.Size = new System.Drawing.Size(202, 22);
this.toolStripMenuItemStorageMoveDown.Text = "Move down";
this.toolStripMenuItemStorageMoveDown.Click += new System.EventHandler(this.ButtonMoveSubDown_Click);
//
// buttonOpenVideoFile
//
this.buttonOpenVideoFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOpenVideoFile.Location = new System.Drawing.Point(797, 44);
this.buttonOpenVideoFile.Name = "buttonOpenVideoFile";
this.buttonOpenVideoFile.Size = new System.Drawing.Size(33, 23);
this.buttonOpenVideoFile.TabIndex = 24;
this.buttonOpenVideoFile.Text = "...";
this.buttonOpenVideoFile.UseVisualStyleBackColor = true;
this.buttonOpenVideoFile.Click += new System.EventHandler(this.buttonOpenVideoFile_Click);
//
// textBoxInputFileName
//
this.textBoxInputFileName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBoxInputFileName.Location = new System.Drawing.Point(22, 44);
this.textBoxInputFileName.Name = "textBoxInputFileName";
this.textBoxInputFileName.ReadOnly = true;
this.textBoxInputFileName.Size = new System.Drawing.Size(769, 20);
this.textBoxInputFileName.TabIndex = 16;
//
// textBoxLog
//
this.textBoxLog.Location = new System.Drawing.Point(12, 13);
this.textBoxLog.Multiline = true;
this.textBoxLog.Name = "textBoxLog";
this.textBoxLog.ReadOnly = true;
this.textBoxLog.Size = new System.Drawing.Size(188, 26);
this.textBoxLog.TabIndex = 31;
//
// contextMenuStripRes
//
this.contextMenuStripRes.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.x2160ToolStripMenuItem,
this.uHD3840x2160ToolStripMenuItem,
this.k2048x1080ToolStripMenuItem,
this.dCI2KScope2048x858ToolStripMenuItem,
this.dCI2KFlat1998x1080ToolStripMenuItem,
this.p1920x1080ToolStripMenuItem,
this.x1080ToolStripMenuItem,
this.p1280x720ToolStripMenuItem,
this.x720ToolStripMenuItem,
this.p848x480ToolStripMenuItem,
this.pAL720x576ToolStripMenuItem,
this.nTSC720x480ToolStripMenuItem,
this.x352ToolStripMenuItem,
this.x272ToolStripMenuItem});
this.contextMenuStripRes.Name = "contextMenuStripRes";
this.contextMenuStripRes.Size = new System.Drawing.Size(204, 312);
//
// x2160ToolStripMenuItem
//
this.x2160ToolStripMenuItem.Name = "x2160ToolStripMenuItem";
this.x2160ToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
this.x2160ToolStripMenuItem.Text = "4K (4096x2160)";
//
// uHD3840x2160ToolStripMenuItem
//
this.uHD3840x2160ToolStripMenuItem.Name = "uHD3840x2160ToolStripMenuItem";
this.uHD3840x2160ToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
this.uHD3840x2160ToolStripMenuItem.Text = "UHD (3840x2160)";
//
// k2048x1080ToolStripMenuItem
//
this.k2048x1080ToolStripMenuItem.Name = "k2048x1080ToolStripMenuItem";
this.k2048x1080ToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
this.k2048x1080ToolStripMenuItem.Text = "2K (2048x1080)";
//
// dCI2KScope2048x858ToolStripMenuItem
//
this.dCI2KScope2048x858ToolStripMenuItem.Name = "dCI2KScope2048x858ToolStripMenuItem";
this.dCI2KScope2048x858ToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
this.dCI2KScope2048x858ToolStripMenuItem.Text = "DCI 2K Scope (2048x858)";
//
// dCI2KFlat1998x1080ToolStripMenuItem
//
this.dCI2KFlat1998x1080ToolStripMenuItem.Name = "dCI2KFlat1998x1080ToolStripMenuItem";
this.dCI2KFlat1998x1080ToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
this.dCI2KFlat1998x1080ToolStripMenuItem.Text = "DCI 2K Flat (1998x1080)";
//
// p1920x1080ToolStripMenuItem
//
this.p1920x1080ToolStripMenuItem.Name = "p1920x1080ToolStripMenuItem";
this.p1920x1080ToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
this.p1920x1080ToolStripMenuItem.Text = "1080p (1920x1080)";
//
// x1080ToolStripMenuItem
//
this.x1080ToolStripMenuItem.Name = "x1080ToolStripMenuItem";
this.x1080ToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
this.x1080ToolStripMenuItem.Text = "1440x1080";
//
// p1280x720ToolStripMenuItem
//
this.p1280x720ToolStripMenuItem.Name = "p1280x720ToolStripMenuItem";
this.p1280x720ToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
this.p1280x720ToolStripMenuItem.Text = "720p (1280x720)";
//
// x720ToolStripMenuItem
//
this.x720ToolStripMenuItem.Name = "x720ToolStripMenuItem";
this.x720ToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
this.x720ToolStripMenuItem.Text = "960x720";
//
// p848x480ToolStripMenuItem
//
this.p848x480ToolStripMenuItem.Name = "p848x480ToolStripMenuItem";
this.p848x480ToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
this.p848x480ToolStripMenuItem.Text = "480p (848x480)";
//
// pAL720x576ToolStripMenuItem
//
this.pAL720x576ToolStripMenuItem.Name = "pAL720x576ToolStripMenuItem";
this.pAL720x576ToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
this.pAL720x576ToolStripMenuItem.Text = "PAL (720x576)";
//
// nTSC720x480ToolStripMenuItem
//
this.nTSC720x480ToolStripMenuItem.Name = "nTSC720x480ToolStripMenuItem";
this.nTSC720x480ToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
this.nTSC720x480ToolStripMenuItem.Text = "NTSC (720x480)";
//
// x352ToolStripMenuItem
//
this.x352ToolStripMenuItem.Name = "x352ToolStripMenuItem";
this.x352ToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
this.x352ToolStripMenuItem.Text = "640x352";
//
// x272ToolStripMenuItem
//
this.x272ToolStripMenuItem.Name = "x272ToolStripMenuItem";
this.x272ToolStripMenuItem.Size = new System.Drawing.Size(203, 22);
this.x272ToolStripMenuItem.Text = "640x272";
//
// GenerateVideoWithSoftSubs
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(869, 605);
this.Controls.Add(this.groupBoxSettings);
this.Controls.Add(this.buttonGenerate);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.textBoxLog);
this.KeyPreview = true;
this.MinimizeBox = false;
this.Name = "GenerateVideoWithSoftSubs";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Generate video with soft subs";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.GenerateVideoWithHardSubs_FormClosing);
this.Shown += new System.EventHandler(this.GenerateVideoWithHardSubs_Shown);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.GenerateVideoWithSoftSubs_KeyDown);
this.groupBoxSettings.ResumeLayout(false);
this.groupBoxSettings.PerformLayout();
this.contextMenuSubtitles.ResumeLayout(false);
this.contextMenuStripRes.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button buttonGenerate;
private System.Windows.Forms.Button buttonCancel;
private System.Windows.Forms.Label labelInputVideoFile;
private System.Windows.Forms.GroupBox groupBoxSettings;
private System.Windows.Forms.TextBox textBoxLog;
private System.Windows.Forms.ContextMenuStrip contextMenuStripRes;
private System.Windows.Forms.ToolStripMenuItem x2160ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem uHD3840x2160ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem k2048x1080ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem dCI2KScope2048x858ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem dCI2KFlat1998x1080ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem p1920x1080ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem x1080ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem p1280x720ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem x720ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem p848x480ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem pAL720x576ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem nTSC720x480ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem x352ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem x272ToolStripMenuItem;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ListView listViewSubtitles;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.ColumnHeader columnHeader2;
private System.Windows.Forms.ColumnHeader columnHeader3;
private System.Windows.Forms.ColumnHeader columnHeader4;
private System.Windows.Forms.ColumnHeader columnHeader5;
private System.Windows.Forms.Button buttonOpenVideoFile;
private System.Windows.Forms.TextBox textBoxInputFileName;
private System.Windows.Forms.Button buttonClear;
private System.Windows.Forms.Button ButtonRemoveSubtitles;
private System.Windows.Forms.Button ButtonMoveSubDown;
private System.Windows.Forms.Button ButtonMoveSubUp;
private System.Windows.Forms.Button buttonAddSubtitles;
private System.Windows.Forms.ContextMenuStrip contextMenuSubtitles;
private System.Windows.Forms.ToolStripMenuItem addToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemStorageRemove;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemStorageRemoveAll;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemStorageMoveUp;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemStorageMoveDown;
}
}

View File

@ -0,0 +1,547 @@
using Nikse.SubtitleEdit.Core.Common;
using Nikse.SubtitleEdit.Core.SubtitleFormats;
using Nikse.SubtitleEdit.Logic;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.ContainerFormats.Matroska;
using Nikse.SubtitleEdit.Core.ContainerFormats.Mp4;
using Nikse.SubtitleEdit.Core.ContainerFormats.Mp4.Boxes;
namespace Nikse.SubtitleEdit.Forms
{
public sealed partial class GenerateVideoWithSoftSubs : Form
{
private bool _abort;
private readonly Subtitle _subtitle;
private VideoInfo _videoInfo;
private string _inputVideoFileName;
private static readonly Regex FrameFinderRegex = new Regex(@"[Ff]rame=\s*\d+", RegexOptions.Compiled);
private long _processedFrames;
private StringBuilder _log;
private List<VideoPreviewGeneratorSub> _softSubs = new List<VideoPreviewGeneratorSub>();
public string VideoFileName { get; private set; }
public long MillisecondsEncoding { get; private set; }
public GenerateVideoWithSoftSubs(Subtitle subtitle, string inputVideoFileName, VideoInfo videoInfo, bool setStartEndCut)
{
UiUtil.PreInitialize(this);
InitializeComponent();
UiUtil.FixFonts(this);
_videoInfo = videoInfo;
//TODO: Text = LanguageSettings.Current.GenerateVideoWithBurnedInSubs.Title;
_subtitle = new Subtitle(subtitle);
_inputVideoFileName = inputVideoFileName;
buttonGenerate.Text = LanguageSettings.Current.Watermark.Generate;
buttonCancel.Text = LanguageSettings.Current.General.Cancel;
LoadVideo(inputVideoFileName);
AddCurrentSubtitle();
}
private void AddCurrentSubtitle()
{
if (_subtitle != null && _subtitle.Paragraphs.Count > 0)
{
var dir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
Directory.CreateDirectory(dir);
var nameOnly = string.IsNullOrEmpty(_subtitle.FileName)
? "Untitled.srt"
: _subtitle.FileName;
var fileName = Path.Combine(dir, nameOnly);
AddListViewItem(fileName);
}
}
private void LoadVideo(string inputVideoFileName)
{
listViewSubtitles.Items.Clear();
_softSubs = new List<VideoPreviewGeneratorSub>();
if (!File.Exists(inputVideoFileName))
{
return;
}
var videoInfo = UiUtil.GetVideoInfo(inputVideoFileName);
if (videoInfo == null || videoInfo.TotalMilliseconds == 0)
{
return;
}
textBoxInputFileName.Text = inputVideoFileName;
_inputVideoFileName = inputVideoFileName;
_videoInfo = videoInfo;
using (var m = new MatroskaFile(inputVideoFileName))
{
if (m.IsValid)
{
foreach (var track in m.GetTracks().Where(p => p.IsSubtitle))
{
AddListViewItem(track);
}
return;
}
}
var mp4Parser = new MP4Parser(inputVideoFileName);
if (mp4Parser.Moov != null && mp4Parser.VideoResolution.X > 0)
{
foreach (var track in mp4Parser.GetSubtitleTracks())
{
AddListViewItem(track);
}
return;
}
}
private void AddListViewItem(Trak track)
{
if (!track.Mdia.IsTextSubtitle && !track.Mdia.IsClosedCaption && !track.Mdia.IsVobSubSubtitle)
{
return;
}
AddListViewItem(new VideoPreviewGeneratorSub
{
Name = track.Mdia.HandlerName,
Language = track.Mdia.Mdhd.Iso639ThreeLetterCode,
Format = track.Mdia.HandlerType,
IsNew = false,
IsForced = false,
IsDefault = false,
Tag = track,
});
}
private void AddListViewItem(VideoPreviewGeneratorSub sub)
{
var item = new ListViewItem
{
Tag = sub.Tag,
Text = sub.Name,
};
item.SubItems.Add(sub.Language);
item.SubItems.Add(sub.IsDefault.ToString(CultureInfo.InvariantCulture));
item.SubItems.Add(sub.IsForced.ToString(CultureInfo.InvariantCulture));
item.SubItems.Add(sub.FileName);
listViewSubtitles.Items.Add(item);
_softSubs.Add(sub);
}
private void AddListViewItem(MatroskaTrackInfo track)
{
AddListViewItem(new VideoPreviewGeneratorSub
{
Name = track.CodecId,
Language = track.Language,
IsNew = false,
IsForced = track.IsForced,
IsDefault = track.IsDefault,
Tag = track,
});
}
private void AddListViewItem(string fileName)
{
var subtitle = Subtitle.Parse(fileName);
if (subtitle == null || subtitle.Paragraphs.Count == 0)
{
return;
}
AddListViewItem(new VideoPreviewGeneratorSub
{
Name = Path.GetFileName(fileName),
Language = LanguageAutoDetect.AutoDetectGoogleLanguage(subtitle),
Format = subtitle.OriginalFormat.FriendlyName,
SubtitleFormat = subtitle.OriginalFormat,
IsNew = true,
IsForced = false,
IsDefault = false,
FileName = fileName,
});
}
private void buttonCancel_Click(object sender, EventArgs e)
{
_abort = true;
if (buttonGenerate.Enabled)
{
DialogResult = DialogResult.Cancel;
}
}
private void OutputHandler(object sendingProcess, DataReceivedEventArgs outLine)
{
if (string.IsNullOrWhiteSpace(outLine.Data))
{
return;
}
_log?.AppendLine(outLine.Data);
var match = FrameFinderRegex.Match(outLine.Data);
if (!match.Success)
{
return;
}
var arr = match.Value.Split('=');
if (arr.Length != 2)
{
return;
}
if (long.TryParse(arr[1].Trim(), out var f))
{
_processedFrames = f;
}
}
private void buttonOK_Click(object sender, EventArgs e)
{
if (_softSubs.Count == 0)
{
var res = MessageBox.Show("Generate video without any soft subs?", "", MessageBoxButtons.YesNoCancel);
if (res != DialogResult.OK)
{
return;
}
}
_log = new StringBuilder();
buttonGenerate.Enabled = false;
using (var saveDialog = new SaveFileDialog
{
FileName = SuggestNewVideoFileName(),
Filter = "Matroska|*.mkv|WebM|*.webm|MP4|*.mp4",
AddExtension = true
})
{
if (saveDialog.ShowDialog(this) != DialogResult.OK)
{
buttonGenerate.Enabled = true;
return;
}
VideoFileName = saveDialog.FileName;
}
if (File.Exists(VideoFileName))
{
try
{
File.Delete(VideoFileName);
}
catch
{
MessageBox.Show($"Cannot overwrite video file {VideoFileName} - probably in use!");
buttonGenerate.Enabled = true;
return;
}
}
_log = new StringBuilder();
_log.AppendLine("Target file name: " + VideoFileName);
groupBoxSettings.Enabled = false;
var stopWatch = Stopwatch.StartNew();
RunEmbedding();
MillisecondsEncoding = stopWatch.ElapsedMilliseconds;
groupBoxSettings.Enabled = true;
if (_abort)
{
DialogResult = DialogResult.Cancel;
return;
}
if (!File.Exists(VideoFileName) || new FileInfo(VideoFileName).Length == 0)
{
SeLogger.Error(Environment.NewLine + "Generate hard subbed video failed: " + Environment.NewLine + _log);
MessageBox.Show("Test");
//DialogResult = DialogResult.Cancel;
return;
}
DialogResult = DialogResult.OK;
}
private static string GetAssaFileName(string inputVideoFileName)
{
var path = Path.GetDirectoryName(inputVideoFileName);
for (var i = 0; i < int.MaxValue; i++)
{
var guidLetters = Guid.NewGuid().ToString().RemoveChar('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-');
var fileName = Path.Combine(path, $"{guidLetters}.ass");
if (!File.Exists(fileName))
{
return fileName;
}
}
return Path.Combine(path, "qwerty12.ass");
}
private string SuggestNewVideoFileName()
{
var fileName = Path.GetFileNameWithoutExtension(_inputVideoFileName);
fileName += ".embed";
return fileName.Replace(".", "_") + ".mp4";
}
private void RunEmbedding()
{
var process = GetFfmpegProcess(_inputVideoFileName, VideoFileName);
_log.AppendLine("ffmpeg arguments: " + process.StartInfo.Arguments);
process.Start();
process.BeginOutputReadLine();
process.BeginErrorReadLine();
while (!process.HasExited)
{
Application.DoEvents();
WindowsHelper.PreventStandBy();
System.Threading.Thread.Sleep(100);
if (_abort)
{
process.Kill();
}
var v = (int)_processedFrames;
}
}
private Process GetFfmpegProcess(string inputVideoFileName, string outputVideoFileName)
{
return VideoPreviewGenerator.GenerateSoftCodedVideoFile(
inputVideoFileName,
_softSubs,
outputVideoFileName,
OutputHandler);
}
private void GenerateVideoWithSoftSubs_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.F2)
{
if (textBoxLog.Visible)
{
textBoxLog.Visible = false;
}
else
{
textBoxLog.Visible = true;
textBoxLog.ScrollBars = ScrollBars.Both;
textBoxLog.BringToFront();
textBoxLog.Dock = DockStyle.Fill;
if (_log == null)
{
var log = new StringBuilder();
log.AppendLine("Video info width: " + _videoInfo.Width);
log.AppendLine("Video info width: " + _videoInfo.Height);
log.AppendLine("Video info total frames: " + _videoInfo.TotalFrames);
log.AppendLine("Video info total seconds: " + _videoInfo.TotalSeconds);
log.AppendLine();
log.AppendLine("MP4: ffmpeg " + GetFfmpegProcess(_inputVideoFileName, "output.mp4").StartInfo.Arguments);
log.AppendLine();
log.AppendLine("MKV: ffmpeg " + GetFfmpegProcess(_inputVideoFileName, "output.mkv").StartInfo.Arguments);
textBoxLog.Text = log.ToString();
}
else
{
textBoxLog.Text = _log.ToString();
}
}
e.SuppressKeyPress = true;
}
else if (e.KeyCode == Keys.Escape && _log == null)
{
DialogResult = DialogResult.Cancel;
e.SuppressKeyPress = true;
}
else if (e.KeyCode == Keys.Escape && _log == null)
{
DialogResult = DialogResult.Cancel;
e.SuppressKeyPress = true;
}
}
private void GenerateVideoWithHardSubs_FormClosing(object sender, FormClosingEventArgs e)
{
//Configuration.Settings.Tools.GenVideoFontName = comboBoxSubtitleFont.Text;
}
private void GenerateVideoWithHardSubs_Shown(object sender, EventArgs e)
{
if (!File.Exists(_inputVideoFileName))
{
MessageBox.Show(string.Format(LanguageSettings.Current.Main.FileNotFound, _inputVideoFileName));
buttonGenerate.Enabled = false;
return;
}
var targetFileSizeMb = (int)Math.Round(new FileInfo(_inputVideoFileName).Length / 1024.0 / 1024);
UiUtil.FixFonts(groupBoxSettings, 2000);
buttonGenerate.Focus();
}
private void buttonOpenVideoFile_Click(object sender, EventArgs e)
{
using (var openFileDialog1 = new OpenFileDialog())
{
openFileDialog1.Title = LanguageSettings.Current.General.OpenVideoFile;
openFileDialog1.FileName = string.Empty;
openFileDialog1.Filter = UiUtil.GetVideoFileFilter(false);
openFileDialog1.FileName = string.Empty;
if (openFileDialog1.ShowDialog() != DialogResult.OK)
{
return;
}
LoadVideo(openFileDialog1.FileName);
}
}
private void buttonAddSubtitles_Click(object sender, EventArgs e)
{
using (var openFileDialog1 = new OpenFileDialog())
{
openFileDialog1.Title = LanguageSettings.Current.General.OpenSubtitle;
openFileDialog1.FileName = string.Empty;
openFileDialog1.Filter = UiUtil.SubtitleExtensionFilter.Value;
openFileDialog1.FileName = string.Empty;
openFileDialog1.Multiselect = true;
if (openFileDialog1.ShowDialog() != DialogResult.OK)
{
return;
}
foreach (var fileName in openFileDialog1.FileNames)
{
AddListViewItem(fileName);
}
}
}
private void listViewSubtitles_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop, false))
{
e.Effect = DragDropEffects.All;
}
}
private void listViewSubtitles_DragDrop(object sender, DragEventArgs e)
{
try
{
var fileNames = (string[])e.Data.GetData(DataFormats.FileDrop);
foreach (var fileName in fileNames)
{
if (!FileUtil.IsDirectory(fileName))
{
AddListViewItem(fileName);
}
}
}
finally
{
}
}
private void ButtonRemoveSubtitles_Click(object sender, EventArgs e)
{
if (listViewSubtitles.Items.Count <= 0)
{
return;
}
}
private void buttonClear_Click(object sender, EventArgs e)
{
listViewSubtitles.Items.Clear();
_softSubs.Clear();
}
private void MoveUp(ListView listView)
{
if (listView.SelectedItems.Count != 1)
{
return;
}
var idx = listView.SelectedItems[0].Index;
if (idx == 0)
{
return;
}
var item = listView.SelectedItems[0];
listView.Items.RemoveAt(idx);
var style = _softSubs[idx];
_softSubs.RemoveAt(idx);
_softSubs.Insert(idx - 1, style);
idx--;
listView.Items.Insert(idx, item);
}
private void MoveDown(ListView listView)
{
if (listView.SelectedItems.Count != 1)
{
return;
}
var idx = listView.SelectedItems[0].Index;
if (idx >= listView.Items.Count - 1)
{
return;
}
var item = listView.SelectedItems[0];
listView.Items.RemoveAt(idx);
var style = _softSubs[idx];
_softSubs.RemoveAt(idx);
_softSubs.Insert(idx + 1, style);
idx++;
listView.Items.Insert(idx, item);
}
private void ButtonMoveSubUp_Click(object sender, EventArgs e)
{
MoveUp(listViewSubtitles);
}
private void ButtonMoveSubDown_Click(object sender, EventArgs e)
{
MoveDown(listViewSubtitles);
}
}
}

View File

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="contextMenuSubtitles.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>272, 17</value>
</metadata>
<metadata name="contextMenuStripRes.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>104, 17</value>
</metadata>
</root>

View File

@ -40,9 +40,9 @@ namespace Nikse.SubtitleEdit.Forms
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
Nikse.SubtitleEdit.Core.Common.TimeCode timeCode3 = new Nikse.SubtitleEdit.Core.Common.TimeCode();
Nikse.SubtitleEdit.Core.Common.TimeCode timeCode1 = new Nikse.SubtitleEdit.Core.Common.TimeCode();
Nikse.SubtitleEdit.Core.Common.TimeCode timeCode2 = new Nikse.SubtitleEdit.Core.Common.TimeCode();
Nikse.SubtitleEdit.Core.Common.TimeCode timeCode4 = new Nikse.SubtitleEdit.Core.Common.TimeCode();
Nikse.SubtitleEdit.Core.Common.TimeCode timeCode5 = new Nikse.SubtitleEdit.Core.Common.TimeCode();
Nikse.SubtitleEdit.Core.Common.TimeCode timeCode6 = new Nikse.SubtitleEdit.Core.Common.TimeCode();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.labelStatus = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripSelected = new System.Windows.Forms.ToolStripStatusLabel();
@ -352,6 +352,7 @@ namespace Nikse.SubtitleEdit.Forms
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
this.groupBoxVideo = new System.Windows.Forms.GroupBox();
this.labelNextWord = new System.Windows.Forms.Label();
this.audioVisualizer = new Nikse.SubtitleEdit.Controls.AudioVisualizer();
this.checkBoxSyncListViewWithVideoWhilePlaying = new System.Windows.Forms.CheckBox();
this.labelVideoInfo = new System.Windows.Forms.Label();
this.trackBarWaveformPosition = new System.Windows.Forms.TrackBar();
@ -387,6 +388,7 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonPlayCurrent = new System.Windows.Forms.Button();
this.buttonPlayNext = new System.Windows.Forms.Button();
this.tabPageCreate = new System.Windows.Forms.TabPage();
this.timeUpDownVideoPosition = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.buttonGotoSub = new System.Windows.Forms.Button();
this.buttonBeforeText = new System.Windows.Forms.Button();
this.buttonSetEnd = new System.Windows.Forms.Button();
@ -404,6 +406,7 @@ namespace Nikse.SubtitleEdit.Forms
this.labelVideoPosition = new System.Windows.Forms.Label();
this.buttonSecBack1 = new System.Windows.Forms.Button();
this.tabPageAdjust = new System.Windows.Forms.TabPage();
this.timeUpDownVideoPositionAdjust = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.buttonAdjustSetEndTime = new System.Windows.Forms.Button();
this.buttonSetEndAndGoToNext = new System.Windows.Forms.Button();
this.buttonSetStartAndOffsetRest = new System.Windows.Forms.Button();
@ -456,6 +459,7 @@ namespace Nikse.SubtitleEdit.Forms
this.splitContainerMain = new System.Windows.Forms.SplitContainer();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainerListViewAndText = new System.Windows.Forms.SplitContainer();
this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
this.imageListBookmarks = new System.Windows.Forms.ImageList(this.components);
this.groupBoxEdit = new System.Windows.Forms.GroupBox();
this.pictureBoxRecord = new System.Windows.Forms.PictureBox();
@ -474,6 +478,7 @@ namespace Nikse.SubtitleEdit.Forms
this.labelTextOriginalLineLengths = new System.Windows.Forms.Label();
this.labelOriginalText = new System.Windows.Forms.Label();
this.labelText = new System.Windows.Forms.Label();
this.textBoxListViewTextOriginal = new Nikse.SubtitleEdit.Controls.SETextBox();
this.contextMenuStripTextBoxListView = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripSeparatorSpellCheckSuggestions = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItemSpellCheckSkipOnce = new System.Windows.Forms.ToolStripMenuItem();
@ -528,10 +533,12 @@ namespace Nikse.SubtitleEdit.Forms
this.labelTextLineTotal = new System.Windows.Forms.Label();
this.labelCharactersPerSecond = new System.Windows.Forms.Label();
this.buttonUnBreak = new System.Windows.Forms.Button();
this.timeUpDownStartTime = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.numericUpDownDuration = new System.Windows.Forms.NumericUpDown();
this.buttonPrevious = new System.Windows.Forms.Button();
this.buttonNext = new System.Windows.Forms.Button();
this.labelStartTime = new System.Windows.Forms.Label();
this.textBoxListViewText = new Nikse.SubtitleEdit.Controls.SETextBox();
this.labelDuration = new System.Windows.Forms.Label();
this.labelAutoDuration = new System.Windows.Forms.Label();
this.textBoxSource = new System.Windows.Forms.TextBox();
@ -554,6 +561,7 @@ namespace Nikse.SubtitleEdit.Forms
this.startOfLefttorightOverrideLROToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.startOfRighttoleftOverrideRLOToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panelVideoPlayer = new System.Windows.Forms.Panel();
this.mediaPlayer = new Nikse.SubtitleEdit.Controls.VideoPlayerContainer();
this.contextMenuStripEmpty = new System.Windows.Forms.ContextMenuStrip(this.components);
this.insertLineToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.aSSStylesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -562,14 +570,7 @@ namespace Nikse.SubtitleEdit.Forms
this.timerOriginalTextUndo = new System.Windows.Forms.Timer(this.components);
this.contextMenuStripShowVideoControls = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripMenuItemShowVideoControls = new System.Windows.Forms.ToolStripMenuItem();
this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
this.textBoxListViewTextOriginal = new Nikse.SubtitleEdit.Controls.SETextBox();
this.timeUpDownStartTime = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.textBoxListViewText = new Nikse.SubtitleEdit.Controls.SETextBox();
this.mediaPlayer = new Nikse.SubtitleEdit.Controls.VideoPlayerContainer();
this.audioVisualizer = new Nikse.SubtitleEdit.Controls.AudioVisualizer();
this.timeUpDownVideoPosition = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.timeUpDownVideoPositionAdjust = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.generateVideoWithSoftcodedSubtitlesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip1.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout();
@ -2218,6 +2219,7 @@ namespace Nikse.SubtitleEdit.Forms
this.toolStripMenuItemListShotChanges,
this.toolStripMenuItemAddWaveformBatch,
this.generateBlankVideoToolStripMenuItem,
this.generateVideoWithSoftcodedSubtitlesToolStripMenuItem,
this.generateVideoWithHardcodedSubtitleToolStripMenuItem,
this.videoaudioToTextToolStripMenuItem,
this.audioToTextWhisperTolStripMenuItem,
@ -3223,6 +3225,55 @@ namespace Nikse.SubtitleEdit.Forms
this.labelNextWord.Text = "Next: xxx";
this.labelNextWord.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// audioVisualizer
//
this.audioVisualizer.AllowDrop = true;
this.audioVisualizer.AllowNewSelection = true;
this.audioVisualizer.AllowOverlap = false;
this.audioVisualizer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.audioVisualizer.BackColor = System.Drawing.Color.Black;
this.audioVisualizer.BackgroundColor = System.Drawing.Color.Black;
this.audioVisualizer.Chapters = null;
this.audioVisualizer.ChaptersColor = System.Drawing.Color.Empty;
this.audioVisualizer.ClosenessForBorderSelection = 15;
this.audioVisualizer.Color = System.Drawing.Color.GreenYellow;
this.audioVisualizer.CursorColor = System.Drawing.Color.Empty;
this.audioVisualizer.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
this.audioVisualizer.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(155)))), ((int)(((byte)(155)))));
this.audioVisualizer.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(18)))));
this.audioVisualizer.InsertAtVideoPositionShortcut = System.Windows.Forms.Keys.Insert;
this.audioVisualizer.Location = new System.Drawing.Point(472, 32);
this.audioVisualizer.Margin = new System.Windows.Forms.Padding(0);
this.audioVisualizer.MouseWheelScrollUpIsForward = true;
this.audioVisualizer.Move100MsLeft = System.Windows.Forms.Keys.None;
this.audioVisualizer.Move100MsRight = System.Windows.Forms.Keys.None;
this.audioVisualizer.MoveOneSecondLeft = System.Windows.Forms.Keys.None;
this.audioVisualizer.MoveOneSecondRight = System.Windows.Forms.Keys.None;
this.audioVisualizer.Name = "audioVisualizer";
this.audioVisualizer.NewSelectionParagraph = null;
this.audioVisualizer.ParagraphColor = System.Drawing.Color.LimeGreen;
this.audioVisualizer.SelectedColor = System.Drawing.Color.Red;
this.audioVisualizer.ShotChanges = ((System.Collections.Generic.List<double>)(resources.GetObject("audioVisualizer.ShotChanges")));
this.audioVisualizer.ShowGridLines = true;
this.audioVisualizer.ShowSpectrogram = false;
this.audioVisualizer.ShowWaveform = true;
this.audioVisualizer.Size = new System.Drawing.Size(499, 229);
this.audioVisualizer.StartPositionSeconds = 0D;
this.audioVisualizer.TabIndex = 6;
this.audioVisualizer.TextBold = true;
this.audioVisualizer.TextColor = System.Drawing.Color.Gray;
this.audioVisualizer.TextSize = 9F;
this.audioVisualizer.VerticalZoomFactor = 1D;
this.audioVisualizer.WaveformNotLoadedText = "Click to add waveform";
this.audioVisualizer.WavePeaks = null;
this.audioVisualizer.ZoomFactor = 1D;
this.audioVisualizer.Click += new System.EventHandler(this.AudioWaveform_Click);
this.audioVisualizer.DragDrop += new System.Windows.Forms.DragEventHandler(this.AudioWaveformDragDrop);
this.audioVisualizer.DragEnter += new System.Windows.Forms.DragEventHandler(this.AudioWaveformDragEnter);
this.audioVisualizer.MouseEnter += new System.EventHandler(this.audioVisualizer_MouseEnter);
//
// checkBoxSyncListViewWithVideoWhilePlaying
//
this.checkBoxSyncListViewWithVideoWhilePlaying.AutoSize = true;
@ -3647,6 +3698,28 @@ namespace Nikse.SubtitleEdit.Forms
this.tabPageCreate.Text = "Create";
this.tabPageCreate.UseVisualStyleBackColor = true;
//
// timeUpDownVideoPosition
//
this.timeUpDownVideoPosition.AutoSize = true;
this.timeUpDownVideoPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownVideoPosition.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(30)))));
this.timeUpDownVideoPosition.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
this.timeUpDownVideoPosition.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(155)))), ((int)(((byte)(155)))));
this.timeUpDownVideoPosition.Location = new System.Drawing.Point(90, 190);
this.timeUpDownVideoPosition.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownVideoPosition.Name = "timeUpDownVideoPosition";
this.timeUpDownVideoPosition.Size = new System.Drawing.Size(113, 27);
this.timeUpDownVideoPosition.TabIndex = 12;
timeCode4.Hours = 0;
timeCode4.Milliseconds = 0;
timeCode4.Minutes = 0;
timeCode4.Seconds = 0;
timeCode4.TimeSpan = System.TimeSpan.Parse("00:00:00");
timeCode4.TotalMilliseconds = 0D;
timeCode4.TotalSeconds = 0D;
this.timeUpDownVideoPosition.TimeCode = timeCode4;
this.timeUpDownVideoPosition.UseVideoOffset = false;
//
// buttonGotoSub
//
this.buttonGotoSub.Location = new System.Drawing.Point(6, 58);
@ -3867,6 +3940,28 @@ namespace Nikse.SubtitleEdit.Forms
this.tabPageAdjust.Text = "Adjust";
this.tabPageAdjust.UseVisualStyleBackColor = true;
//
// timeUpDownVideoPositionAdjust
//
this.timeUpDownVideoPositionAdjust.AutoSize = true;
this.timeUpDownVideoPositionAdjust.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownVideoPositionAdjust.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(30)))));
this.timeUpDownVideoPositionAdjust.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
this.timeUpDownVideoPositionAdjust.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(155)))), ((int)(((byte)(155)))));
this.timeUpDownVideoPositionAdjust.Location = new System.Drawing.Point(90, 215);
this.timeUpDownVideoPositionAdjust.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownVideoPositionAdjust.Name = "timeUpDownVideoPositionAdjust";
this.timeUpDownVideoPositionAdjust.Size = new System.Drawing.Size(113, 27);
this.timeUpDownVideoPositionAdjust.TabIndex = 13;
timeCode5.Hours = 0;
timeCode5.Milliseconds = 0;
timeCode5.Minutes = 0;
timeCode5.Seconds = 0;
timeCode5.TimeSpan = System.TimeSpan.Parse("00:00:00");
timeCode5.TotalMilliseconds = 0D;
timeCode5.TotalSeconds = 0D;
this.timeUpDownVideoPositionAdjust.TimeCode = timeCode5;
this.timeUpDownVideoPositionAdjust.UseVideoOffset = false;
//
// buttonAdjustSetEndTime
//
this.buttonAdjustSetEndTime.Location = new System.Drawing.Point(6, 84);
@ -4367,6 +4462,39 @@ namespace Nikse.SubtitleEdit.Forms
this.splitContainerListViewAndText.TabIndex = 2;
this.splitContainerListViewAndText.VisibleChanged += new System.EventHandler(this.ListViewVisibleChanged);
//
// SubtitleListview1
//
this.SubtitleListview1.AllowColumnReorder = true;
this.SubtitleListview1.AllowDrop = true;
this.SubtitleListview1.ContextMenuStrip = this.contextMenuStripListView;
this.SubtitleListview1.Dock = System.Windows.Forms.DockStyle.Fill;
this.SubtitleListview1.FirstVisibleIndex = -1;
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.SubtitleListview1.FullRowSelect = true;
this.SubtitleListview1.GridLines = true;
this.SubtitleListview1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.SubtitleListview1.HideSelection = false;
this.SubtitleListview1.Location = new System.Drawing.Point(0, 0);
this.SubtitleListview1.Name = "SubtitleListview1";
this.SubtitleListview1.OwnerDraw = true;
this.SubtitleListview1.Size = new System.Drawing.Size(740, 105);
this.SubtitleListview1.StateImageList = this.imageListBookmarks;
this.SubtitleListview1.SubtitleFontBold = false;
this.SubtitleListview1.SubtitleFontName = "Tahoma";
this.SubtitleListview1.SubtitleFontSize = 8;
this.SubtitleListview1.TabIndex = 0;
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
this.SubtitleListview1.UseSyntaxColoring = true;
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
this.SubtitleListview1.SelectedIndexChanged += new System.EventHandler(this.SubtitleListview1_SelectedIndexChanged);
this.SubtitleListview1.DragDrop += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragDrop);
this.SubtitleListview1.DragEnter += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragEnter);
this.SubtitleListview1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SubtitleListview1KeyDown);
this.SubtitleListview1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SubtitleListview1_MouseDoubleClick);
this.SubtitleListview1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SubtitleListview1_MouseDown);
this.SubtitleListview1.MouseEnter += new System.EventHandler(this.SubtitleListview1_MouseEnter);
this.SubtitleListview1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.SubtitleListview1_MouseUp);
//
// imageListBookmarks
//
this.imageListBookmarks.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
@ -4575,6 +4703,43 @@ namespace Nikse.SubtitleEdit.Forms
this.labelText.TabIndex = 5;
this.labelText.Text = "Text";
//
// textBoxListViewTextOriginal
//
this.textBoxListViewTextOriginal.AllowDrop = true;
this.textBoxListViewTextOriginal.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBoxListViewTextOriginal.BackColor = System.Drawing.SystemColors.WindowFrame;
this.textBoxListViewTextOriginal.ContextMenuStrip = this.contextMenuStripTextBoxListView;
this.textBoxListViewTextOriginal.CurrentLanguage = "";
this.textBoxListViewTextOriginal.CurrentLineIndex = 0;
this.textBoxListViewTextOriginal.Enabled = false;
this.textBoxListViewTextOriginal.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold);
this.textBoxListViewTextOriginal.HideSelection = false;
this.textBoxListViewTextOriginal.IsDictionaryDownloaded = true;
this.textBoxListViewTextOriginal.IsSpellCheckerInitialized = false;
this.textBoxListViewTextOriginal.IsSpellCheckRequested = false;
this.textBoxListViewTextOriginal.IsWrongWord = false;
this.textBoxListViewTextOriginal.LanguageChanged = false;
this.textBoxListViewTextOriginal.Location = new System.Drawing.Point(946, 28);
this.textBoxListViewTextOriginal.Multiline = true;
this.textBoxListViewTextOriginal.Name = "textBoxListViewTextOriginal";
this.textBoxListViewTextOriginal.Padding = new System.Windows.Forms.Padding(1);
this.textBoxListViewTextOriginal.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Both;
this.textBoxListViewTextOriginal.SelectedText = "";
this.textBoxListViewTextOriginal.SelectionLength = 0;
this.textBoxListViewTextOriginal.SelectionStart = 0;
this.textBoxListViewTextOriginal.Size = new System.Drawing.Size(16, 84);
this.textBoxListViewTextOriginal.TabIndex = 33;
this.textBoxListViewTextOriginal.TextBoxFont = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold);
this.textBoxListViewTextOriginal.Visible = false;
this.textBoxListViewTextOriginal.TextChanged += new System.EventHandler(this.textBoxListViewTextOriginal_TextChanged);
this.textBoxListViewTextOriginal.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextOriginalKeyDown);
this.textBoxListViewTextOriginal.MouseClick += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextOriginalMouseClick);
this.textBoxListViewTextOriginal.Enter += new System.EventHandler(this.TextBoxListViewTextOriginalEnter);
this.textBoxListViewTextOriginal.KeyUp += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextOriginalKeyUp);
this.textBoxListViewTextOriginal.MouseMove += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextOriginalMouseMove);
//
// contextMenuStripTextBoxListView
//
this.contextMenuStripTextBoxListView.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -5016,6 +5181,28 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonUnBreak.UseVisualStyleBackColor = true;
this.buttonUnBreak.Click += new System.EventHandler(this.ButtonUnBreakClick);
//
// timeUpDownStartTime
//
this.timeUpDownStartTime.AutoSize = true;
this.timeUpDownStartTime.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownStartTime.BackColor = System.Drawing.SystemColors.Control;
this.timeUpDownStartTime.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
this.timeUpDownStartTime.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(155)))), ((int)(((byte)(155)))));
this.timeUpDownStartTime.Location = new System.Drawing.Point(8, 26);
this.timeUpDownStartTime.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
this.timeUpDownStartTime.Size = new System.Drawing.Size(113, 27);
this.timeUpDownStartTime.TabIndex = 0;
timeCode6.Hours = 0;
timeCode6.Milliseconds = 0;
timeCode6.Minutes = 0;
timeCode6.Seconds = 0;
timeCode6.TimeSpan = System.TimeSpan.Parse("00:00:00");
timeCode6.TotalMilliseconds = 0D;
timeCode6.TotalSeconds = 0D;
this.timeUpDownStartTime.TimeCode = timeCode6;
this.timeUpDownStartTime.UseVideoOffset = false;
//
// numericUpDownDuration
//
this.numericUpDownDuration.DecimalPlaces = 3;
@ -5069,6 +5256,43 @@ namespace Nikse.SubtitleEdit.Forms
this.labelStartTime.TabIndex = 3;
this.labelStartTime.Text = "Start time";
//
// textBoxListViewText
//
this.textBoxListViewText.AllowDrop = true;
this.textBoxListViewText.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBoxListViewText.BackColor = System.Drawing.SystemColors.WindowFrame;
this.textBoxListViewText.ContextMenuStrip = this.contextMenuStripTextBoxListView;
this.textBoxListViewText.CurrentLanguage = "";
this.textBoxListViewText.CurrentLineIndex = 0;
this.textBoxListViewText.Enabled = false;
this.textBoxListViewText.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold);
this.textBoxListViewText.HideSelection = false;
this.textBoxListViewText.IsDictionaryDownloaded = true;
this.textBoxListViewText.IsSpellCheckerInitialized = false;
this.textBoxListViewText.IsSpellCheckRequested = false;
this.textBoxListViewText.IsWrongWord = false;
this.textBoxListViewText.LanguageChanged = false;
this.textBoxListViewText.Location = new System.Drawing.Point(236, 28);
this.textBoxListViewText.Multiline = true;
this.textBoxListViewText.Name = "textBoxListViewText";
this.textBoxListViewText.Padding = new System.Windows.Forms.Padding(1);
this.textBoxListViewText.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Both;
this.textBoxListViewText.SelectedText = "";
this.textBoxListViewText.SelectionLength = 0;
this.textBoxListViewText.SelectionStart = 0;
this.textBoxListViewText.Size = new System.Drawing.Size(378, 84);
this.textBoxListViewText.TabIndex = 5;
this.textBoxListViewText.TextBoxFont = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold);
this.textBoxListViewText.TextChanged += new System.EventHandler(this.TextBoxListViewTextTextChanged);
this.textBoxListViewText.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextKeyDown);
this.textBoxListViewText.MouseClick += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextMouseClick);
this.textBoxListViewText.Enter += new System.EventHandler(this.TextBoxListViewTextEnter);
this.textBoxListViewText.KeyUp += new System.Windows.Forms.KeyEventHandler(this.textBoxListViewText_KeyUp);
this.textBoxListViewText.Leave += new System.EventHandler(this.textBoxListViewText_Leave);
this.textBoxListViewText.MouseMove += new System.Windows.Forms.MouseEventHandler(this.textBoxListViewText_MouseMove);
//
// labelDuration
//
this.labelDuration.AutoSize = true;
@ -5263,6 +5487,35 @@ namespace Nikse.SubtitleEdit.Forms
this.panelVideoPlayer.Size = new System.Drawing.Size(220, 246);
this.panelVideoPlayer.TabIndex = 5;
//
// mediaPlayer
//
this.mediaPlayer.AllowDrop = true;
this.mediaPlayer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.mediaPlayer.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18)))));
this.mediaPlayer.Chapters = null;
this.mediaPlayer.CurrentPosition = 0D;
this.mediaPlayer.FontSizeFactor = 1F;
this.mediaPlayer.LastParagraph = null;
this.mediaPlayer.Location = new System.Drawing.Point(0, 0);
this.mediaPlayer.Margin = new System.Windows.Forms.Padding(0);
this.mediaPlayer.Name = "mediaPlayer";
this.mediaPlayer.ShowFullscreenButton = true;
this.mediaPlayer.ShowMuteButton = true;
this.mediaPlayer.ShowStopButton = true;
this.mediaPlayer.Size = new System.Drawing.Size(219, 246);
this.mediaPlayer.SubtitleText = "";
this.mediaPlayer.TabIndex = 5;
this.mediaPlayer.TextRightToLeft = System.Windows.Forms.RightToLeft.No;
this.mediaPlayer.UsingFrontCenterAudioChannelOnly = false;
this.mediaPlayer.VideoHeight = 0;
this.mediaPlayer.VideoPlayer = null;
this.mediaPlayer.VideoWidth = 0;
this.mediaPlayer.Volume = 0D;
this.mediaPlayer.DragDrop += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragDrop);
this.mediaPlayer.DragEnter += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragEnter);
//
// contextMenuStripEmpty
//
this.contextMenuStripEmpty.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -5318,256 +5571,12 @@ namespace Nikse.SubtitleEdit.Forms
this.toolStripMenuItemShowVideoControls.Text = "Show video controls";
this.toolStripMenuItemShowVideoControls.Click += new System.EventHandler(this.toolStripMenuItemShowVideoControls_Click);
//
// SubtitleListview1
// generateVideoWithSoftcodedSubtitlesToolStripMenuItem
//
this.SubtitleListview1.AllowColumnReorder = true;
this.SubtitleListview1.AllowDrop = true;
this.SubtitleListview1.ContextMenuStrip = this.contextMenuStripListView;
this.SubtitleListview1.Dock = System.Windows.Forms.DockStyle.Fill;
this.SubtitleListview1.FirstVisibleIndex = -1;
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.SubtitleListview1.FullRowSelect = true;
this.SubtitleListview1.GridLines = true;
this.SubtitleListview1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.SubtitleListview1.HideSelection = false;
this.SubtitleListview1.Location = new System.Drawing.Point(0, 0);
this.SubtitleListview1.Name = "SubtitleListview1";
this.SubtitleListview1.OwnerDraw = true;
this.SubtitleListview1.Size = new System.Drawing.Size(740, 105);
this.SubtitleListview1.StateImageList = this.imageListBookmarks;
this.SubtitleListview1.SubtitleFontBold = false;
this.SubtitleListview1.SubtitleFontName = "Tahoma";
this.SubtitleListview1.SubtitleFontSize = 8;
this.SubtitleListview1.TabIndex = 0;
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
this.SubtitleListview1.UseSyntaxColoring = true;
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
this.SubtitleListview1.SelectedIndexChanged += new System.EventHandler(this.SubtitleListview1_SelectedIndexChanged);
this.SubtitleListview1.DragDrop += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragDrop);
this.SubtitleListview1.DragEnter += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragEnter);
this.SubtitleListview1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SubtitleListview1KeyDown);
this.SubtitleListview1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SubtitleListview1_MouseDoubleClick);
this.SubtitleListview1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SubtitleListview1_MouseDown);
this.SubtitleListview1.MouseEnter += new System.EventHandler(this.SubtitleListview1_MouseEnter);
this.SubtitleListview1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.SubtitleListview1_MouseUp);
//
// textBoxListViewTextOriginal
//
this.textBoxListViewTextOriginal.AllowDrop = true;
this.textBoxListViewTextOriginal.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBoxListViewTextOriginal.BackColor = System.Drawing.SystemColors.WindowFrame;
this.textBoxListViewTextOriginal.ContextMenuStrip = this.contextMenuStripTextBoxListView;
this.textBoxListViewTextOriginal.CurrentLanguage = "";
this.textBoxListViewTextOriginal.CurrentLineIndex = 0;
this.textBoxListViewTextOriginal.Enabled = false;
this.textBoxListViewTextOriginal.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold);
this.textBoxListViewTextOriginal.HideSelection = false;
this.textBoxListViewTextOriginal.IsDictionaryDownloaded = true;
this.textBoxListViewTextOriginal.IsSpellCheckerInitialized = false;
this.textBoxListViewTextOriginal.IsSpellCheckRequested = false;
this.textBoxListViewTextOriginal.IsWrongWord = false;
this.textBoxListViewTextOriginal.LanguageChanged = false;
this.textBoxListViewTextOriginal.Location = new System.Drawing.Point(946, 28);
this.textBoxListViewTextOriginal.Multiline = true;
this.textBoxListViewTextOriginal.Name = "textBoxListViewTextOriginal";
this.textBoxListViewTextOriginal.Padding = new System.Windows.Forms.Padding(1);
this.textBoxListViewTextOriginal.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Both;
this.textBoxListViewTextOriginal.SelectedText = "";
this.textBoxListViewTextOriginal.SelectionLength = 0;
this.textBoxListViewTextOriginal.SelectionStart = 0;
this.textBoxListViewTextOriginal.Size = new System.Drawing.Size(16, 84);
this.textBoxListViewTextOriginal.TabIndex = 33;
this.textBoxListViewTextOriginal.TextBoxFont = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold);
this.textBoxListViewTextOriginal.Visible = false;
this.textBoxListViewTextOriginal.TextChanged += new System.EventHandler(this.textBoxListViewTextOriginal_TextChanged);
this.textBoxListViewTextOriginal.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextOriginalKeyDown);
this.textBoxListViewTextOriginal.MouseClick += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextOriginalMouseClick);
this.textBoxListViewTextOriginal.Enter += new System.EventHandler(this.TextBoxListViewTextOriginalEnter);
this.textBoxListViewTextOriginal.KeyUp += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextOriginalKeyUp);
this.textBoxListViewTextOriginal.MouseMove += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextOriginalMouseMove);
//
// timeUpDownStartTime
//
this.timeUpDownStartTime.AutoSize = true;
this.timeUpDownStartTime.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownStartTime.BackColor = System.Drawing.SystemColors.Control;
this.timeUpDownStartTime.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
this.timeUpDownStartTime.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(155)))), ((int)(((byte)(155)))));
this.timeUpDownStartTime.Location = new System.Drawing.Point(8, 26);
this.timeUpDownStartTime.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
this.timeUpDownStartTime.Size = new System.Drawing.Size(113, 27);
this.timeUpDownStartTime.TabIndex = 0;
timeCode3.Hours = 0;
timeCode3.Milliseconds = 0;
timeCode3.Minutes = 0;
timeCode3.Seconds = 0;
timeCode3.TimeSpan = System.TimeSpan.Parse("00:00:00");
timeCode3.TotalMilliseconds = 0D;
timeCode3.TotalSeconds = 0D;
this.timeUpDownStartTime.TimeCode = timeCode3;
this.timeUpDownStartTime.UseVideoOffset = false;
//
// textBoxListViewText
//
this.textBoxListViewText.AllowDrop = true;
this.textBoxListViewText.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBoxListViewText.BackColor = System.Drawing.SystemColors.WindowFrame;
this.textBoxListViewText.ContextMenuStrip = this.contextMenuStripTextBoxListView;
this.textBoxListViewText.CurrentLanguage = "";
this.textBoxListViewText.CurrentLineIndex = 0;
this.textBoxListViewText.Enabled = false;
this.textBoxListViewText.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold);
this.textBoxListViewText.HideSelection = false;
this.textBoxListViewText.IsDictionaryDownloaded = true;
this.textBoxListViewText.IsSpellCheckerInitialized = false;
this.textBoxListViewText.IsSpellCheckRequested = false;
this.textBoxListViewText.IsWrongWord = false;
this.textBoxListViewText.LanguageChanged = false;
this.textBoxListViewText.Location = new System.Drawing.Point(236, 28);
this.textBoxListViewText.Multiline = true;
this.textBoxListViewText.Name = "textBoxListViewText";
this.textBoxListViewText.Padding = new System.Windows.Forms.Padding(1);
this.textBoxListViewText.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Both;
this.textBoxListViewText.SelectedText = "";
this.textBoxListViewText.SelectionLength = 0;
this.textBoxListViewText.SelectionStart = 0;
this.textBoxListViewText.Size = new System.Drawing.Size(378, 84);
this.textBoxListViewText.TabIndex = 5;
this.textBoxListViewText.TextBoxFont = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold);
this.textBoxListViewText.TextChanged += new System.EventHandler(this.TextBoxListViewTextTextChanged);
this.textBoxListViewText.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextKeyDown);
this.textBoxListViewText.MouseClick += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextMouseClick);
this.textBoxListViewText.Enter += new System.EventHandler(this.TextBoxListViewTextEnter);
this.textBoxListViewText.KeyUp += new System.Windows.Forms.KeyEventHandler(this.textBoxListViewText_KeyUp);
this.textBoxListViewText.Leave += new System.EventHandler(this.textBoxListViewText_Leave);
this.textBoxListViewText.MouseMove += new System.Windows.Forms.MouseEventHandler(this.textBoxListViewText_MouseMove);
//
// mediaPlayer
//
this.mediaPlayer.AllowDrop = true;
this.mediaPlayer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.mediaPlayer.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18)))));
this.mediaPlayer.Chapters = null;
this.mediaPlayer.CurrentPosition = 0D;
this.mediaPlayer.FontSizeFactor = 1F;
this.mediaPlayer.LastParagraph = null;
this.mediaPlayer.Location = new System.Drawing.Point(0, 0);
this.mediaPlayer.Margin = new System.Windows.Forms.Padding(0);
this.mediaPlayer.Name = "mediaPlayer";
this.mediaPlayer.ShowFullscreenButton = true;
this.mediaPlayer.ShowMuteButton = true;
this.mediaPlayer.ShowStopButton = true;
this.mediaPlayer.Size = new System.Drawing.Size(219, 246);
this.mediaPlayer.SubtitleText = "";
this.mediaPlayer.TabIndex = 5;
this.mediaPlayer.TextRightToLeft = System.Windows.Forms.RightToLeft.No;
this.mediaPlayer.UsingFrontCenterAudioChannelOnly = false;
this.mediaPlayer.VideoHeight = 0;
this.mediaPlayer.VideoPlayer = null;
this.mediaPlayer.VideoWidth = 0;
this.mediaPlayer.Volume = 0D;
this.mediaPlayer.DragDrop += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragDrop);
this.mediaPlayer.DragEnter += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragEnter);
//
// audioVisualizer
//
this.audioVisualizer.AllowDrop = true;
this.audioVisualizer.AllowNewSelection = true;
this.audioVisualizer.AllowOverlap = false;
this.audioVisualizer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.audioVisualizer.BackColor = System.Drawing.Color.Black;
this.audioVisualizer.BackgroundColor = System.Drawing.Color.Black;
this.audioVisualizer.Chapters = null;
this.audioVisualizer.ChaptersColor = System.Drawing.Color.Empty;
this.audioVisualizer.ClosenessForBorderSelection = 15;
this.audioVisualizer.Color = System.Drawing.Color.GreenYellow;
this.audioVisualizer.CursorColor = System.Drawing.Color.Empty;
this.audioVisualizer.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
this.audioVisualizer.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(155)))), ((int)(((byte)(155)))));
this.audioVisualizer.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(18)))));
this.audioVisualizer.InsertAtVideoPositionShortcut = System.Windows.Forms.Keys.Insert;
this.audioVisualizer.Location = new System.Drawing.Point(472, 32);
this.audioVisualizer.Margin = new System.Windows.Forms.Padding(0);
this.audioVisualizer.MouseWheelScrollUpIsForward = true;
this.audioVisualizer.Move100MsLeft = System.Windows.Forms.Keys.None;
this.audioVisualizer.Move100MsRight = System.Windows.Forms.Keys.None;
this.audioVisualizer.MoveOneSecondLeft = System.Windows.Forms.Keys.None;
this.audioVisualizer.MoveOneSecondRight = System.Windows.Forms.Keys.None;
this.audioVisualizer.Name = "audioVisualizer";
this.audioVisualizer.NewSelectionParagraph = null;
this.audioVisualizer.ParagraphColor = System.Drawing.Color.LimeGreen;
this.audioVisualizer.SelectedColor = System.Drawing.Color.Red;
this.audioVisualizer.ShotChanges = ((System.Collections.Generic.List<double>)(resources.GetObject("audioVisualizer.ShotChanges")));
this.audioVisualizer.ShowGridLines = true;
this.audioVisualizer.ShowSpectrogram = false;
this.audioVisualizer.ShowWaveform = true;
this.audioVisualizer.Size = new System.Drawing.Size(499, 229);
this.audioVisualizer.StartPositionSeconds = 0D;
this.audioVisualizer.TabIndex = 6;
this.audioVisualizer.TextBold = true;
this.audioVisualizer.TextColor = System.Drawing.Color.Gray;
this.audioVisualizer.TextSize = 9F;
this.audioVisualizer.VerticalZoomFactor = 1D;
this.audioVisualizer.WaveformNotLoadedText = "Click to add waveform";
this.audioVisualizer.WavePeaks = null;
this.audioVisualizer.ZoomFactor = 1D;
this.audioVisualizer.Click += new System.EventHandler(this.AudioWaveform_Click);
this.audioVisualizer.DragDrop += new System.Windows.Forms.DragEventHandler(this.AudioWaveformDragDrop);
this.audioVisualizer.DragEnter += new System.Windows.Forms.DragEventHandler(this.AudioWaveformDragEnter);
this.audioVisualizer.MouseEnter += new System.EventHandler(this.audioVisualizer_MouseEnter);
//
// timeUpDownVideoPosition
//
this.timeUpDownVideoPosition.AutoSize = true;
this.timeUpDownVideoPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownVideoPosition.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(30)))));
this.timeUpDownVideoPosition.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
this.timeUpDownVideoPosition.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(155)))), ((int)(((byte)(155)))));
this.timeUpDownVideoPosition.Location = new System.Drawing.Point(90, 190);
this.timeUpDownVideoPosition.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownVideoPosition.Name = "timeUpDownVideoPosition";
this.timeUpDownVideoPosition.Size = new System.Drawing.Size(113, 27);
this.timeUpDownVideoPosition.TabIndex = 12;
timeCode1.Hours = 0;
timeCode1.Milliseconds = 0;
timeCode1.Minutes = 0;
timeCode1.Seconds = 0;
timeCode1.TimeSpan = System.TimeSpan.Parse("00:00:00");
timeCode1.TotalMilliseconds = 0D;
timeCode1.TotalSeconds = 0D;
this.timeUpDownVideoPosition.TimeCode = timeCode1;
this.timeUpDownVideoPosition.UseVideoOffset = false;
//
// timeUpDownVideoPositionAdjust
//
this.timeUpDownVideoPositionAdjust.AutoSize = true;
this.timeUpDownVideoPositionAdjust.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownVideoPositionAdjust.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(30)))));
this.timeUpDownVideoPositionAdjust.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
this.timeUpDownVideoPositionAdjust.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(155)))), ((int)(((byte)(155)))));
this.timeUpDownVideoPositionAdjust.Location = new System.Drawing.Point(90, 215);
this.timeUpDownVideoPositionAdjust.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownVideoPositionAdjust.Name = "timeUpDownVideoPositionAdjust";
this.timeUpDownVideoPositionAdjust.Size = new System.Drawing.Size(113, 27);
this.timeUpDownVideoPositionAdjust.TabIndex = 13;
timeCode2.Hours = 0;
timeCode2.Milliseconds = 0;
timeCode2.Minutes = 0;
timeCode2.Seconds = 0;
timeCode2.TimeSpan = System.TimeSpan.Parse("00:00:00");
timeCode2.TotalMilliseconds = 0D;
timeCode2.TotalSeconds = 0D;
this.timeUpDownVideoPositionAdjust.TimeCode = timeCode2;
this.timeUpDownVideoPositionAdjust.UseVideoOffset = false;
this.generateVideoWithSoftcodedSubtitlesToolStripMenuItem.Name = "generateVideoWithSoftcodedSubtitlesToolStripMenuItem";
this.generateVideoWithSoftcodedSubtitlesToolStripMenuItem.Size = new System.Drawing.Size(295, 22);
this.generateVideoWithSoftcodedSubtitlesToolStripMenuItem.Text = "Generate video with softcoded subtitles...";
this.generateVideoWithSoftcodedSubtitlesToolStripMenuItem.Click += new System.EventHandler(this.generateVideoWithSoftcodedSubtitlesToolStripMenuItem_Click);
//
// Main
//
@ -6184,5 +6193,6 @@ namespace Nikse.SubtitleEdit.Forms
private System.Windows.Forms.ToolStripMenuItem audioToTextWhisperTolStripMenuItem;
private System.Windows.Forms.ToolStripButton toolStripButtonSourceView;
private System.Windows.Forms.ToolStripMenuItem removeTranslationToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem generateVideoWithSoftcodedSubtitlesToolStripMenuItem;
}
}

View File

@ -34632,5 +34632,28 @@ namespace Nikse.SubtitleEdit.Forms
RestoreSubtitleListviewIndices();
RefreshSelectedParagraph();
}
private void generateVideoWithSoftcodedSubtitlesToolStripMenuItem_Click(object sender, EventArgs e)
{
if (!RequireFfmpegOk())
{
return;
}
using (var form = new GenerateVideoWithSoftSubs(_subtitle, _videoFileName, _videoInfo, false))
{
var result = form.ShowDialog(this);
if (result != DialogResult.OK)
{
return;
}
var encodingTime = new TimeCode(form.MillisecondsEncoding).ToString();
using (var f = new ExportPngXmlDialogOpenFolder(string.Format(LanguageSettings.Current.GenerateVideoWithBurnedInSubs.XGeneratedWithBurnedInSubsInX, Path.GetFileName(form.VideoFileName), encodingTime), Path.GetDirectoryName(form.VideoFileName), form.VideoFileName))
{
f.ShowDialog(this);
}
}
}
}
}

View File

@ -609,31 +609,31 @@
<data name="toolStripButtonSourceView.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
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
</value>
</data>
<data name="toolStripButtonToggleWaveform.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -745,6 +745,9 @@
<metadata name="toolStripWaveControls.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>652, 56</value>
</metadata>
<metadata name="toolStripWaveControls.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>652, 56</value>
</metadata>
<data name="toolStripButtonWaveformZoomOut.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
@ -840,12 +843,12 @@
<metadata name="imageListBookmarks.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>981, 56</value>
</metadata>
<metadata name="contextMenuStripTextBoxListView.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>668, 17</value>
</metadata>
<metadata name="contextMenuStripTextBoxSourceView.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>193, 17</value>
</metadata>
<metadata name="contextMenuStripTextBoxListView.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>668, 17</value>
</metadata>
<metadata name="contextMenuStripEmpty.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
@ -857,7 +860,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
CAAAAk1TRnQBSQFMAgEBAgEAATQBLgE0AS4BEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CAAAAk1TRnQBSQFMAgEBAgEAATwBLgE8AS4BEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@ -1827,7 +1827,8 @@ namespace Nikse.SubtitleEdit.Logic
SmptTimeMode = "SMPTE timing (non integer frame rate)",
GenerateTextFromVideo = "Generate text from video...",
GenerateBlankVideo = "Generate blank video...",
GenerateVideoWithBurnedInSub = "Generate video with burned-in sub...",
GenerateVideoWithEmbeddedSub = "Generate video with burned-in subtitle...",
GenerateVideoWithBurnedInSub = "Generate video with burned-in subtitle...",
VideoAudioToTextX = "Audio to text ({0})...",
ImportChaptersFromVideo = "Import chapters from video",
GenerateImportShotChanges = "Generate/import shot changes...",

View File

@ -1677,6 +1677,7 @@ namespace Nikse.SubtitleEdit.Logic
public string GenerateTextFromVideo { get; set; }
public string GenerateBlankVideo { get; set; }
public string GenerateVideoWithBurnedInSub { get; set; }
public string GenerateVideoWithEmbeddedSub { get; set; }
public string VideoAudioToTextX { get; set; }
public string ImportChaptersFromVideo { get; set; }
public string GenerateImportShotChanges { get; set; }

View File

@ -1,6 +1,8 @@
using Nikse.SubtitleEdit.Core.Common;
using Nikse.SubtitleEdit.Core.SubtitleFormats;
using Nikse.SubtitleEdit.Forms;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
@ -169,7 +171,7 @@ namespace Nikse.SubtitleEdit.Logic
StartInfo =
{
FileName = GetFfmpegLocation(),
Arguments = $"{cutStart}-i \"{inputVideoFileName}\"{cutEnd}-vf \"ass={Path.GetFileName(assaSubtitleFileName)}\",yadif,format=yuv420p -g 30 -bf 2 -s {width}x{height} {videoEncodingSettings} {passSettings} {presetSettings} {crfSettings} {audioSettings}{tuneParameter} -use_editlist 0 -movflags +faststart {outputVideoFileName}".TrimStart(),
Arguments = $"{cutStart}-i \"{inputVideoFileName}\"{cutEnd}-vf \"ass={Path.GetFileName(assaSubtitleFileName)}\",yadif,format=yuv420p -g 30 -bf 2 -s {width}x{height} {videoEncodingSettings} {passSettings} {presetSettings} {crfSettings} {audioSettings}{tuneParameter} -use_editlist 0 -movflags +faststart \"{outputVideoFileName}\"".TrimStart(),
UseShellExecute = false,
CreateNoWindow = true,
WorkingDirectory = Path.GetDirectoryName(assaSubtitleFileName) ?? string.Empty,
@ -266,5 +268,88 @@ namespace Nikse.SubtitleEdit.Logic
return ffmpegLocation;
}
public static Process GenerateSoftCodedVideoFile(string inputVideoFileName, List<VideoPreviewGeneratorSub> softSubs, string outputVideoFileName, DataReceivedEventHandler outputHandler)
{
var subsInput = string.Empty;
var subsMap = string.Empty;
var subsMeta = string.Empty;
var subsFormat = string.Empty;
var count = 0;
//TODO: check number of audio + video tracks!
var ffmpegInfo = FfmpegMediaInfo.Parse(inputVideoFileName);
var isMp4 = inputVideoFileName.EndsWith(".mp4", StringComparison.OrdinalIgnoreCase);
foreach (var softSub in softSubs)
{
count++;
subsInput += $" -i \"{softSub.FileName}\"";
subsMap += $" -map {count}";
if (!string.IsNullOrEmpty(softSub.Language))
{
subsMeta += $" -metadata:s:s:{count} language={softSub.Language}";
}
if (isMp4)
{
subsFormat = " -c:s mov_text";
}
else if (softSub.SubtitleFormat.GetType() == typeof(SubRip))
{
subsFormat += $" -c:s:s:{count} srt";
}
else if (softSub.SubtitleFormat.GetType() == typeof(AdvancedSubStationAlpha))
{
subsFormat += $" -c:s:s:{count} ass";
}
else if (softSub.SubtitleFormat.GetType() == typeof(WebVTT) ||
softSub.SubtitleFormat.GetType() == typeof(WebVTTFileWithLineNumber))
{
subsFormat += $" -c:s:s:{count} webvtt";
}
}
subsInput = " " + subsInput.Trim();
if (subsInput.Trim().Length == 0)
{
subsInput = string.Empty;
}
subsMap = " " + subsMap.Trim();
if (subsMap.Trim().Length == 0)
{
subsMap = string.Empty;
}
subsFormat = " " + subsFormat.Trim();
if (subsFormat.Trim().Length == 0)
{
subsFormat = string.Empty;
}
subsMeta = " " + subsMeta.Trim();
if (subsMeta.Trim().Length == 0)
{
subsMeta = string.Empty;
}
var processMakeVideo = new Process
{
StartInfo =
{
FileName = GetFfmpegLocation(),
Arguments = $"-i \"{inputVideoFileName}\"{subsInput} -map 0:v -map 0:a{subsMap} -c:v copy -c:a copy{subsFormat}{subsMeta} \"{outputVideoFileName}\"".TrimStart(),
UseShellExecute = false,
CreateNoWindow = true,
}
};
processMakeVideo.StartInfo.Arguments = processMakeVideo.StartInfo.Arguments.Trim();
SetupDataReceiveHandler(outputHandler, processMakeVideo);
return processMakeVideo;
}
}
}

View File

@ -0,0 +1,19 @@
using Nikse.SubtitleEdit.Core.Common;
using Nikse.SubtitleEdit.Core.SubtitleFormats;
namespace Nikse.SubtitleEdit.Logic
{
public class VideoPreviewGeneratorSub
{
public string Name { get; set; }
public bool IsNew { get; set; }
public string FileName { get; set; }
public Subtitle Subtitle { get; set; }
public SubtitleFormat SubtitleFormat { get; set; }
public string Format { get; set; }
public string Language { get; set; }
public bool IsForced { get; set; }
public bool IsDefault { get; set; }
public object Tag { get; set; }
}
}

View File

@ -333,6 +333,12 @@
<Compile Include="Forms\DownloadVosk.Designer.cs">
<DependentUpon>DownloadVosk.cs</DependentUpon>
</Compile>
<Compile Include="Forms\GenerateVideoWithSoftSubs.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\GenerateVideoWithSoftSubs.Designer.cs">
<DependentUpon>GenerateVideoWithSoftSubs.cs</DependentUpon>
</Compile>
<Compile Include="Forms\Ocr\WordSplitDictionaryGenerator.cs">
<SubType>Form</SubType>
</Compile>
@ -1463,6 +1469,7 @@
<Compile Include="Logic\VideoPlayers\MpcHC\NativeMethods.cs" />
<Compile Include="Logic\VideoPlayers\QuartsPlayer.cs" />
<Compile Include="Logic\VideoPlayers\VideoPlayer.cs" />
<Compile Include="Logic\VideoPreviewGeneratorSub.cs" />
<Compile Include="Logic\VideoPreviewGenerator.cs" />
<Compile Include="Logic\WindowsHelper.cs" />
<Compile Include="Logic\WordSpellChecker.cs" />
@ -1589,6 +1596,9 @@
<EmbeddedResource Include="Forms\DownloadVosk.resx">
<DependentUpon>DownloadVosk.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\GenerateVideoWithSoftSubs.resx">
<DependentUpon>GenerateVideoWithSoftSubs.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\GetVideoPosition.resx">
<DependentUpon>GetVideoPosition.cs</DependentUpon>
</EmbeddedResource>