Added new export EDL/Clipname - thx alex :)

This commit is contained in:
Nikolaj Olsson 2016-12-08 18:16:09 +01:00
parent b245c3ced1
commit 4a4bd6f060
5 changed files with 73 additions and 44 deletions

View File

@ -4,6 +4,7 @@
* NEW:
* "mpv" media player now works on Linux - thx var1ap
* Added new subtitle format - thx Siavash
* Added new export format "EDL/ClipName" - thx alex
* IMPROVED:
* Updated Hungarian translation - thx ZityiSoft Team
* Updated Russian translation - thx Elheym

View File

@ -84,7 +84,7 @@ namespace Nikse.SubtitleEdit.Forms
private VobSubOcr _vobSubOcr;
private readonly System.Windows.Forms.Timer _previewTimer = new System.Windows.Forms.Timer();
private string _videoFileName;
private readonly Dictionary<string, int> _lineHeights = new Dictionary<string, int>();
private readonly Dictionary<string, int> _lineHeights;
private const string BoxMultiLineText = "BoxMultiLine";
private const string BoxSingleLineText = "BoxSingleLine";
@ -97,12 +97,11 @@ namespace Nikse.SubtitleEdit.Forms
toolTip.SetToolTip(panelFullFrameBackground, Configuration.Settings.Language.ExportPngXml.ChooseBackgroundColor);
_lineHeights = new Dictionary<string, int>();
comboBoxImageFormat.SelectedIndex = 4;
_subtitleColor = Configuration.Settings.Tools.ExportFontColor;
_subtitleColor = Color.FromArgb(byte.MaxValue, Configuration.Settings.Tools.ExportFontColor);
_borderColor = Configuration.Settings.Tools.ExportBorderColor;
_previewTimer.Tick += previewTimer_Tick;
_previewTimer.Interval = 100;
labelLineHeightStyle.Text = string.Empty;
_subtitleColor = Color.White;
}
private void previewTimer_Tick(object sender, EventArgs e)
@ -476,7 +475,7 @@ namespace Nikse.SubtitleEdit.Forms
saveFileDialog1.AddExtension = true;
saveFileDialog1.Filter = "Xml files|*.xml";
}
else if (_exportType == "EDL")
else if (_exportType == "EDL" || _exportType == "EDL_CLIPNAME")
{
saveFileDialog1.Title = Configuration.Settings.Language.ExportPngXml.SavePremiereEdlAs;
saveFileDialog1.DefaultExt = "*.edl";
@ -494,6 +493,7 @@ namespace Nikse.SubtitleEdit.Forms
_exportType == "FCP" && saveFileDialog1.ShowDialog(this) == DialogResult.OK ||
_exportType == "DOST" && saveFileDialog1.ShowDialog(this) == DialogResult.OK ||
_exportType == "DCINEMA_INTEROP" && saveFileDialog1.ShowDialog(this) == DialogResult.OK ||
_exportType == "EDL_CLIPNAME" && saveFileDialog1.ShowDialog(this) == DialogResult.OK ||
_exportType == "EDL" && saveFileDialog1.ShowDialog(this) == DialogResult.OK)
{
int width;
@ -815,9 +815,12 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
File.WriteAllText(fName, SubtitleFormat.ToUtf8XmlString(doc));
MessageBox.Show(string.Format(Configuration.Settings.Language.ExportPngXml.XImagesSavedInY, imagesSavedCount, Path.GetDirectoryName(fName)));
}
else if (_exportType == "EDL")
else if (_exportType == "EDL" || _exportType == "EDL_CLIPNAME")
{
string header = "TITLE: ( no title )" + Environment.NewLine + Environment.NewLine;
var title = Path.GetFileNameWithoutExtension(saveFileDialog1.FileName);
if (string.IsNullOrEmpty(title))
title = "( no title )";
string header = "TITLE: " + title + Environment.NewLine + Environment.NewLine;
File.WriteAllText(saveFileDialog1.FileName, header + sb);
MessageBox.Show(string.Format(Configuration.Settings.Language.ExportPngXml.XImagesSavedInY, imagesSavedCount, Path.GetDirectoryName(saveFileDialog1.FileName)));
}
@ -1522,7 +1525,7 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
sb.AppendLine("</Subtitle>");
}
}
else if (_exportType == "EDL")
else if (_exportType == "EDL" || _exportType == "EDL_CLIPNAME")
{
if (!param.Saved)
{
@ -1540,6 +1543,10 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
string line = string.Format("{0:000} {1} V C {2} {3} {4} {5}", i, fileName1, new TimeCode().ToHHMMSSFF(), param.P.Duration.ToHHMMSSFF(), param.P.StartTime.ToHHMMSSFF(), param.P.EndTime.ToHHMMSSFF());
sb.AppendLine(line);
if (_exportType == "EDL_CLIPNAME")
{
sb.AppendLine("*FROM CLIP NAME: " + fileName1 + ".PNG");
}
sb.AppendLine();
imagesSavedCount++;
@ -3089,6 +3096,8 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
Text = "DOST";
else if (exportType == "EDL")
Text = "EDL";
else if (_exportType == "EDL_CLIPNAME")
Text = "EDL/CLIPNAME";
else if (exportType == "DCINEMA_INTEROP")
Text = "DCinema interop/png";
else
@ -3395,7 +3404,7 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
if (exportType == "BLURAYSUP" || exportType == "IMAGE/FRAME" && Configuration.Settings.Tools.ExportBluRayBottomMargin >= 0 && Configuration.Settings.Tools.ExportBluRayBottomMargin < comboBoxBottomMargin.Items.Count)
comboBoxBottomMargin.SelectedIndex = Configuration.Settings.Tools.ExportBluRayBottomMargin;
if (_exportType == "BLURAYSUP" || _exportType == "VOBSUB" || _exportType == "IMAGE/FRAME" || _exportType == "BDNXML" || _exportType == "DOST" || _exportType == "FAB" || _exportType == "EDL")
if (_exportType == "BLURAYSUP" || _exportType == "VOBSUB" || _exportType == "IMAGE/FRAME" || _exportType == "BDNXML" || _exportType == "DOST" || _exportType == "FAB" || _exportType == "EDL" || _exportType == "EDL_CLIPNAME")
{
comboBoxBottomMargin.Visible = true;
labelBottomMargin.Visible = true;
@ -3499,7 +3508,7 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
}
comboBoxShadowWidth.SelectedIndex = 0;
bool shadowVisible = _exportType == "BDNXML" || _exportType == "BLURAYSUP" || _exportType == "DOST" || _exportType == "IMAGE/FRAME" || _exportType == "FCP" || _exportType == "DCINEMA_INTEROP" || _exportType == "EDL";
bool shadowVisible = _exportType == "BDNXML" || _exportType == "BLURAYSUP" || _exportType == "DOST" || _exportType == "IMAGE/FRAME" || _exportType == "FCP" || _exportType == "DCINEMA_INTEROP" || _exportType == "EDL" || _exportType == "EDL_CLIPNAME";
labelShadowWidth.Visible = shadowVisible;
buttonShadowColor.Visible = shadowVisible;
comboBoxShadowWidth.Visible = shadowVisible;

View File

@ -125,7 +125,7 @@
this.toolStripMenuItemDost = new System.Windows.Forms.ToolStripMenuItem();
this.DvdStudioProStl = new System.Windows.Forms.ToolStripMenuItem();
this.eBUSTLToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItemEdlClipName = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItemExportFcpIImage = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItemImagePerFrame = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItemTextTimeCodePair = new System.Windows.Forms.ToolStripMenuItem();
@ -469,6 +469,7 @@
this.imageListPlayRate = new System.Windows.Forms.ImageList(this.components);
this.timerTextUndo = new System.Windows.Forms.Timer(this.components);
this.timerAlternateTextUndo = new System.Windows.Forms.Timer(this.components);
this.toolStripMenuItemEdl = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip1.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout();
@ -1203,7 +1204,8 @@
this.toolStripMenuItemDost,
this.DvdStudioProStl,
this.eBUSTLToolStripMenuItem,
this.toolStripMenuItem3,
this.toolStripMenuItemEdl,
this.toolStripMenuItemEdlClipName,
this.toolStripMenuItemExportFcpIImage,
this.toolStripMenuItemImagePerFrame,
this.toolStripMenuItemTextTimeCodePair,
@ -1317,12 +1319,12 @@
this.eBUSTLToolStripMenuItem.Text = "EBU STL...";
this.eBUSTLToolStripMenuItem.Click += new System.EventHandler(this.EBustlToolStripMenuItemClick);
//
// toolStripMenuItem3
// toolStripMenuItemEdlClipName
//
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(258, 22);
this.toolStripMenuItem3.Text = "EDL...";
this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItemExportEdlClick);
this.toolStripMenuItemEdlClipName.Name = "toolStripMenuItemEdlClipName";
this.toolStripMenuItemEdlClipName.Size = new System.Drawing.Size(258, 22);
this.toolStripMenuItemEdlClipName.Text = "EDL/CLIPNAME...";
this.toolStripMenuItemEdlClipName.Click += new System.EventHandler(this.ExportToEdlWithClipName);
//
// toolStripMenuItemExportFcpIImage
//
@ -4554,6 +4556,13 @@
this.timerAlternateTextUndo.Interval = 700;
this.timerAlternateTextUndo.Tick += new System.EventHandler(this.TimerAlternateTextUndoTick);
//
// toolStripMenuItemEdl
//
this.toolStripMenuItemEdl.Name = "toolStripMenuItemEdl";
this.toolStripMenuItemEdl.Size = new System.Drawing.Size(258, 22);
this.toolStripMenuItemEdl.Text = "EDL...";
this.toolStripMenuItemEdl.Click += new System.EventHandler(this.ExportToEdl);
//
// Main
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -5057,7 +5066,7 @@
private System.Windows.Forms.ToolStripSeparator toolStripMenuItemSplitterCheckForUpdates;
private System.Windows.Forms.ToolStripMenuItem setVideoOffsetToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemEbuProperties;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemEdlClipName;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemAddWaveformBatch;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemExportBdTextSt;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelProgress;
@ -5066,5 +5075,6 @@
private System.Windows.Forms.ToolStripButton toolStripButtonFixCommonErrors;
private System.Windows.Forms.ToolStripMenuItem removeSceneChangeToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem addSceneChangeToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemEdl;
}
}

View File

@ -20190,7 +20190,16 @@ namespace Nikse.SubtitleEdit.Forms
}
}
private void toolStripMenuItemExportEdlClick(object sender, EventArgs e)
private void ExportToEdlWithClipName(object sender, EventArgs e)
{
using (var exportBdnXmlPng = new ExportPngXml())
{
exportBdnXmlPng.Initialize(_subtitle, GetCurrentSubtitleFormat(), "EDL_CLIPNAME", _fileName, _videoInfo, _videoFileName);
exportBdnXmlPng.ShowDialog(this);
}
}
private void ExportToEdl(object sender, EventArgs e)
{
using (var exportBdnXmlPng = new ExportPngXml())
{

View File

@ -370,31 +370,31 @@
<data name="toolStripButtonRemoveTextForHi.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAWaSURBVFhHrVZ7TJNXFCfZlpmYmCVzy7LpnE6zaEw2M3VT
hE8e8n60VAoTbIWBhQIFW15jwEelyEp5TChiEUFaEB8j8UHisrrFDRX/W+bcshGzsWR/CPRBiChMxrf+
vt1bWgRpkV9y0p5zzz3n3POdc+718RQsa1p1OKtpe3xSnTYqRuNGkGENOkR9+ZChOvF6uryxLDxcadkd
kMXt2JM+L+1i5Bx0Dmef/Kq+vm8D2f58KFOb/ASC0r8/8pe5OfMLynUj1zUQE6GyGrv664iZpaHr3EBV
ULjKaRSn3xdecjtHaahJTm5c70ryPL0Ga3uCcpz6CEyWe7ydYdgXiUnPUVDasikgNPcxNcZEKyca9Nd0
LLuwMaw5gtstTat9SPchc2rN2Tai4jmyCztGqZGkJHbSbP51F06Sm996SCyuGmaY7CmGkRPKnoIMa9Bh
2Y4VyYeO9dH9foxigq0ybiWmF0d947VImkqkvUzdFQB5ikxX4VqEW7ZJn3zsn+Hkcdq8ovY/MjOb1yKQ
RFnDOF1LlFR288Y9gSStppdujBWz30DWYjAfoUExQuVE9H51HgoUp46J1yjC4koe0GBQtKbeO2twahqw
V1kIE1T+RQPIL+xUqnTGlXAAHnVh6unfS1SdUKl0KzXVFy/TIDIUhrOQ49OAR4smJn+5j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0muj4iku494WJ7C08WDGk
HN8NGDYYTA8kGZoJQ6/m+Y49PP4Dfvsteu4IL1EAAAAASUVORK5CYII=
</value>
</data>
<data name="toolStripButtonVisualSync.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -752,7 +752,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
CAAAAk1TRnQBSQFMAgEBAgEAAZABIwGQASMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CAAAAk1TRnQBSQFMAgEBAgEAAZgBIwGYASMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA