Merge remote-tracking branch 'refs/remotes/remote/main' into auto-translate

This commit is contained in:
Ivandro Jao 2024-06-23 09:44:53 +01:00
commit 1aabf861a5
70 changed files with 5439 additions and 3534 deletions

View File

@ -1,5 +1,28 @@
Subtitle Edit Changelog
4.0.7 (xth July 2024) BETA
* NEW:
* Add "Generate transparent video with subtitles" - thx JeditPro
* Add Edit - Modify selection - Line length
* Add support for Faster-Whisper-XXL
* Add audio settings for TTS final video file
* Add subtitle format "PodcastIndexer json" - thx rjgout
* Add new Claude 3.5 Sonnet model - thx Flash
* IMPROVED:
* Update Portuguese translation - thx hugok79
* Update Brazilian Portuguese translation - thx igorruckert
* Update Chinese translation - thx nkh0472
* Update Finnish translation - thx Teijo S
* Update Italian language - thx bovirus
* Update Russian translation - thx elfriob
* Update mpv to 2024-06-09
* Update yt-dlp to 2024-05-27
* FIXED:
* Fix auto translate crash - thx soscaster
* Fix crash in Vosk audio to text on selected lines - thx MediaExpres
* Prompt for overwrite in "Multiple replace" export - thx redactedscribe
* Fix abort for TTS Azure/ElevenLabs - thx cvrle77
4.0.6 (1st June 2024)
* NEW:
* Add "Text To Speech" - thx darnn/cvrle77/BlueBlue7891

View File

@ -1449,6 +1449,7 @@ We leverage the intrinsic rhythm of the image.</CreateSimpleChainingToolTip>
<GenerateBlankVideo>Generate blank video...</GenerateBlankVideo>
<GenerateVideoWithBurnedInSub>Generate video with burned-in subtitle...</GenerateVideoWithBurnedInSub>
<GenerateVideoWithEmbeddedSubs>Generate video with added/removed embedded subtitles...</GenerateVideoWithEmbeddedSubs>
<GenerateTransparentVideoWithSubs>Generate transparent video with subtitles...</GenerateTransparentVideoWithSubs>
<VideoAudioToTextX>Audio to text ({0})...</VideoAudioToTextX>
<ImportChaptersFromVideo>Import chapters from video</ImportChaptersFromVideo>
<GenerateImportShotChanges>Generate/import shot changes...</GenerateImportShotChanges>

View File

@ -180,7 +180,7 @@ EXIT /B
TITLE Creating ZIP archive with 7-Zip...
ECHO.
ECHO Creating ZIP archive with 7-Zip...
PUSHD "src\ui\bin\Release"
PUSHD "src\ui\bin\Release\net48"
IF EXIST "temp_zip" RD /S /Q "temp_zip"
IF NOT EXIST "temp_zip" MD "temp_zip"
IF NOT EXIST "temp_zip\Languages" MD "temp_zip\Languages"
@ -198,9 +198,9 @@ IF NOT EXIST "temp_zip\Icons\Black" MD "temp_zip\Icons\Black"
IF NOT EXIST "temp_zip\Icons\Black\VideoPlayer" MD "temp_zip\Icons\Black\VideoPlayer"
ECHO.
COPY /Y /V "..\..\..\..\LICENSE.txt" "temp_zip\"
COPY /Y /V "..\..\..\..\Changelog.txt" "temp_zip\"
COPY /Y /V "..\..\..\..\preview.mkv" "temp_zip\"
COPY /Y /V "..\..\..\..\..\LICENSE.txt" "temp_zip\"
COPY /Y /V "..\..\..\..\..\Changelog.txt" "temp_zip\"
COPY /Y /V "..\..\..\..\..\preview.mkv" "temp_zip\"
COPY /Y /V "Hunspellx86.dll" "temp_zip\"
COPY /Y /V "Hunspellx64.dll" "temp_zip\"
COPY /Y /V "libse.dll" "temp_zip\"
@ -209,7 +209,7 @@ COPY /Y /V "NHunspell.dll" "temp_zip\"
COPY /Y /V "UtfUnknown.dll" "temp_zip\"
COPY /Y /V "Vosk.dll" "temp_zip\"
COPY /Y /V "NCalc.dll" "temp_zip\"
COPY /Y /V "..\..\DLLs\Interop.QuartzTypeLib.dll" "temp_zip\"
COPY /Y /V "..\..\..\DLLs\Interop.QuartzTypeLib.dll" "temp_zip\"
COPY /Y /V "System.Net.Http.Extensions.dll" "temp_zip\"
COPY /Y /V "Newtonsoft.Json.dll" "temp_zip\"
COPY /Y /V "System.Net.Http.Primitives.dll" "temp_zip\"
@ -218,18 +218,18 @@ COPY /Y /V "NAudio.WinMM.dll" "temp_zip\"
COPY /Y /V "Microsoft.Win32.Registry.dll" "temp_zip\"
COPY /Y /V "SubtitleEdit.exe" "temp_zip\"
COPY /Y /V "Languages\*.xml" "temp_zip\Languages\"
COPY /Y /V "..\..\..\..\Dictionaries\*.*" "temp_zip\Dictionaries\"
COPY /Y /V "..\..\..\..\Ocr\*.*" "temp_zip\Ocr\"
XCOPY /Y /V "..\..\..\..\Tesseract302\*.*" "temp_zip\Tesseract302\" /S
COPY /Y /V "..\..\..\..\Icons\*.ico" "temp_zip\Icons\"
COPY /Y /V "..\..\..\..\Icons\DefaultTheme\*.png" "temp_zip\Icons\DefaultTheme"
COPY /Y /V "..\..\..\..\Icons\DefaultTheme\VideoPlayer\*.png" "temp_zip\Icons\DefaultTheme\VideoPlayer"
COPY /Y /V "..\..\..\..\Icons\DarkTheme\*.png" "temp_zip\Icons\DarkTheme"
COPY /Y /V "..\..\..\..\Icons\DarkTheme\VideoPlayer\*.png" "temp_zip\Icons\DarkTheme\VideoPlayer"
COPY /Y /V "..\..\..\..\Icons\Legacy\*.png" "temp_zip\Icons\Legacy"
COPY /Y /V "..\..\..\..\Icons\Legacy\VideoPlayer\*.png" "temp_zip\Icons\Legacy\VideoPlayer"
COPY /Y /V "..\..\..\..\Icons\Black\*.png" "temp_zip\Icons\Black"
COPY /Y /V "..\..\..\..\Icons\Black\VideoPlayer\*.png" "temp_zip\Icons\Black\VideoPlayer"
COPY /Y /V "..\..\..\..\..\Dictionaries\*.*" "temp_zip\Dictionaries\"
COPY /Y /V "..\..\..\..\..\Ocr\*.*" "temp_zip\Ocr\"
XCOPY /Y /V "..\..\..\..\..\Tesseract302\*.*" "temp_zip\Tesseract302\" /S
COPY /Y /V "..\..\..\..\..\Icons\*.ico" "temp_zip\Icons\"
COPY /Y /V "..\..\..\..\..\Icons\DefaultTheme\*.png" "temp_zip\Icons\DefaultTheme"
COPY /Y /V "..\..\..\..\..\Icons\DefaultTheme\VideoPlayer\*.png" "temp_zip\Icons\DefaultTheme\VideoPlayer"
COPY /Y /V "..\..\..\..\..\Icons\DarkTheme\*.png" "temp_zip\Icons\DarkTheme"
COPY /Y /V "..\..\..\..\..\Icons\DarkTheme\VideoPlayer\*.png" "temp_zip\Icons\DarkTheme\VideoPlayer"
COPY /Y /V "..\..\..\..\..\Icons\Legacy\*.png" "temp_zip\Icons\Legacy"
COPY /Y /V "..\..\..\..\..\Icons\Legacy\VideoPlayer\*.png" "temp_zip\Icons\Legacy\VideoPlayer"
COPY /Y /V "..\..\..\..\..\Icons\Black\*.png" "temp_zip\Icons\Black"
COPY /Y /V "..\..\..\..\..\Icons\Black\VideoPlayer\*.png" "temp_zip\Icons\Black\VideoPlayer"
PUSHD "temp_zip"
START "" /B /WAIT "%SEVENZIP%" a -tzip -mx=9 "SubtitleEdit-%VERSION%.zip" * >NUL

View File

@ -154,7 +154,7 @@ EXIT /B
TITLE Creating ZIP archive with 7-Zip...
ECHO.
ECHO Creating ZIP archive with 7-Zip...
PUSHD "src\ui\bin\Release"
PUSHD "src\ui\bin\Release\net48"
IF EXIST "temp_zip" RD /S /Q "temp_zip"
IF NOT EXIST "temp_zip" MD "temp_zip"
IF NOT EXIST "temp_zip\Languages" MD "temp_zip\Languages"
@ -172,9 +172,9 @@ IF NOT EXIST "temp_zip\Icons\Black" MD "temp_zip\Icons\Black"
IF NOT EXIST "temp_zip\Icons\Black\VideoPlayer" MD "temp_zip\Icons\Black\VideoPlayer"
ECHO.
COPY /Y /V "..\..\..\..\LICENSE.txt" "temp_zip\"
COPY /Y /V "..\..\..\..\Changelog.txt" "temp_zip\"
COPY /Y /V "..\..\..\..\preview.mkv" "temp_zip\"
COPY /Y /V "..\..\..\..\..\LICENSE.txt" "temp_zip\"
COPY /Y /V "..\..\..\..\..\Changelog.txt" "temp_zip\"
COPY /Y /V "..\..\..\..\..\preview.mkv" "temp_zip\"
COPY /Y /V "Hunspellx86.dll" "temp_zip\"
COPY /Y /V "Hunspellx64.dll" "temp_zip\"
COPY /Y /V "libse.dll" "temp_zip\"
@ -183,7 +183,7 @@ COPY /Y /V "NHunspell.dll" "temp_zip\"
COPY /Y /V "UtfUnknown.dll" "temp_zip\"
COPY /Y /V "Vosk.dll" "temp_zip\"
COPY /Y /V "NCalc.dll" "temp_zip\"
COPY /Y /V "..\..\DLLs\Interop.QuartzTypeLib.dll" "temp_zip\"
COPY /Y /V "..\..\..\DLLs\Interop.QuartzTypeLib.dll" "temp_zip\"
COPY /Y /V "System.Net.Http.Extensions.dll" "temp_zip\"
COPY /Y /V "Newtonsoft.Json.dll" "temp_zip\"
COPY /Y /V "System.Net.Http.Primitives.dll" "temp_zip\"
@ -192,18 +192,18 @@ COPY /Y /V "NAudio.WinMM.dll" "temp_zip\"
COPY /Y /V "Microsoft.Win32.Registry.dll" "temp_zip\"
COPY /Y /V "SubtitleEdit.exe" "temp_zip\"
COPY /Y /V "Languages\*.xml" "temp_zip\Languages\"
COPY /Y /V "..\..\..\..\Dictionaries\*.*" "temp_zip\Dictionaries\"
COPY /Y /V "..\..\..\..\Ocr\*.*" "temp_zip\Ocr\"
XCOPY /Y /V "..\..\..\..\Tesseract302\*.*" "temp_zip\Tesseract302\" /S
COPY /Y /V "..\..\..\..\Icons\*.ico" "temp_zip\Icons\"
COPY /Y /V "..\..\..\..\Icons\DefaultTheme\*.png" "temp_zip\Icons\DefaultTheme"
COPY /Y /V "..\..\..\..\Icons\DefaultTheme\VideoPlayer\*.png" "temp_zip\Icons\DefaultTheme\VideoPlayer"
COPY /Y /V "..\..\..\..\Icons\DarkTheme\*.png" "temp_zip\Icons\DarkTheme"
COPY /Y /V "..\..\..\..\Icons\DarkTheme\VideoPlayer\*.png" "temp_zip\Icons\DarkTheme\VideoPlayer"
COPY /Y /V "..\..\..\..\Icons\Legacy\*.png" "temp_zip\Icons\Legacy"
COPY /Y /V "..\..\..\..\Icons\Legacy\VideoPlayer\*.png" "temp_zip\Icons\Legacy\VideoPlayer"
COPY /Y /V "..\..\..\..\Icons\Black\*.png" "temp_zip\Icons\Black"
COPY /Y /V "..\..\..\..\Icons\Black\VideoPlayer\*.png" "temp_zip\Icons\Black\VideoPlayer"
COPY /Y /V "..\..\..\..\..\Dictionaries\*.*" "temp_zip\Dictionaries\"
COPY /Y /V "..\..\..\..\..\Ocr\*.*" "temp_zip\Ocr\"
XCOPY /Y /V "..\..\..\..\..\Tesseract302\*.*" "temp_zip\Tesseract302\" /S
COPY /Y /V "..\..\..\..\..\Icons\*.ico" "temp_zip\Icons\"
COPY /Y /V "..\..\..\..\..\Icons\DefaultTheme\*.png" "temp_zip\Icons\DefaultTheme"
COPY /Y /V "..\..\..\..\..\Icons\DefaultTheme\VideoPlayer\*.png" "temp_zip\Icons\DefaultTheme\VideoPlayer"
COPY /Y /V "..\..\..\..\..\Icons\DarkTheme\*.png" "temp_zip\Icons\DarkTheme"
COPY /Y /V "..\..\..\..\..\Icons\DarkTheme\VideoPlayer\*.png" "temp_zip\Icons\DarkTheme\VideoPlayer"
COPY /Y /V "..\..\..\..\..\Icons\Legacy\*.png" "temp_zip\Icons\Legacy"
COPY /Y /V "..\..\..\..\..\Icons\Legacy\VideoPlayer\*.png" "temp_zip\Icons\Legacy\VideoPlayer"
COPY /Y /V "..\..\..\..\..\Icons\Black\*.png" "temp_zip\Icons\Black"
COPY /Y /V "..\..\..\..\..\Icons\Black\VideoPlayer\*.png" "temp_zip\Icons\Black\VideoPlayer"
PUSHD "temp_zip"
START "" /B /WAIT "%SEVENZIP%" a -tzip -mx=9 "SubtitleEditBeta.zip" * >NUL
@ -211,7 +211,7 @@ IF %ERRORLEVEL% NEQ 0 GOTO EndWithError
ECHO.
ECHO ZIP archive created successfully!
MOVE /Y "SubtitleEditBeta.zip" "..\..\..\..\..\SubtitleEditBeta" >NUL
MOVE /Y "SubtitleEditBeta.zip" "..\..\..\..\..\..\SubtitleEditBeta" >NUL
POPD
IF EXIST "temp_zip" RD /S /Q "temp_zip"
POPD

View File

@ -43,7 +43,7 @@
#define VerBuild
#define VerRevision
#define bindir "..\src\ui\bin\Release"
#define bindir "..\src\ui\bin\Release\net48"
#ifnexist bindir + "\SubtitleEdit.exe"
#error Compile Subtitle Edit first

View File

@ -8,6 +8,7 @@ using System.Net.Http.Headers;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Nikse.SubtitleEdit.Core.Settings;
namespace Nikse.SubtitleEdit.Core.AutoTranslate
{
@ -51,7 +52,7 @@ namespace Nikse.SubtitleEdit.Core.AutoTranslate
var model = Configuration.Settings.Tools.AnthropicApiModel;
if (string.IsNullOrEmpty(model))
{
model = "claude-3-opus-20240229";
model = "claude-3-5-sonnet-20240620";
Configuration.Settings.Tools.AnthropicApiModel = model;
}

View File

@ -9,6 +9,7 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using Nikse.SubtitleEdit.Core.Settings;
namespace Nikse.SubtitleEdit.Core.AutoTranslate
{

View File

@ -8,6 +8,7 @@ using System.Net.Http.Headers;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Nikse.SubtitleEdit.Core.Settings;
namespace Nikse.SubtitleEdit.Core.AutoTranslate
{

View File

@ -8,6 +8,7 @@ using System.Net.Http.Headers;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Nikse.SubtitleEdit.Core.Settings;
namespace Nikse.SubtitleEdit.Core.AutoTranslate
{

View File

@ -13,7 +13,7 @@ namespace Nikse.SubtitleEdit.Core.Common
{
private static readonly Lazy<Configuration> Instance = new Lazy<Configuration>(() => new Configuration());
private readonly Lazy<Settings> _settings;
private readonly Lazy<Settings.Settings> _settings;
private readonly IEnumerable<Encoding> _encodings;
public static readonly string BaseDirectory = GetBaseDirectory();
@ -59,7 +59,7 @@ namespace Nikse.SubtitleEdit.Core.Common
private Configuration()
{
_encodings = GetAvailableEncodings();
_settings = new Lazy<Settings>(Settings.GetSettings);
_settings = new Lazy<Settings.Settings>(Core.Settings.Settings.GetSettings);
}
private const int PlatformWindows = 1;
@ -113,7 +113,7 @@ namespace Nikse.SubtitleEdit.Core.Common
: PlatformWindows;
}
public static Settings Settings => Instance.Value._settings.Value;
public static Settings.Settings Settings => Instance.Value._settings.Value;
public static IEnumerable<Encoding> AvailableEncodings => Instance.Value._encodings;

View File

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using Nikse.SubtitleEdit.Core.Common;
using Nikse.SubtitleEdit.Core.Settings;
using Nikse.SubtitleEdit.Core.SubtitleFormats;
namespace Nikse.SubtitleEdit.Core.Forms

View File

@ -2,6 +2,7 @@
using System.Net;
using System.Net.Http;
using Nikse.SubtitleEdit.Core.Common;
using Nikse.SubtitleEdit.Core.Settings;
namespace Nikse.SubtitleEdit.Core.Http
{

View File

@ -0,0 +1,12 @@
using System.Collections.Generic;
using Nikse.SubtitleEdit.Core.Common;
namespace Nikse.SubtitleEdit.Core.Settings
{
public class AssaStorageCategory
{
public string Name { get; set; }
public bool IsDefault { get; set; }
public List<SsaStyle> Styles { get; set; }
}
}

View File

@ -0,0 +1,220 @@
namespace Nikse.SubtitleEdit.Core.Settings
{
public class BeautifyTimeCodesSettings
{
public bool AlignTimeCodes { get; set; }
public bool ExtractExactTimeCodes { get; set; }
public bool SnapToShotChanges { get; set; }
public int OverlapThreshold { get; set; }
public BeautifyTimeCodesProfile Profile { get; set; }
public BeautifyTimeCodesSettings()
{
AlignTimeCodes = true;
ExtractExactTimeCodes = false;
SnapToShotChanges = true;
OverlapThreshold = 1000;
Profile = new BeautifyTimeCodesProfile();
}
public class BeautifyTimeCodesProfile
{
// General
public int Gap { get; set; }
// In cues
public int InCuesGap { get; set; }
public int InCuesLeftGreenZone { get; set; }
public int InCuesLeftRedZone { get; set; }
public int InCuesRightRedZone { get; set; }
public int InCuesRightGreenZone { get; set; }
// Out cues
public int OutCuesGap { get; set; }
public int OutCuesLeftGreenZone { get; set; }
public int OutCuesLeftRedZone { get; set; }
public int OutCuesRightRedZone { get; set; }
public int OutCuesRightGreenZone { get; set; }
// Connected subtitles
public int ConnectedSubtitlesInCueClosestLeftGap { get; set; }
public int ConnectedSubtitlesInCueClosestRightGap { get; set; }
public int ConnectedSubtitlesOutCueClosestLeftGap { get; set; }
public int ConnectedSubtitlesOutCueClosestRightGap { get; set; }
public int ConnectedSubtitlesLeftGreenZone { get; set; }
public int ConnectedSubtitlesLeftRedZone { get; set; }
public int ConnectedSubtitlesRightRedZone { get; set; }
public int ConnectedSubtitlesRightGreenZone { get; set; }
public int ConnectedSubtitlesTreatConnected { get; set; }
// Chaining
public bool ChainingGeneralUseZones { get; set; }
public int ChainingGeneralMaxGap { get; set; }
public int ChainingGeneralLeftGreenZone { get; set; }
public int ChainingGeneralLeftRedZone { get; set; }
public ChainingShotChangeBehaviorEnum ChainingGeneralShotChangeBehavior { get; set; }
public bool ChainingInCueOnShotUseZones { get; set; }
public int ChainingInCueOnShotMaxGap { get; set; }
public int ChainingInCueOnShotLeftGreenZone { get; set; }
public int ChainingInCueOnShotLeftRedZone { get; set; }
public ChainingShotChangeBehaviorEnum ChainingInCueOnShotShotChangeBehavior { get; set; }
public bool ChainingInCueOnShotCheckGeneral { get; set; }
public bool ChainingOutCueOnShotUseZones { get; set; }
public int ChainingOutCueOnShotMaxGap { get; set; }
public int ChainingOutCueOnShotRightRedZone { get; set; }
public int ChainingOutCueOnShotRightGreenZone { get; set; }
public ChainingShotChangeBehaviorEnum ChainingOutCueOnShotShotChangeBehavior { get; set; }
public bool ChainingOutCueOnShotCheckGeneral { get; set; }
public enum Preset : int
{
Default = 0,
Netflix = 1,
SDI = 2,
}
public enum ChainingShotChangeBehaviorEnum : int
{
DontChain = 0,
ExtendCrossingShotChange = 1,
ExtendUntilShotChange = 2
}
public BeautifyTimeCodesProfile(Preset preset = Preset.Default)
{
switch (preset)
{
case Preset.Netflix:
Gap = 2;
InCuesGap = 0;
InCuesLeftGreenZone = 12;
InCuesLeftRedZone = 7;
InCuesRightRedZone = 7;
InCuesRightGreenZone = 12;
OutCuesGap = 2;
OutCuesLeftGreenZone = 12;
OutCuesLeftRedZone = 7;
OutCuesRightRedZone = 7;
OutCuesRightGreenZone = 12;
ConnectedSubtitlesInCueClosestLeftGap = 2;
ConnectedSubtitlesInCueClosestRightGap = 0;
ConnectedSubtitlesOutCueClosestLeftGap = 2;
ConnectedSubtitlesOutCueClosestRightGap = 0;
ConnectedSubtitlesLeftGreenZone = 12;
ConnectedSubtitlesLeftRedZone = 7;
ConnectedSubtitlesRightRedZone = 7;
ConnectedSubtitlesRightGreenZone = 12;
ConnectedSubtitlesTreatConnected = 180;
ChainingGeneralUseZones = false;
ChainingGeneralMaxGap = 500;
ChainingGeneralLeftGreenZone = 12;
ChainingGeneralLeftRedZone = 11;
ChainingGeneralShotChangeBehavior = ChainingShotChangeBehaviorEnum.ExtendUntilShotChange;
ChainingInCueOnShotUseZones = false;
ChainingInCueOnShotMaxGap = 500;
ChainingInCueOnShotLeftGreenZone = 12;
ChainingInCueOnShotLeftRedZone = 11;
ChainingInCueOnShotShotChangeBehavior = ChainingShotChangeBehaviorEnum.ExtendUntilShotChange;
ChainingInCueOnShotCheckGeneral = true;
ChainingOutCueOnShotUseZones = false;
ChainingOutCueOnShotMaxGap = 500;
ChainingOutCueOnShotRightRedZone = 11;
ChainingOutCueOnShotRightGreenZone = 12;
ChainingOutCueOnShotShotChangeBehavior = ChainingShotChangeBehaviorEnum.ExtendUntilShotChange;
ChainingOutCueOnShotCheckGeneral = true;
break;
case Preset.SDI:
Gap = 4;
InCuesGap = 2;
InCuesLeftGreenZone = 12;
InCuesLeftRedZone = 7;
InCuesRightRedZone = 7;
InCuesRightGreenZone = 12;
OutCuesGap = 2;
OutCuesLeftGreenZone = 12;
OutCuesLeftRedZone = 7;
OutCuesRightRedZone = 7;
OutCuesRightGreenZone = 12;
ConnectedSubtitlesInCueClosestLeftGap = 2;
ConnectedSubtitlesInCueClosestRightGap = 2;
ConnectedSubtitlesOutCueClosestLeftGap = 2;
ConnectedSubtitlesOutCueClosestRightGap = 2;
ConnectedSubtitlesLeftGreenZone = 12;
ConnectedSubtitlesLeftRedZone = 7;
ConnectedSubtitlesRightRedZone = 7;
ConnectedSubtitlesRightGreenZone = 12;
ConnectedSubtitlesTreatConnected = 240;
ChainingGeneralUseZones = false;
ChainingGeneralMaxGap = 1000;
ChainingGeneralLeftGreenZone = 25;
ChainingGeneralLeftRedZone = 24;
ChainingGeneralShotChangeBehavior = ChainingShotChangeBehaviorEnum.ExtendCrossingShotChange;
ChainingInCueOnShotUseZones = false;
ChainingInCueOnShotMaxGap = 1000;
ChainingInCueOnShotLeftGreenZone = 25;
ChainingInCueOnShotLeftRedZone = 24;
ChainingInCueOnShotShotChangeBehavior = ChainingShotChangeBehaviorEnum.ExtendCrossingShotChange;
ChainingInCueOnShotCheckGeneral = true;
ChainingOutCueOnShotUseZones = true;
ChainingOutCueOnShotMaxGap = 500;
ChainingOutCueOnShotRightRedZone = 7;
ChainingOutCueOnShotRightGreenZone = 12;
ChainingOutCueOnShotShotChangeBehavior = ChainingShotChangeBehaviorEnum.ExtendCrossingShotChange;
ChainingOutCueOnShotCheckGeneral = true;
break;
default:
Gap = 3;
InCuesGap = 0;
InCuesLeftGreenZone = 3;
InCuesLeftRedZone = 3;
InCuesRightRedZone = 5;
InCuesRightGreenZone = 5;
OutCuesGap = 0;
OutCuesLeftGreenZone = 10;
OutCuesLeftRedZone = 10;
OutCuesRightRedZone = 3;
OutCuesRightGreenZone = 12;
ConnectedSubtitlesInCueClosestLeftGap = 3;
ConnectedSubtitlesInCueClosestRightGap = 0;
ConnectedSubtitlesOutCueClosestLeftGap = 0;
ConnectedSubtitlesOutCueClosestRightGap = 3;
ConnectedSubtitlesLeftGreenZone = 3;
ConnectedSubtitlesLeftRedZone = 3;
ConnectedSubtitlesRightRedZone = 3;
ConnectedSubtitlesRightGreenZone = 3;
ConnectedSubtitlesTreatConnected = 180;
ChainingGeneralUseZones = false;
ChainingGeneralMaxGap = 1000;
ChainingGeneralLeftGreenZone = 25;
ChainingGeneralLeftRedZone = 24;
ChainingGeneralShotChangeBehavior = ChainingShotChangeBehaviorEnum.ExtendUntilShotChange;
ChainingInCueOnShotUseZones = false;
ChainingInCueOnShotMaxGap = 1000;
ChainingInCueOnShotLeftGreenZone = 25;
ChainingInCueOnShotLeftRedZone = 24;
ChainingInCueOnShotShotChangeBehavior = ChainingShotChangeBehaviorEnum.ExtendUntilShotChange;
ChainingInCueOnShotCheckGeneral = true;
ChainingOutCueOnShotUseZones = false;
ChainingOutCueOnShotMaxGap = 500;
ChainingOutCueOnShotRightRedZone = 11;
ChainingOutCueOnShotRightGreenZone = 12;
ChainingOutCueOnShotShotChangeBehavior = ChainingShotChangeBehaviorEnum.ExtendUntilShotChange;
ChainingOutCueOnShotCheckGeneral = true;
break;
}
}
}
}
}

View File

@ -0,0 +1,16 @@
namespace Nikse.SubtitleEdit.Core.Settings
{
public class CompareSettings
{
public bool ShowOnlyDifferences { get; set; }
public bool OnlyLookForDifferenceInText { get; set; }
public bool IgnoreLineBreaks { get; set; }
public bool IgnoreWhitespace { get; set; }
public bool IgnoreFormatting { get; set; }
public CompareSettings()
{
OnlyLookForDifferenceInText = true;
}
}
}

View File

@ -0,0 +1,22 @@
using System.Drawing;
namespace Nikse.SubtitleEdit.Core.Settings
{
public class FcpExportSettings
{
public string FontName { get; set; }
public int FontSize { get; set; }
public string Alignment { get; set; }
public int Baseline { get; set; }
public Color Color { get; set; }
public FcpExportSettings()
{
FontName = "Lucida Sans";
FontSize = 36;
Alignment = "center";
Baseline = 29;
Color = Color.WhiteSmoke;
}
}
}

View File

@ -0,0 +1,340 @@
using System.Linq;
using System.Text;
namespace Nikse.SubtitleEdit.Core.Settings
{
public class FixCommonErrorsSettings
{
public string StartPosition { get; set; }
public string StartSize { get; set; }
public bool EmptyLinesTicked { get; set; }
public bool OverlappingDisplayTimeTicked { get; set; }
public bool TooShortDisplayTimeTicked { get; set; }
public bool TooLongDisplayTimeTicked { get; set; }
public bool TooShortGapTicked { get; set; }
public bool InvalidItalicTagsTicked { get; set; }
public bool BreakLongLinesTicked { get; set; }
public bool MergeShortLinesTicked { get; set; }
public bool MergeShortLinesAllTicked { get; set; }
public bool MergeShortLinesPixelWidthTicked { get; set; }
public bool UnneededSpacesTicked { get; set; }
public bool UnneededPeriodsTicked { get; set; }
public bool FixCommasTicked { get; set; }
public bool MissingSpacesTicked { get; set; }
public bool AddMissingQuotesTicked { get; set; }
public bool Fix3PlusLinesTicked { get; set; }
public bool FixHyphensTicked { get; set; }
public bool FixHyphensRemoveSingleLineTicked { get; set; }
public bool UppercaseIInsideLowercaseWordTicked { get; set; }
public bool DoubleApostropheToQuoteTicked { get; set; }
public bool AddPeriodAfterParagraphTicked { get; set; }
public bool StartWithUppercaseLetterAfterParagraphTicked { get; set; }
public bool StartWithUppercaseLetterAfterPeriodInsideParagraphTicked { get; set; }
public bool StartWithUppercaseLetterAfterColonTicked { get; set; }
public bool AloneLowercaseIToUppercaseIEnglishTicked { get; set; }
public bool FixOcrErrorsViaReplaceListTicked { get; set; }
public bool RemoveSpaceBetweenNumberTicked { get; set; }
public bool FixDialogsOnOneLineTicked { get; set; }
public bool RemoveDialogFirstLineInNonDialogs { get; set; }
public bool TurkishAnsiTicked { get; set; }
public bool DanishLetterITicked { get; set; }
public bool SpanishInvertedQuestionAndExclamationMarksTicked { get; set; }
public bool FixDoubleDashTicked { get; set; }
public bool FixDoubleGreaterThanTicked { get; set; }
public bool FixEllipsesStartTicked { get; set; }
public bool FixMissingOpenBracketTicked { get; set; }
public bool FixMusicNotationTicked { get; set; }
public bool FixContinuationStyleTicked { get; set; }
public bool FixUnnecessaryLeadingDotsTicked { get; set; }
public bool NormalizeStringsTicked { get; set; }
public string DefaultFixes { get; set; }
public FixCommonErrorsSettings()
{
SetDefaultFixes();
}
public void SaveUserDefaultFixes()
{
var sb = new StringBuilder();
if (EmptyLinesTicked)
{
sb.Append(nameof(EmptyLinesTicked) + ";");
}
if (OverlappingDisplayTimeTicked)
{
sb.Append(nameof(OverlappingDisplayTimeTicked) + ";");
}
if (TooShortDisplayTimeTicked)
{
sb.Append(nameof(TooShortDisplayTimeTicked) + ";");
}
if (TooLongDisplayTimeTicked)
{
sb.Append(nameof(TooLongDisplayTimeTicked) + ";");
}
if (TooShortGapTicked)
{
sb.Append(nameof(TooShortGapTicked) + ";");
}
if (InvalidItalicTagsTicked)
{
sb.Append(nameof(InvalidItalicTagsTicked) + ";");
}
if (BreakLongLinesTicked)
{
sb.Append(nameof(BreakLongLinesTicked) + ";");
}
if (MergeShortLinesTicked)
{
sb.Append(nameof(MergeShortLinesTicked) + ";");
}
if (MergeShortLinesAllTicked)
{
sb.Append(nameof(MergeShortLinesAllTicked) + ";");
}
if (MergeShortLinesPixelWidthTicked)
{
sb.Append(nameof(MergeShortLinesPixelWidthTicked) + ";");
}
if (UnneededSpacesTicked)
{
sb.Append(nameof(UnneededSpacesTicked) + ";");
}
if (UnneededPeriodsTicked)
{
sb.Append(nameof(UnneededPeriodsTicked) + ";");
}
if (FixCommasTicked)
{
sb.Append(nameof(FixCommasTicked) + ";");
}
if (MissingSpacesTicked)
{
sb.Append(nameof(MissingSpacesTicked) + ";");
}
if (AddMissingQuotesTicked)
{
sb.Append(nameof(AddMissingQuotesTicked) + ";");
}
if (Fix3PlusLinesTicked)
{
sb.Append(nameof(Fix3PlusLinesTicked) + ";");
}
if (FixHyphensTicked)
{
sb.Append(nameof(FixHyphensTicked) + ";");
}
if (FixHyphensRemoveSingleLineTicked)
{
sb.Append(nameof(FixHyphensRemoveSingleLineTicked) + ";");
}
if (UppercaseIInsideLowercaseWordTicked)
{
sb.Append(nameof(UppercaseIInsideLowercaseWordTicked) + ";");
}
if (DoubleApostropheToQuoteTicked)
{
sb.Append(nameof(DoubleApostropheToQuoteTicked) + ";");
}
if (AddPeriodAfterParagraphTicked)
{
sb.Append(nameof(AddPeriodAfterParagraphTicked) + ";");
}
if (StartWithUppercaseLetterAfterParagraphTicked)
{
sb.Append(nameof(StartWithUppercaseLetterAfterParagraphTicked) + ";");
}
if (StartWithUppercaseLetterAfterPeriodInsideParagraphTicked)
{
sb.Append(nameof(StartWithUppercaseLetterAfterPeriodInsideParagraphTicked) + ";");
}
if (StartWithUppercaseLetterAfterColonTicked)
{
sb.Append(nameof(StartWithUppercaseLetterAfterColonTicked) + ";");
}
if (AloneLowercaseIToUppercaseIEnglishTicked)
{
sb.Append(nameof(AloneLowercaseIToUppercaseIEnglishTicked) + ";");
}
if (FixOcrErrorsViaReplaceListTicked)
{
sb.Append(nameof(FixOcrErrorsViaReplaceListTicked) + ";");
}
if (RemoveSpaceBetweenNumberTicked)
{
sb.Append(nameof(RemoveSpaceBetweenNumberTicked) + ";");
}
if (FixDialogsOnOneLineTicked)
{
sb.Append(nameof(FixDialogsOnOneLineTicked) + ";");
}
if (RemoveDialogFirstLineInNonDialogs)
{
sb.Append(nameof(RemoveDialogFirstLineInNonDialogs) + ";");
}
if (TurkishAnsiTicked)
{
sb.Append(nameof(TurkishAnsiTicked) + ";");
}
if (DanishLetterITicked)
{
sb.Append(nameof(DanishLetterITicked) + ";");
}
if (SpanishInvertedQuestionAndExclamationMarksTicked)
{
sb.Append(nameof(SpanishInvertedQuestionAndExclamationMarksTicked) + ";");
}
if (FixDoubleDashTicked)
{
sb.Append(nameof(FixDoubleDashTicked) + ";");
}
if (FixEllipsesStartTicked)
{
sb.Append(nameof(FixEllipsesStartTicked) + ";");
}
if (FixMissingOpenBracketTicked)
{
sb.Append(nameof(FixMissingOpenBracketTicked) + ";");
}
if (FixMusicNotationTicked)
{
sb.Append(nameof(FixMusicNotationTicked) + ";");
}
if (FixContinuationStyleTicked)
{
sb.Append(nameof(FixContinuationStyleTicked) + ";");
}
if (FixUnnecessaryLeadingDotsTicked)
{
sb.Append(nameof(FixUnnecessaryLeadingDotsTicked) + ";");
}
if (NormalizeStringsTicked)
{
sb.Append(nameof(NormalizeStringsTicked) + ";");
}
DefaultFixes = sb.ToString().TrimEnd(';');
}
public void LoadUserDefaultFixes(string fixes)
{
var list = fixes.Split(';');
EmptyLinesTicked = list.Contains(nameof(EmptyLinesTicked));
OverlappingDisplayTimeTicked = list.Contains(nameof(OverlappingDisplayTimeTicked));
TooShortDisplayTimeTicked = list.Contains(nameof(TooShortDisplayTimeTicked));
TooLongDisplayTimeTicked = list.Contains(nameof(TooLongDisplayTimeTicked));
TooShortGapTicked = list.Contains(nameof(TooShortGapTicked));
InvalidItalicTagsTicked = list.Contains(nameof(InvalidItalicTagsTicked));
BreakLongLinesTicked = list.Contains(nameof(BreakLongLinesTicked));
MergeShortLinesTicked = list.Contains(nameof(MergeShortLinesTicked));
MergeShortLinesAllTicked = list.Contains(nameof(MergeShortLinesAllTicked));
MergeShortLinesPixelWidthTicked = list.Contains(nameof(MergeShortLinesPixelWidthTicked));
UnneededSpacesTicked = list.Contains(nameof(UnneededSpacesTicked));
UnneededPeriodsTicked = list.Contains(nameof(UnneededPeriodsTicked));
FixCommasTicked = list.Contains(nameof(FixCommasTicked));
MissingSpacesTicked = list.Contains(nameof(MissingSpacesTicked));
AddMissingQuotesTicked = list.Contains(nameof(AddMissingQuotesTicked));
Fix3PlusLinesTicked = list.Contains(nameof(Fix3PlusLinesTicked));
FixHyphensTicked = list.Contains(nameof(FixHyphensTicked));
FixHyphensRemoveSingleLineTicked = list.Contains(nameof(FixHyphensRemoveSingleLineTicked));
UppercaseIInsideLowercaseWordTicked = list.Contains(nameof(UppercaseIInsideLowercaseWordTicked));
DoubleApostropheToQuoteTicked = list.Contains(nameof(DoubleApostropheToQuoteTicked));
AddPeriodAfterParagraphTicked = list.Contains(nameof(AddPeriodAfterParagraphTicked));
StartWithUppercaseLetterAfterParagraphTicked = list.Contains(nameof(StartWithUppercaseLetterAfterParagraphTicked));
StartWithUppercaseLetterAfterPeriodInsideParagraphTicked = list.Contains(nameof(StartWithUppercaseLetterAfterPeriodInsideParagraphTicked));
StartWithUppercaseLetterAfterColonTicked = list.Contains(nameof(StartWithUppercaseLetterAfterColonTicked));
AloneLowercaseIToUppercaseIEnglishTicked = list.Contains(nameof(AloneLowercaseIToUppercaseIEnglishTicked));
FixOcrErrorsViaReplaceListTicked = list.Contains(nameof(FixOcrErrorsViaReplaceListTicked));
RemoveSpaceBetweenNumberTicked = list.Contains(nameof(RemoveSpaceBetweenNumberTicked));
FixDialogsOnOneLineTicked = list.Contains(nameof(FixDialogsOnOneLineTicked));
RemoveDialogFirstLineInNonDialogs = list.Contains(nameof(RemoveDialogFirstLineInNonDialogs));
TurkishAnsiTicked = list.Contains(nameof(TurkishAnsiTicked));
DanishLetterITicked = list.Contains(nameof(DanishLetterITicked));
SpanishInvertedQuestionAndExclamationMarksTicked = list.Contains(nameof(SpanishInvertedQuestionAndExclamationMarksTicked));
FixDoubleDashTicked = list.Contains(nameof(FixDoubleDashTicked));
FixEllipsesStartTicked = list.Contains(nameof(FixEllipsesStartTicked));
FixMissingOpenBracketTicked = list.Contains(nameof(FixMissingOpenBracketTicked));
FixMusicNotationTicked = list.Contains(nameof(FixMusicNotationTicked));
FixContinuationStyleTicked = list.Contains(nameof(FixContinuationStyleTicked));
FixUnnecessaryLeadingDotsTicked = list.Contains(nameof(FixUnnecessaryLeadingDotsTicked));
NormalizeStringsTicked = list.Contains(nameof(NormalizeStringsTicked));
}
public void SetDefaultFixes()
{
LoadUserDefaultFixes(string.Empty);
EmptyLinesTicked = true;
OverlappingDisplayTimeTicked = true;
TooShortDisplayTimeTicked = true;
TooLongDisplayTimeTicked = true;
TooShortGapTicked = false;
InvalidItalicTagsTicked = true;
BreakLongLinesTicked = true;
MergeShortLinesTicked = true;
MergeShortLinesPixelWidthTicked = false;
UnneededPeriodsTicked = true;
FixCommasTicked = true;
UnneededSpacesTicked = true;
MissingSpacesTicked = true;
UppercaseIInsideLowercaseWordTicked = true;
DoubleApostropheToQuoteTicked = true;
AddPeriodAfterParagraphTicked = false;
StartWithUppercaseLetterAfterParagraphTicked = true;
StartWithUppercaseLetterAfterPeriodInsideParagraphTicked = false;
StartWithUppercaseLetterAfterColonTicked = false;
AloneLowercaseIToUppercaseIEnglishTicked = false;
TurkishAnsiTicked = false;
DanishLetterITicked = false;
FixDoubleDashTicked = true;
FixDoubleGreaterThanTicked = true;
FixEllipsesStartTicked = true;
FixMissingOpenBracketTicked = true;
FixMusicNotationTicked = true;
FixContinuationStyleTicked = false;
FixUnnecessaryLeadingDotsTicked = true;
NormalizeStringsTicked = false;
SaveUserDefaultFixes();
}
}
}

View File

@ -0,0 +1,836 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using Nikse.SubtitleEdit.Core.Common;
using Nikse.SubtitleEdit.Core.Common.TextLengthCalculator;
using Nikse.SubtitleEdit.Core.Enums;
namespace Nikse.SubtitleEdit.Core.Settings
{
public class GeneralSettings
{
public List<RulesProfile> Profiles { get; set; }
public string CurrentProfile { get; set; }
public bool ShowToolbarNew { get; set; }
public bool ShowToolbarOpen { get; set; }
public bool ShowToolbarOpenVideo { get; set; }
public bool ShowToolbarSave { get; set; }
public bool ShowToolbarSaveAs { get; set; }
public bool ShowToolbarFind { get; set; }
public bool ShowToolbarReplace { get; set; }
public bool ShowToolbarFixCommonErrors { get; set; }
public bool ShowToolbarRemoveTextForHi { get; set; }
public bool ShowToolbarToggleSourceView { get; set; }
public bool ShowToolbarVisualSync { get; set; }
public bool ShowToolbarBurnIn { get; set; }
public bool ShowToolbarSpellCheck { get; set; }
public bool ShowToolbarNetflixGlyphCheck { get; set; }
public bool ShowToolbarBeautifyTimeCodes { get; set; }
public bool ShowToolbarSettings { get; set; }
public bool ShowToolbarHelp { get; set; }
public int LayoutNumber { get; set; }
public string LayoutSizes { get; set; }
public bool ShowVideoPlayer { get; set; }
public bool ShowAudioVisualizer { get; set; }
public bool ShowWaveform { get; set; }
public bool ShowSpectrogram { get; set; }
public bool ShowFrameRate { get; set; }
public bool ShowVideoControls { get; set; }
public bool TextAndOrigianlTextBoxesSwitched { get; set; }
public double DefaultFrameRate { get; set; }
public double CurrentFrameRate { get; set; }
public string DefaultSubtitleFormat { get; set; }
public string DefaultSaveAsFormat { get; set; }
public string FavoriteSubtitleFormats { get; set; }
public string DefaultEncoding { get; set; }
public bool AutoConvertToUtf8 { get; set; }
public bool AutoGuessAnsiEncoding { get; set; }
public string TranslationAutoSuffixes { get; set; }
public string TranslationAutoSuffixDefault { get; set; }
public string SystemSubtitleFontNameOverride { get; set; }
public int SystemSubtitleFontSizeOverride { get; set; }
public string SubtitleFontName { get; set; }
public int SubtitleTextBoxFontSize { get; set; }
public bool SubtitleTextBoxSyntaxColor { get; set; }
public Color SubtitleTextBoxHtmlColor { get; set; }
public Color SubtitleTextBoxAssColor { get; set; }
public int SubtitleListViewFontSize { get; set; }
public bool SubtitleTextBoxFontBold { get; set; }
public bool SubtitleListViewFontBold { get; set; }
public Color SubtitleFontColor { get; set; }
public Color SubtitleBackgroundColor { get; set; }
public string MeasureFontName { get; set; }
public int MeasureFontSize { get; set; }
public bool MeasureFontBold { get; set; }
public int SubtitleLineMaximumPixelWidth { get; set; }
public bool CenterSubtitleInTextBox { get; set; }
public bool ShowRecentFiles { get; set; }
public bool RememberSelectedLine { get; set; }
public bool StartLoadLastFile { get; set; }
public bool StartRememberPositionAndSize { get; set; }
public string StartPosition { get; set; }
public string StartSize { get; set; }
public bool StartInSourceView { get; set; }
public bool RemoveBlankLinesWhenOpening { get; set; }
public bool RemoveBadCharsWhenOpening { get; set; }
public int SubtitleLineMaximumLength { get; set; }
public int MaxNumberOfLines { get; set; }
public int MaxNumberOfLinesPlusAbort { get; set; }
public int MergeLinesShorterThan { get; set; }
public int SubtitleMinimumDisplayMilliseconds { get; set; }
public int SubtitleMaximumDisplayMilliseconds { get; set; }
public int MinimumMillisecondsBetweenLines { get; set; }
public int SetStartEndHumanDelay { get; set; }
public bool AutoWrapLineWhileTyping { get; set; }
public double SubtitleMaximumCharactersPerSeconds { get; set; }
public double SubtitleOptimalCharactersPerSeconds { get; set; }
public string CpsLineLengthStrategy { get; set; }
public double SubtitleMaximumWordsPerMinute { get; set; }
public DialogType DialogStyle { get; set; }
public ContinuationStyle ContinuationStyle { get; set; }
public int ContinuationPause { get; set; }
public string CustomContinuationStyleSuffix { get; set; }
public bool CustomContinuationStyleSuffixApplyIfComma { get; set; }
public bool CustomContinuationStyleSuffixAddSpace { get; set; }
public bool CustomContinuationStyleSuffixReplaceComma { get; set; }
public string CustomContinuationStylePrefix { get; set; }
public bool CustomContinuationStylePrefixAddSpace { get; set; }
public bool CustomContinuationStyleUseDifferentStyleGap { get; set; }
public string CustomContinuationStyleGapSuffix { get; set; }
public bool CustomContinuationStyleGapSuffixApplyIfComma { get; set; }
public bool CustomContinuationStyleGapSuffixAddSpace { get; set; }
public bool CustomContinuationStyleGapSuffixReplaceComma { get; set; }
public string CustomContinuationStyleGapPrefix { get; set; }
public bool CustomContinuationStyleGapPrefixAddSpace { get; set; }
public bool FixContinuationStyleUncheckInsertsAllCaps { get; set; }
public bool FixContinuationStyleUncheckInsertsItalic { get; set; }
public bool FixContinuationStyleUncheckInsertsLowercase { get; set; }
public bool FixContinuationStyleHideContinuationCandidatesWithoutName { get; set; }
public bool FixContinuationStyleIgnoreLyrics { get; set; }
public string SpellCheckLanguage { get; set; }
public string VideoPlayer { get; set; }
public int VideoPlayerDefaultVolume { get; set; }
public string VideoPlayerPreviewFontName { get; set; }
public int VideoPlayerPreviewFontSize { get; set; }
public bool VideoPlayerPreviewFontBold { get; set; }
public bool VideoPlayerShowStopButton { get; set; }
public bool VideoPlayerShowFullscreenButton { get; set; }
public bool VideoPlayerShowMuteButton { get; set; }
public string Language { get; set; }
public string ListViewLineSeparatorString { get; set; }
public int ListViewDoubleClickAction { get; set; }
public string SaveAsUseFileNameFrom { get; set; }
public string UppercaseLetters { get; set; }
public int DefaultAdjustMilliseconds { get; set; }
public bool AutoRepeatOn { get; set; }
public int AutoRepeatCount { get; set; }
public bool AutoContinueOn { get; set; }
public int AutoContinueDelay { get; set; }
public bool ReturnToStartAfterRepeat { get; set; }
public bool SyncListViewWithVideoWhilePlaying { get; set; }
public int AutoBackupSeconds { get; set; }
public int AutoBackupDeleteAfterMonths { get; set; }
public string SpellChecker { get; set; }
public bool AllowEditOfOriginalSubtitle { get; set; }
public bool PromptDeleteLines { get; set; }
public bool Undocked { get; set; }
public string UndockedVideoPosition { get; set; }
public bool UndockedVideoFullscreen { get; set; }
public string UndockedWaveformPosition { get; set; }
public string UndockedVideoControlsPosition { get; set; }
public bool WaveformCenter { get; set; }
public bool WaveformAutoGenWhenOpeningVideo { get; set; }
public int WaveformUpdateIntervalMs { get; set; }
public int SmallDelayMilliseconds { get; set; }
public int LargeDelayMilliseconds { get; set; }
public bool ShowOriginalAsPreviewIfAvailable { get; set; }
public int LastPacCodePage { get; set; }
public string OpenSubtitleExtraExtensions { get; set; }
public bool ListViewColumnsRememberSize { get; set; }
public int ListViewNumberWidth { get; set; }
public int ListViewStartWidth { get; set; }
public int ListViewEndWidth { get; set; }
public int ListViewDurationWidth { get; set; }
public int ListViewCpsWidth { get; set; }
public int ListViewWpmWidth { get; set; }
public int ListViewGapWidth { get; set; }
public int ListViewActorWidth { get; set; }
public int ListViewRegionWidth { get; set; }
public int ListViewTextWidth { get; set; }
public int ListViewNumberDisplayIndex { get; set; } = -1;
public int ListViewStartDisplayIndex { get; set; } = -1;
public int ListViewEndDisplayIndex { get; set; } = -1;
public int ListViewDurationDisplayIndex { get; set; } = -1;
public int ListViewCpsDisplayIndex { get; set; } = -1;
public int ListViewWpmDisplayIndex { get; set; } = -1;
public int ListViewGapDisplayIndex { get; set; } = -1;
public int ListViewActorDisplayIndex { get; set; } = -1;
public int ListViewRegionDisplayIndex { get; set; } = -1;
public int ListViewTextDisplayIndex { get; set; } = -1;
public bool DirectShowDoubleLoad { get; set; }
public string VlcWaveTranscodeSettings { get; set; }
public string VlcLocation { get; set; }
public string VlcLocationRelative { get; set; }
public string MpvVideoOutputWindows { get; set; }
public string MpvVideoOutputLinux { get; set; }
public string MpvVideoVf { get; set; }
public string MpvVideoAf { get; set; }
public string MpvExtraOptions { get; set; }
public bool MpvLogging { get; set; }
public bool MpvHandlesPreviewText { get; set; }
public Color MpvPreviewTextPrimaryColor { get; set; }
public Color MpvPreviewTextOutlineColor { get; set; }
public Color MpvPreviewTextBackgroundColor { get; set; }
public decimal MpvPreviewTextOutlineWidth { get; set; }
public decimal MpvPreviewTextShadowWidth { get; set; }
public bool MpvPreviewTextOpaqueBox { get; set; }
public string MpvPreviewTextOpaqueBoxStyle { get; set; }
public string MpvPreviewTextAlignment { get; set; }
public int MpvPreviewTextMarginVertical { get; set; }
public string MpcHcLocation { get; set; }
public string MkvMergeLocation { get; set; }
public bool UseFFmpegForWaveExtraction { get; set; }
public bool FFmpegUseCenterChannelOnly { get; set; }
public string FFmpegLocation { get; set; }
public string FFmpegSceneThreshold { get; set; }
public bool UseTimeFormatHHMMSSFF { get; set; }
public int SplitBehavior { get; set; }
public bool SplitRemovesDashes { get; set; }
public int ClearStatusBarAfterSeconds { get; set; }
public string Company { get; set; }
public bool MoveVideo100Or500MsPlaySmallSample { get; set; }
public bool DisableVideoAutoLoading { get; set; }
public bool DisableShowingLoadErrors { get; set; }
public bool AllowVolumeBoost { get; set; }
public int NewEmptyDefaultMs { get; set; }
public bool NewEmptyUseAutoDuration { get; set; }
public bool RightToLeftMode { get; set; }
public string LastSaveAsFormat { get; set; }
public bool CheckForUpdates { get; set; }
public DateTime LastCheckForUpdates { get; set; }
public bool AutoSave { get; set; }
public string PreviewAssaText { get; set; }
public string TagsInToggleHiTags { get; set; }
public string TagsInToggleCustomTags { get; set; }
public bool ShowProgress { get; set; }
public bool ShowNegativeDurationInfoOnSave { get; set; }
public bool ShowFormatRequiresUtf8Warning { get; set; }
public long DefaultVideoOffsetInMs { get; set; }
public string DefaultVideoOffsetInMsList { get; set; }
public long CurrentVideoOffsetInMs { get; set; }
public bool CurrentVideoIsSmpte { get; set; }
public bool AutoSetVideoSmpteForTtml { get; set; }
public bool AutoSetVideoSmpteForTtmlPrompt { get; set; }
public string TitleBarAsterisk { get; set; } // Show asteriks "before" or "after" file name (any other value will hide asteriks)
public bool TitleBarFullFileName { get; set; } // Show full file name with path or just file name
public bool MeasurementConverterCloseOnInsert { get; set; }
public string MeasurementConverterCategories { get; set; }
public bool SubtitleTextBoxAutoVerticalScrollBars { get; set; }
public int SubtitleTextBoxMaxHeight { get; set; }
public bool AllowLetterShortcutsInTextBox { get; set; }
public Color DarkThemeForeColor { get; set; }
public Color DarkThemeBackColor { get; set; }
public Color DarkThemeSelectedBackgroundColor { get; set; }
public Color DarkThemeDisabledColor { get; set; }
public Color LastColorPickerColor { get; set; }
public Color LastColorPickerColor1 { get; set; }
public Color LastColorPickerColor2 { get; set; }
public Color LastColorPickerColor3 { get; set; }
public Color LastColorPickerColor4 { get; set; }
public Color LastColorPickerColor5 { get; set; }
public Color LastColorPickerColor6 { get; set; }
public Color LastColorPickerColor7 { get; set; }
public Color LastColorPickerDropper { get; set; }
public string ToolbarIconTheme { get; set; }
public bool UseDarkTheme { get; set; }
public bool DarkThemeShowListViewGridLines { get; set; }
public bool ShowBetaStuff { get; set; }
public bool DebugTranslationSync { get; set; }
public bool UseLegacyDownloader { get; set; }
public bool UseLegacyHtmlColor { get; set; } = true;
public string DefaultLanguages { get; set; }
public GeneralSettings()
{
ShowToolbarNew = true;
ShowToolbarOpen = true;
ShowToolbarSave = true;
ShowToolbarSaveAs = false;
ShowToolbarFind = true;
ShowToolbarReplace = true;
ShowToolbarFixCommonErrors = false;
ShowToolbarVisualSync = true;
ShowToolbarSpellCheck = true;
ShowToolbarNetflixGlyphCheck = true;
ShowToolbarBeautifyTimeCodes = false;
ShowToolbarSettings = true;
ShowToolbarHelp = true;
ShowToolbarToggleSourceView = false;
ShowVideoPlayer = true;
ShowAudioVisualizer = true;
ShowWaveform = true;
ShowSpectrogram = true;
ShowFrameRate = false;
ShowVideoControls = true;
DefaultFrameRate = 23.976;
CurrentFrameRate = DefaultFrameRate;
SubtitleFontName = "Tahoma";
SubtitleTextBoxFontSize = 12;
SubtitleListViewFontSize = 10;
SubtitleTextBoxSyntaxColor = false;
SubtitleTextBoxHtmlColor = Color.CornflowerBlue;
SubtitleTextBoxAssColor = Color.BlueViolet;
SubtitleTextBoxFontBold = true;
SubtitleFontColor = Color.Black;
MeasureFontName = "Arial";
MeasureFontSize = 24;
MeasureFontBold = false;
SubtitleLineMaximumPixelWidth = 576;
SubtitleBackgroundColor = Color.White;
CenterSubtitleInTextBox = false;
DefaultSubtitleFormat = "SubRip";
DefaultEncoding = TextEncoding.Utf8WithBom;
AutoConvertToUtf8 = false;
AutoGuessAnsiEncoding = true;
TranslationAutoSuffixes = ";.translation;_translation;.en;_en";
TranslationAutoSuffixDefault = "<Auto>";
ShowRecentFiles = true;
RememberSelectedLine = true;
StartLoadLastFile = true;
StartRememberPositionAndSize = true;
SubtitleLineMaximumLength = 43;
MaxNumberOfLines = 2;
MaxNumberOfLinesPlusAbort = 1;
MergeLinesShorterThan = 33;
SubtitleMinimumDisplayMilliseconds = 1000;
SubtitleMaximumDisplayMilliseconds = 8 * 1000;
RemoveBadCharsWhenOpening = true;
MinimumMillisecondsBetweenLines = 24;
SetStartEndHumanDelay = 100;
AutoWrapLineWhileTyping = false;
SubtitleMaximumCharactersPerSeconds = 25.0;
SubtitleOptimalCharactersPerSeconds = 15.0;
SubtitleMaximumWordsPerMinute = 400;
DialogStyle = DialogType.DashBothLinesWithSpace;
ContinuationStyle = ContinuationStyle.None;
ContinuationPause = 300;
CustomContinuationStyleSuffix = "";
CustomContinuationStyleSuffixApplyIfComma = false;
CustomContinuationStyleSuffixAddSpace = false;
CustomContinuationStyleSuffixReplaceComma = false;
CustomContinuationStylePrefix = "";
CustomContinuationStylePrefixAddSpace = false;
CustomContinuationStyleUseDifferentStyleGap = true;
CustomContinuationStyleGapSuffix = "...";
CustomContinuationStyleGapSuffixApplyIfComma = true;
CustomContinuationStyleGapSuffixAddSpace = false;
CustomContinuationStyleGapSuffixReplaceComma = true;
CustomContinuationStyleGapPrefix = "...";
CustomContinuationStyleGapPrefixAddSpace = false;
FixContinuationStyleUncheckInsertsAllCaps = true;
FixContinuationStyleUncheckInsertsItalic = true;
FixContinuationStyleUncheckInsertsLowercase = true;
FixContinuationStyleHideContinuationCandidatesWithoutName = true;
FixContinuationStyleIgnoreLyrics = true;
SpellCheckLanguage = null;
VideoPlayer = string.Empty;
VideoPlayerDefaultVolume = 75;
VideoPlayerPreviewFontName = "Tahoma";
VideoPlayerPreviewFontSize = 12;
VideoPlayerPreviewFontBold = true;
VideoPlayerShowStopButton = true;
VideoPlayerShowMuteButton = true;
VideoPlayerShowFullscreenButton = true;
ListViewLineSeparatorString = "<br />";
ListViewDoubleClickAction = 1;
SaveAsUseFileNameFrom = "video";
UppercaseLetters = "ABCDEFGHIJKLMNOPQRSTUVWZYXÆØÃÅÄÖÉÈÁÂÀÇÊÍÓÔÕÚŁАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯĞİŞÜÙÁÌÑÎΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ";
DefaultAdjustMilliseconds = 1000;
AutoRepeatOn = true;
AutoRepeatCount = 2;
AutoContinueOn = false;
AutoContinueDelay = 2;
ReturnToStartAfterRepeat = false;
SyncListViewWithVideoWhilePlaying = false;
AutoBackupSeconds = 60 * 5;
AutoBackupDeleteAfterMonths = 3;
SpellChecker = "hunspell";
AllowEditOfOriginalSubtitle = true;
PromptDeleteLines = true;
Undocked = false;
UndockedVideoPosition = "-32000;-32000";
UndockedWaveformPosition = "-32000;-32000";
UndockedVideoControlsPosition = "-32000;-32000";
WaveformUpdateIntervalMs = 40;
SmallDelayMilliseconds = 500;
LargeDelayMilliseconds = 5000;
OpenSubtitleExtraExtensions = "*.mp4;*.m4v;*.mkv;*.ts"; // matroska/mp4/m4v files (can contain subtitles)
ListViewColumnsRememberSize = true;
DirectShowDoubleLoad = true;
VlcWaveTranscodeSettings = "acodec=s16l"; // "acodec=s16l,channels=1,ab=64,samplerate=8000";
MpvVideoOutputWindows = string.Empty; // could also be e.g. "gpu" or "directshow"
MpvVideoOutputLinux = "x11"; // could also be e.g. "x11";
MpvHandlesPreviewText = true;
MpvPreviewTextPrimaryColor = Color.White;
MpvPreviewTextOutlineColor = Color.Black;
MpvPreviewTextBackgroundColor = Color.Black;
MpvPreviewTextOutlineWidth = 1;
MpvPreviewTextShadowWidth = 1;
MpvPreviewTextOpaqueBox = false;
MpvPreviewTextOpaqueBoxStyle = "1";
MpvPreviewTextAlignment = "2";
MpvPreviewTextMarginVertical = 10;
FFmpegSceneThreshold = "0.4"; // threshold for generating shot changes - 0.2 is sensitive (more shot changes), 0.6 is less sensitive (fewer shot changes)
UseTimeFormatHHMMSSFF = false;
SplitBehavior = 1; // 0=take gap from left, 1=divide evenly, 2=take gap from right
SplitRemovesDashes = true;
ClearStatusBarAfterSeconds = 10;
MoveVideo100Or500MsPlaySmallSample = false;
DisableVideoAutoLoading = false;
NewEmptyUseAutoDuration = true;
RightToLeftMode = false;
LastSaveAsFormat = string.Empty;
SystemSubtitleFontNameOverride = string.Empty;
CheckForUpdates = true;
LastCheckForUpdates = DateTime.Now;
ShowProgress = false;
ShowNegativeDurationInfoOnSave = true;
ShowFormatRequiresUtf8Warning = true;
DefaultVideoOffsetInMs = 10 * 60 * 60 * 1000;
DefaultVideoOffsetInMsList = "36000000;3600000";
DarkThemeForeColor = Color.FromArgb(155, 155, 155);
DarkThemeBackColor = Color.FromArgb(30, 30, 30);
DarkThemeSelectedBackgroundColor = Color.FromArgb(24, 52, 75);
DarkThemeDisabledColor = Color.FromArgb(120, 120, 120);
LastColorPickerColor = Color.Yellow;
LastColorPickerColor1 = Color.Red;
LastColorPickerColor2 = Color.Green;
LastColorPickerColor3 = Color.Blue;
LastColorPickerColor4 = Color.White;
LastColorPickerColor5 = Color.Black;
LastColorPickerColor6 = Color.Cyan;
LastColorPickerColor7 = Color.DarkOrange;
LastColorPickerDropper = Color.Transparent;
ToolbarIconTheme = "Auto";
UseDarkTheme = false;
DarkThemeShowListViewGridLines = false;
AutoSetVideoSmpteForTtml = true;
AutoSetVideoSmpteForTtmlPrompt = true;
TitleBarAsterisk = "before";
MeasurementConverterCloseOnInsert = true;
MeasurementConverterCategories = "Length;Kilometers;Meters";
PreviewAssaText = "ABCDEFGHIJKL abcdefghijkl 123";
TagsInToggleHiTags = "[;]";
TagsInToggleCustomTags = "(Æ)";
SubtitleTextBoxMaxHeight = 300;
ShowBetaStuff = false;
DebugTranslationSync = false;
NewEmptyDefaultMs = 2000;
DialogStyle = DialogType.DashBothLinesWithSpace;
ContinuationStyle = ContinuationStyle.None;
if (Configuration.IsRunningOnLinux)
{
SubtitleFontName = Configuration.DefaultLinuxFontName;
VideoPlayerPreviewFontName = Configuration.DefaultLinuxFontName;
}
Profiles = new List<RulesProfile>();
CurrentProfile = "Default";
Profiles.Add(new RulesProfile
{
Name = CurrentProfile,
SubtitleLineMaximumLength = SubtitleLineMaximumLength,
MaxNumberOfLines = MaxNumberOfLines,
MergeLinesShorterThan = MergeLinesShorterThan,
SubtitleMaximumCharactersPerSeconds = (decimal)SubtitleMaximumCharactersPerSeconds,
SubtitleOptimalCharactersPerSeconds = (decimal)SubtitleOptimalCharactersPerSeconds,
SubtitleMaximumDisplayMilliseconds = SubtitleMaximumDisplayMilliseconds,
SubtitleMinimumDisplayMilliseconds = SubtitleMinimumDisplayMilliseconds,
SubtitleMaximumWordsPerMinute = (decimal)SubtitleMaximumWordsPerMinute,
CpsLineLengthStrategy = CpsLineLengthStrategy,
MinimumMillisecondsBetweenLines = MinimumMillisecondsBetweenLines,
DialogStyle = DialogStyle,
ContinuationStyle = ContinuationStyle
});
AddExtraProfiles(Profiles);
}
internal static void AddExtraProfiles(List<RulesProfile> profiles)
{
profiles.Add(new RulesProfile
{
Name = "Netflix (English)",
SubtitleLineMaximumLength = 42,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 43,
SubtitleMaximumCharactersPerSeconds = 20,
SubtitleOptimalCharactersPerSeconds = 15,
SubtitleMaximumDisplayMilliseconds = 7007,
SubtitleMinimumDisplayMilliseconds = 833,
SubtitleMaximumWordsPerMinute = 240,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 83, // 2 frames for 23.976 fps videos
DialogStyle = DialogType.DashBothLinesWithoutSpace,
ContinuationStyle = ContinuationStyle.NoneLeadingTrailingEllipsis
});
profiles.Add(new RulesProfile
{
Name = "Netflix (Other languages)",
SubtitleLineMaximumLength = 42,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 43,
SubtitleMaximumCharactersPerSeconds = 17,
SubtitleOptimalCharactersPerSeconds = 12,
SubtitleMaximumDisplayMilliseconds = 7007,
SubtitleMinimumDisplayMilliseconds = 833,
SubtitleMaximumWordsPerMinute = 204,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 83, // 2 frames for 23.976 fps videos
DialogStyle = DialogType.DashBothLinesWithSpace,
ContinuationStyle = ContinuationStyle.NoneLeadingTrailingEllipsis
});
profiles.Add(new RulesProfile
{
Name = "Netflix (Dutch)",
SubtitleLineMaximumLength = 42,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 43,
SubtitleMaximumCharactersPerSeconds = 17,
SubtitleOptimalCharactersPerSeconds = 12,
SubtitleMaximumDisplayMilliseconds = 7007,
SubtitleMinimumDisplayMilliseconds = 833,
SubtitleMaximumWordsPerMinute = 204,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 83, // 2 frames for 23.976 fps videos
DialogStyle = DialogType.DashSecondLineWithoutSpace,
ContinuationStyle = ContinuationStyle.LeadingTrailingEllipsis
});
profiles.Add(new RulesProfile
{
Name = "Netflix (Simplified Chinese)",
SubtitleLineMaximumLength = 16,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 17,
SubtitleMaximumCharactersPerSeconds = 9,
SubtitleOptimalCharactersPerSeconds = 9,
SubtitleMaximumDisplayMilliseconds = 7007,
SubtitleMinimumDisplayMilliseconds = 833,
SubtitleMaximumWordsPerMinute = 100,
CpsLineLengthStrategy = "CalcAll",
MinimumMillisecondsBetweenLines = 83, // 2 frames for 23.976 fps videos
DialogStyle = DialogType.DashBothLinesWithoutSpace,
ContinuationStyle = ContinuationStyle.LeadingTrailingEllipsis
});
profiles.Add(new RulesProfile
{
Name = "Amazon Prime (English/Spanish/French)",
SubtitleLineMaximumLength = 42,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 43,
SubtitleMaximumCharactersPerSeconds = 17,
SubtitleOptimalCharactersPerSeconds = 12,
SubtitleMaximumDisplayMilliseconds = 7007,
SubtitleMinimumDisplayMilliseconds = 1000,
SubtitleMaximumWordsPerMinute = 204,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 83, // 2 frames for 23.976 fps videos
DialogStyle = DialogType.DashBothLinesWithSpace,
ContinuationStyle = ContinuationStyle.NoneLeadingTrailingEllipsis,
});
profiles.Add(new RulesProfile
{
Name = "Amazon Prime (Arabic)",
SubtitleLineMaximumLength = 42,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 43,
SubtitleMaximumCharactersPerSeconds = 20,
SubtitleOptimalCharactersPerSeconds = 12,
SubtitleMaximumDisplayMilliseconds = 7007,
SubtitleMinimumDisplayMilliseconds = 1000,
SubtitleMaximumWordsPerMinute = 240,
CpsLineLengthStrategy = typeof(CalcAll).Name,
MinimumMillisecondsBetweenLines = 83, // 2 frames for 23.976 fps videos
DialogStyle = DialogType.DashBothLinesWithSpace,
ContinuationStyle = ContinuationStyle.NoneLeadingTrailingEllipsis,
});
profiles.Add(new RulesProfile
{
Name = "Amazon Prime (Danish)",
SubtitleLineMaximumLength = 42,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 43,
SubtitleMaximumCharactersPerSeconds = 17,
SubtitleOptimalCharactersPerSeconds = 12,
SubtitleMaximumDisplayMilliseconds = 7007,
SubtitleMinimumDisplayMilliseconds = 1000,
SubtitleMaximumWordsPerMinute = 204,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 83, // 2 frames for 23.976 fps videos
DialogStyle = DialogType.DashBothLinesWithoutSpace,
ContinuationStyle = ContinuationStyle.NoneLeadingTrailingEllipsis,
});
profiles.Add(new RulesProfile
{
Name = "Amazon Prime (Dutch)",
SubtitleLineMaximumLength = 42,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 43,
SubtitleMaximumCharactersPerSeconds = 17,
SubtitleOptimalCharactersPerSeconds = 12,
SubtitleMaximumDisplayMilliseconds = 7007,
SubtitleMinimumDisplayMilliseconds = 1000,
SubtitleMaximumWordsPerMinute = 204,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 83, // 2 frames for 23.976 fps videos
DialogStyle = DialogType.DashSecondLineWithoutSpace,
ContinuationStyle = ContinuationStyle.OnlyTrailingEllipsis,
});
profiles.Add(new RulesProfile
{
Name = "TikTok/YouTube-shorts (9:16)",
SubtitleLineMaximumLength = 24,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 0,
SubtitleMaximumCharactersPerSeconds = 25,
SubtitleOptimalCharactersPerSeconds = 18,
SubtitleMaximumDisplayMilliseconds = 5000,
SubtitleMinimumDisplayMilliseconds = 700,
SubtitleMaximumWordsPerMinute = 300,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 0,
DialogStyle = DialogType.DashBothLinesWithSpace,
ContinuationStyle = ContinuationStyle.None
});
profiles.Add(new RulesProfile
{
Name = "Arte (German/English)",
SubtitleLineMaximumLength = 40,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 41,
SubtitleMaximumCharactersPerSeconds = 20,
SubtitleOptimalCharactersPerSeconds = 12,
SubtitleMaximumDisplayMilliseconds = 10000,
SubtitleMinimumDisplayMilliseconds = 1000,
SubtitleMaximumWordsPerMinute = 240,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 200, // 5 frames for 25 fps videos
DialogStyle = DialogType.DashBothLinesWithSpace,
ContinuationStyle = ContinuationStyle.None
});
profiles.Add(new RulesProfile
{
Name = "Dutch professional subtitles (23.976/24 fps)",
SubtitleLineMaximumLength = 42,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 43,
SubtitleMaximumCharactersPerSeconds = 15,
SubtitleOptimalCharactersPerSeconds = 11,
SubtitleMaximumDisplayMilliseconds = 7007,
SubtitleMinimumDisplayMilliseconds = 1400,
SubtitleMaximumWordsPerMinute = 180,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 125,
DialogStyle = DialogType.DashSecondLineWithoutSpace,
ContinuationStyle = ContinuationStyle.OnlyTrailingDots
});
profiles.Add(new RulesProfile
{
Name = "Dutch professional subtitles (25 fps)",
SubtitleLineMaximumLength = 42,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 43,
SubtitleMaximumCharactersPerSeconds = 15,
SubtitleOptimalCharactersPerSeconds = 11,
SubtitleMaximumDisplayMilliseconds = 7000,
SubtitleMinimumDisplayMilliseconds = 1400,
SubtitleMaximumWordsPerMinute = 180,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 120,
DialogStyle = DialogType.DashSecondLineWithoutSpace,
ContinuationStyle = ContinuationStyle.OnlyTrailingDots
});
profiles.Add(new RulesProfile
{
Name = "Dutch fansubs (23.976/24 fps)",
SubtitleLineMaximumLength = 45,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 46,
SubtitleMaximumCharactersPerSeconds = 22.5m,
SubtitleOptimalCharactersPerSeconds = 12,
SubtitleMaximumDisplayMilliseconds = 7007,
SubtitleMinimumDisplayMilliseconds = 1200,
SubtitleMaximumWordsPerMinute = 300,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 125,
DialogStyle = DialogType.DashSecondLineWithSpace,
ContinuationStyle = ContinuationStyle.OnlyTrailingDots
});
profiles.Add(new RulesProfile
{
Name = "Dutch fansubs (25 fps)",
SubtitleLineMaximumLength = 45,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 46,
SubtitleMaximumCharactersPerSeconds = 22.5m,
SubtitleOptimalCharactersPerSeconds = 12,
SubtitleMaximumDisplayMilliseconds = 7000,
SubtitleMinimumDisplayMilliseconds = 1200,
SubtitleMaximumWordsPerMinute = 300,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 120,
DialogStyle = DialogType.DashSecondLineWithSpace,
ContinuationStyle = ContinuationStyle.OnlyTrailingDots
});
profiles.Add(new RulesProfile
{
Name = "Danish professional subtitles (23.976/24 fps)",
SubtitleLineMaximumLength = 40,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 41,
SubtitleMaximumCharactersPerSeconds = 15,
SubtitleOptimalCharactersPerSeconds = 10,
SubtitleMaximumDisplayMilliseconds = 8008,
SubtitleMinimumDisplayMilliseconds = 2002,
SubtitleMaximumWordsPerMinute = 180,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 125,
DialogStyle = DialogType.DashBothLinesWithSpace,
ContinuationStyle = ContinuationStyle.LeadingTrailingDashDots
});
profiles.Add(new RulesProfile
{
Name = "Danish professional subtitles (25 fps)",
SubtitleLineMaximumLength = 40,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 41,
SubtitleMaximumCharactersPerSeconds = 15,
SubtitleOptimalCharactersPerSeconds = 10,
SubtitleMaximumDisplayMilliseconds = 8000,
SubtitleMinimumDisplayMilliseconds = 2000,
SubtitleMaximumWordsPerMinute = 180,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 120,
DialogStyle = DialogType.DashBothLinesWithSpace,
ContinuationStyle = ContinuationStyle.LeadingTrailingDashDots
});
profiles.Add(new RulesProfile
{
Name = "SDI (Dutch)",
SubtitleLineMaximumLength = 37,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 38,
SubtitleMaximumCharactersPerSeconds = 18.75m,
SubtitleOptimalCharactersPerSeconds = 12,
SubtitleMaximumDisplayMilliseconds = 7000,
SubtitleMinimumDisplayMilliseconds = 1320,
SubtitleMaximumWordsPerMinute = 225,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 160,
DialogStyle = DialogType.DashSecondLineWithoutSpace,
ContinuationStyle = ContinuationStyle.OnlyTrailingDots
});
profiles.Add(new RulesProfile
{
Name = "SW2 (French) (23.976/24 fps)",
SubtitleLineMaximumLength = 40,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 41,
SubtitleMaximumCharactersPerSeconds = 25,
SubtitleOptimalCharactersPerSeconds = 18,
SubtitleMaximumDisplayMilliseconds = 5005,
SubtitleMinimumDisplayMilliseconds = 792,
SubtitleMaximumWordsPerMinute = 300,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 125,
DialogStyle = DialogType.DashBothLinesWithSpace,
ContinuationStyle = ContinuationStyle.None
});
profiles.Add(new RulesProfile
{
Name = "SW2 (French) (25 fps)",
SubtitleLineMaximumLength = 40,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 41,
SubtitleMaximumCharactersPerSeconds = 25,
SubtitleOptimalCharactersPerSeconds = 18,
SubtitleMaximumDisplayMilliseconds = 5000,
SubtitleMinimumDisplayMilliseconds = 800,
SubtitleMaximumWordsPerMinute = 300,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 120,
DialogStyle = DialogType.DashBothLinesWithSpace,
ContinuationStyle = ContinuationStyle.None
});
profiles.Add(new RulesProfile
{
Name = "SW3 (French) (23.976/24 fps)",
SubtitleLineMaximumLength = 40,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 41,
SubtitleMaximumCharactersPerSeconds = 25,
SubtitleOptimalCharactersPerSeconds = 18,
SubtitleMaximumDisplayMilliseconds = 5005,
SubtitleMinimumDisplayMilliseconds = 792,
SubtitleMaximumWordsPerMinute = 300,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 167,
DialogStyle = DialogType.DashBothLinesWithSpace,
ContinuationStyle = ContinuationStyle.None
});
profiles.Add(new RulesProfile
{
Name = "SW3 (French) (25 fps)",
SubtitleLineMaximumLength = 40,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 41,
SubtitleMaximumCharactersPerSeconds = 25,
SubtitleOptimalCharactersPerSeconds = 18,
SubtitleMaximumDisplayMilliseconds = 5000,
SubtitleMinimumDisplayMilliseconds = 800,
SubtitleMaximumWordsPerMinute = 300,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 160,
DialogStyle = DialogType.DashBothLinesWithSpace,
ContinuationStyle = ContinuationStyle.None
});
profiles.Add(new RulesProfile
{
Name = "SW4 (French) (23.976/24 fps)",
SubtitleLineMaximumLength = 40,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 41,
SubtitleMaximumCharactersPerSeconds = 25,
SubtitleOptimalCharactersPerSeconds = 18,
SubtitleMaximumDisplayMilliseconds = 5005,
SubtitleMinimumDisplayMilliseconds = 792,
SubtitleMaximumWordsPerMinute = 300,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 250,
DialogStyle = DialogType.DashBothLinesWithSpace,
ContinuationStyle = ContinuationStyle.None
});
profiles.Add(new RulesProfile
{
Name = "SW4 (French) (25 fps)",
SubtitleLineMaximumLength = 40,
MaxNumberOfLines = 2,
MergeLinesShorterThan = 41,
SubtitleMaximumCharactersPerSeconds = 25,
SubtitleOptimalCharactersPerSeconds = 18,
SubtitleMaximumDisplayMilliseconds = 5000,
SubtitleMinimumDisplayMilliseconds = 800,
SubtitleMaximumWordsPerMinute = 300,
CpsLineLengthStrategy = string.Empty,
MinimumMillisecondsBetweenLines = 240,
DialogStyle = DialogType.DashBothLinesWithSpace,
ContinuationStyle = ContinuationStyle.None
});
}
}
}

View File

@ -0,0 +1,11 @@
using System.Collections.Generic;
namespace Nikse.SubtitleEdit.Core.Settings
{
public class MultipleSearchAndReplaceGroup
{
public string Name { get; set; }
public bool Enabled { get; set; }
public List<MultipleSearchAndReplaceSetting> Rules { get; set; }
}
}

View File

@ -0,0 +1,11 @@
namespace Nikse.SubtitleEdit.Core.Settings
{
public class MultipleSearchAndReplaceSetting
{
public bool Enabled { get; set; }
public string FindWhat { get; set; }
public string ReplaceWith { get; set; }
public string SearchType { get; set; }
public string Description { get; set; }
}
}

View File

@ -0,0 +1,21 @@
using System;
namespace Nikse.SubtitleEdit.Core.Settings
{
public class NetworkSettings
{
public string UserName { get; set; }
public string WebApiUrl { get; set; }
public string SessionKey { get; set; }
public int PollIntervalSeconds { get; set; }
public string NewMessageSound { get; set; }
public NetworkSettings()
{
UserName = string.Empty;
SessionKey = Guid.NewGuid().ToString();
WebApiUrl = "https://www.nikse.dk/api/SeNet";
PollIntervalSeconds = 5;
}
}
}

View File

@ -0,0 +1,24 @@
using System;
using System.Text;
namespace Nikse.SubtitleEdit.Core.Settings
{
public class ProxySettings
{
public string ProxyAddress { get; set; }
public string AuthType { get; set; }
public bool UseDefaultCredentials { get; set; }
public string UserName { get; set; }
public string Password { get; set; }
public string Domain { get; set; }
public string DecodePassword()
{
return Encoding.UTF8.GetString(Convert.FromBase64String(Password));
}
public void EncodePassword(string unencryptedPassword)
{
Password = Convert.ToBase64String(Encoding.UTF8.GetBytes(unencryptedPassword));
}
}
}

View File

@ -0,0 +1,14 @@
namespace Nikse.SubtitleEdit.Core.Settings
{
public class RecentFileEntry
{
public string FileName { get; set; }
public string OriginalFileName { get; set; }
public string VideoFileName { get; set; }
public int AudioTrack { get; set; }
public int FirstVisibleIndex { get; set; }
public int FirstSelectedIndex { get; set; }
public long VideoOffsetInMs { get; set; }
public bool VideoIsSmpte { get; set; }
}
}

View File

@ -0,0 +1,92 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Serialization;
namespace Nikse.SubtitleEdit.Core.Settings
{
public class RecentFilesSettings
{
private const int MaxRecentFiles = 25;
[XmlArrayItem("FileName")]
public List<RecentFileEntry> Files { get; set; }
public RecentFilesSettings()
{
Files = new List<RecentFileEntry>();
}
public void Add(string fileName, int firstVisibleIndex, int firstSelectedIndex, string videoFileName, int audioTrack, string originalFileName, long videoOffset, bool isSmpte)
{
Files = Files.Where(p => !string.IsNullOrEmpty(p.FileName)).ToList();
if (string.IsNullOrEmpty(fileName) && !string.IsNullOrEmpty(originalFileName))
{
fileName = originalFileName;
originalFileName = null;
}
if (string.IsNullOrEmpty(fileName))
{
Files.Insert(0, new RecentFileEntry { FileName = string.Empty });
return;
}
var existingEntry = GetRecentFile(fileName, originalFileName);
if (existingEntry == null)
{
Files.Insert(0, new RecentFileEntry { FileName = fileName ?? string.Empty, FirstVisibleIndex = -1, FirstSelectedIndex = -1, VideoFileName = videoFileName, AudioTrack = audioTrack, OriginalFileName = originalFileName });
}
else
{
Files.Remove(existingEntry);
existingEntry.FirstSelectedIndex = firstSelectedIndex;
existingEntry.FirstVisibleIndex = firstVisibleIndex;
existingEntry.VideoFileName = videoFileName;
existingEntry.AudioTrack = audioTrack;
existingEntry.OriginalFileName = originalFileName;
existingEntry.VideoOffsetInMs = videoOffset;
existingEntry.VideoIsSmpte = isSmpte;
Files.Insert(0, existingEntry);
}
Files = Files.Take(MaxRecentFiles).ToList();
}
public void Add(string fileName, string videoFileName, int audioTrack, string originalFileName)
{
Files = Files.Where(p => !string.IsNullOrEmpty(p.FileName)).ToList();
var existingEntry = GetRecentFile(fileName, originalFileName);
if (existingEntry == null)
{
Files.Insert(0, new RecentFileEntry { FileName = fileName ?? string.Empty, FirstVisibleIndex = -1, FirstSelectedIndex = -1, VideoFileName = videoFileName, AudioTrack = audioTrack, OriginalFileName = originalFileName });
}
else
{
Files.Remove(existingEntry);
Files.Insert(0, existingEntry);
}
Files = Files.Take(MaxRecentFiles).ToList();
}
private RecentFileEntry GetRecentFile(string fileName, string originalFileName)
{
RecentFileEntry existingEntry;
if (string.IsNullOrEmpty(originalFileName))
{
existingEntry = Files.Find(p => !string.IsNullOrEmpty(p.FileName) &&
string.IsNullOrEmpty(p.OriginalFileName) &&
p.FileName.Equals(fileName, StringComparison.OrdinalIgnoreCase));
}
else
{
existingEntry = Files.Find(p => !string.IsNullOrEmpty(p.FileName) &&
!string.IsNullOrEmpty(p.OriginalFileName) &&
p.FileName.Equals(fileName, StringComparison.OrdinalIgnoreCase) &&
p.OriginalFileName.Equals(originalFileName, StringComparison.OrdinalIgnoreCase));
}
return existingEntry;
}
}
}

View File

@ -0,0 +1,38 @@
namespace Nikse.SubtitleEdit.Core.Settings
{
public class RemoveTextForHearingImpairedSettings
{
public bool RemoveTextBetweenBrackets { get; set; }
public bool RemoveTextBetweenParentheses { get; set; }
public bool RemoveTextBetweenCurlyBrackets { get; set; }
public bool RemoveTextBetweenQuestionMarks { get; set; }
public bool RemoveTextBetweenCustom { get; set; }
public string RemoveTextBetweenCustomBefore { get; set; }
public string RemoveTextBetweenCustomAfter { get; set; }
public bool RemoveTextBetweenOnlySeparateLines { get; set; }
public bool RemoveTextBeforeColon { get; set; }
public bool RemoveTextBeforeColonOnlyIfUppercase { get; set; }
public bool RemoveTextBeforeColonOnlyOnSeparateLine { get; set; }
public bool RemoveInterjections { get; set; }
public bool RemoveInterjectionsOnlyOnSeparateLine { get; set; }
public bool RemoveIfContains { get; set; }
public bool RemoveIfAllUppercase { get; set; }
public string RemoveIfContainsText { get; set; }
public bool RemoveIfOnlyMusicSymbols { get; set; }
public RemoveTextForHearingImpairedSettings()
{
RemoveTextBetweenBrackets = true;
RemoveTextBetweenParentheses = true;
RemoveTextBetweenCurlyBrackets = true;
RemoveTextBetweenQuestionMarks = true;
RemoveTextBetweenCustom = false;
RemoveTextBetweenCustomBefore = "¶";
RemoveTextBetweenCustomAfter = "¶";
RemoveTextBeforeColon = true;
RemoveTextBeforeColonOnlyIfUppercase = true;
RemoveIfContainsText = "¶";
RemoveIfOnlyMusicSymbols = true;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,540 @@
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Xml;
using Nikse.SubtitleEdit.Core.Common;
namespace Nikse.SubtitleEdit.Core.Settings
{
public class Shortcuts
{
// General
public string GeneralMergeSelectedLines { get; set; }
public string GeneralMergeWithPrevious { get; set; }
public string GeneralMergeWithNext { get; set; }
public string GeneralMergeWithPreviousAndUnbreak { get; set; }
public string GeneralMergeWithNextAndUnbreak { get; set; }
public string GeneralMergeWithPreviousAndBreak { get; set; }
public string GeneralMergeWithNextAndBreak { get; set; }
public string GeneralMergeSelectedLinesAndAutoBreak { get; set; }
public string GeneralMergeSelectedLinesAndUnbreak { get; set; }
public string GeneralMergeSelectedLinesAndUnbreakCjk { get; set; }
public string GeneralMergeSelectedLinesOnlyFirstText { get; set; }
public string GeneralMergeSelectedLinesBilingual { get; set; }
public string GeneralMergeWithPreviousBilingual { get; set; }
public string GeneralMergeWithNextBilingual { get; set; }
public string GeneralMergeOriginalAndTranslation { get; set; }
public string GeneralToggleTranslationMode { get; set; }
public string GeneralSwitchOriginalAndTranslation { get; set; }
public string GeneralSwitchOriginalAndTranslationTextBoxes { get; set; }
public string GeneralLayoutChoose { get; set; }
public string GeneralLayoutChoose1 { get; set; }
public string GeneralLayoutChoose2 { get; set; }
public string GeneralLayoutChoose3 { get; set; }
public string GeneralLayoutChoose4 { get; set; }
public string GeneralLayoutChoose5 { get; set; }
public string GeneralLayoutChoose6 { get; set; }
public string GeneralLayoutChoose7 { get; set; }
public string GeneralLayoutChoose8 { get; set; }
public string GeneralLayoutChoose9 { get; set; }
public string GeneralLayoutChoose10 { get; set; }
public string GeneralLayoutChoose11 { get; set; }
public string GeneralLayoutChoose12 { get; set; }
public string GeneralPlayFirstSelected { get; set; }
public string GeneralGoToFirstSelectedLine { get; set; }
public string GeneralGoToNextEmptyLine { get; set; }
public string GeneralGoToNextSubtitle { get; set; }
public string GeneralGoToNextSubtitlePlayTranslate { get; set; }
public string GeneralGoToNextSubtitleCursorAtEnd { get; set; }
public string GeneralGoToPrevSubtitle { get; set; }
public string GeneralGoToPrevSubtitlePlayTranslate { get; set; }
public string GeneralGoToStartOfCurrentSubtitle { get; set; }
public string GeneralGoToEndOfCurrentSubtitle { get; set; }
public string GeneralGoToPreviousSubtitleAndFocusVideo { get; set; }
public string GeneralGoToNextSubtitleAndFocusVideo { get; set; }
public string GeneralGoToPreviousSubtitleAndFocusWaveform { get; set; }
public string GeneralGoToNextSubtitleAndFocusWaveform { get; set; }
public string GeneralGoToPrevSubtitleAndPlay { get; set; }
public string GeneralGoToNextSubtitleAndPlay { get; set; }
public string GeneralToggleBookmarks { get; set; }
public string GeneralToggleBookmarksWithText { get; set; }
public string GeneralEditBookmarks { get; set; }
public string GeneralClearBookmarks { get; set; }
public string GeneralGoToBookmark { get; set; }
public string GeneralGoToPreviousBookmark { get; set; }
public string GeneralGoToNextBookmark { get; set; }
public string GeneralChooseProfile { get; set; }
public string GeneralDuplicateLine { get; set; }
public string OpenDataFolder { get; set; }
public string OpenContainingFolder { get; set; }
public string GeneralToggleView { get; set; }
public string GeneralToggleMode { get; set; }
public string GeneralTogglePreviewOnVideo { get; set; }
public string GeneralRemoveBlankLines { get; set; }
public string GeneralApplyAssaOverrideTags { get; set; }
public string GeneralSetAssaPosition { get; set; }
public string GeneralSetAssaResolution { get; set; }
public string GeneralSetAssaBgBox { get; set; }
public string GeneralColorPicker { get; set; }
public string GeneralTakeAutoBackup { get; set; }
public string GeneralHelp { get; set; }
public string GeneralFocusTextBox { get; set; }
// File
public string MainFileNew { get; set; }
public string MainFileOpen { get; set; }
public string MainFileOpenKeepVideo { get; set; }
public string MainFileSave { get; set; }
public string MainFileSaveOriginal { get; set; }
public string MainFileSaveOriginalAs { get; set; }
public string MainFileSaveAs { get; set; }
public string MainFileSaveAll { get; set; }
public string MainFileOpenOriginal { get; set; }
public string MainFileCloseOriginal { get; set; }
public string MainFileCloseTranslation { get; set; }
public string MainFileCompare { get; set; }
public string MainFileVerifyCompleteness { get; set; }
public string MainFileImportPlainText { get; set; }
public string MainFileImportBdSupForEdit { get; set; }
public string MainFileImportTimeCodes { get; set; }
public string MainFileExportEbu { get; set; }
public string MainFileExportPac { get; set; }
public string MainFileExportBdSup { get; set; }
public string MainFileExportEdlClip { get; set; }
public string MainFileExportPlainText { get; set; }
public string MainFileExit { get; set; }
// Edit
public string MainEditUndo { get; set; }
public string MainEditRedo { get; set; }
public string MainEditFind { get; set; }
public string MainEditFindNext { get; set; }
public string MainEditReplace { get; set; }
public string MainEditMultipleReplace { get; set; }
public string MainEditGoToLineNumber { get; set; }
public string MainEditRightToLeft { get; set; }
public string MainEditFixRTLViaUnicodeChars { get; set; }
public string MainEditRemoveRTLUnicodeChars { get; set; }
public string MainEditReverseStartAndEndingForRTL { get; set; }
public string MainVideoToggleControls { get; set; }
public string MainEditToggleTranslationOriginalInPreviews { get; set; }
public string MainEditInverseSelection { get; set; }
public string MainEditModifySelection { get; set; }
// Tools
public string MainToolsAdjustDuration { get; set; }
public string MainToolsAdjustDurationLimits { get; set; }
public string MainToolsFixCommonErrors { get; set; }
public string MainToolsFixCommonErrorsPreview { get; set; }
public string MainToolsMergeShortLines { get; set; }
public string MainToolsMergeDuplicateText { get; set; }
public string MainToolsMergeSameTimeCodes { get; set; }
public string MainToolsMakeEmptyFromCurrent { get; set; }
public string MainToolsSplitLongLines { get; set; }
public string MainToolsDurationsBridgeGap { get; set; }
public string MainToolsMinimumDisplayTimeBetweenParagraphs { get; set; }
public string MainToolsRenumber { get; set; }
public string MainToolsRemoveTextForHI { get; set; }
public string MainToolsConvertColorsToDialog { get; set; }
public string MainToolsChangeCasing { get; set; }
public string MainToolsAutoDuration { get; set; }
public string MainToolsBatchConvert { get; set; }
public string MainToolsMeasurementConverter { get; set; }
public string MainToolsSplit { get; set; }
public string MainToolsAppend { get; set; }
public string MainToolsJoin { get; set; }
public string MainToolsStyleManager { get; set; }
// Video
public string MainVideoOpen { get; set; }
public string MainVideoClose { get; set; }
public string MainVideoPause { get; set; }
public string MainVideoStop { get; set; }
public string MainVideoPlayFromJustBefore { get; set; }
public string MainVideoPlayFromBeginning { get; set; }
public string MainVideoPlayPauseToggle { get; set; }
public string MainVideoPlay150Speed { get; set; }
public string MainVideoPlay200Speed { get; set; }
public string MainVideoFocusSetVideoPosition { get; set; }
public string MainVideoToggleVideoControls { get; set; }
public string MainVideo1FrameLeft { get; set; }
public string MainVideo1FrameRight { get; set; }
public string MainVideo1FrameLeftWithPlay { get; set; }
public string MainVideo1FrameRightWithPlay { get; set; }
public string MainVideo100MsLeft { get; set; }
public string MainVideo100MsRight { get; set; }
public string MainVideo500MsLeft { get; set; }
public string MainVideo500MsRight { get; set; }
public string MainVideo1000MsLeft { get; set; }
public string MainVideo1000MsRight { get; set; }
public string MainVideo5000MsLeft { get; set; }
public string MainVideo5000MsRight { get; set; }
public string MainVideoXSMsLeft { get; set; }
public string MainVideoXSMsRight { get; set; }
public string MainVideoXLMsLeft { get; set; }
public string MainVideoXLMsRight { get; set; }
public string MainVideo3000MsLeft { get; set; }
public string MainVideo3000MsRight { get; set; }
public string MainVideoGoToStartCurrent { get; set; }
public string MainVideoToggleStartEndCurrent { get; set; }
public string MainVideoPlaySelectedLines { get; set; }
public string MainVideoLoopSelectedLines { get; set; }
public string MainVideoGoToPrevSubtitle { get; set; }
public string MainVideoGoToNextSubtitle { get; set; }
public string MainVideoGoToPrevTimeCode { get; set; }
public string MainVideoGoToNextTimeCode { get; set; }
public string MainVideoGoToPrevChapter { get; set; }
public string MainVideoGoToNextChapter { get; set; }
public string MainVideoSelectNextSubtitle { get; set; }
public string MainVideoFullscreen { get; set; }
public string MainVideoSlower { get; set; }
public string MainVideoFaster { get; set; }
public string MainVideoSpeedToggle { get; set; }
public string MainVideoReset { get; set; }
public string MainVideoToggleBrightness { get; set; }
public string MainVideoToggleContrast { get; set; }
public string MainVideoAudioToTextVosk { get; set; }
public string MainVideoAudioToTextWhisper { get; set; }
public string MainVideoAudioExtractAudioSelectedLines { get; set; }
public string MainVideoTextToSpeech { get; set; }
// spell check
public string MainSpellCheck { get; set; }
public string MainSpellCheckFindDoubleWords { get; set; }
public string MainSpellCheckAddWordToNames { get; set; }
// Sync
public string MainSynchronizationAdjustTimes { get; set; }
public string MainSynchronizationVisualSync { get; set; }
public string MainSynchronizationPointSync { get; set; }
public string MainSynchronizationPointSyncViaFile { get; set; }
public string MainSynchronizationChangeFrameRate { get; set; }
// List view
public string MainListViewItalic { get; set; }
public string MainListViewBold { get; set; }
public string MainListViewUnderline { get; set; }
public string MainListViewBox { get; set; }
public string MainListViewToggleQuotes { get; set; }
public string MainListViewToggleHiTags { get; set; }
public string MainListViewToggleCustomTags { get; set; }
public string MainListViewSplit { get; set; }
public string MainListViewToggleDashes { get; set; }
public string MainListViewToggleMusicSymbols { get; set; }
public string MainListViewAlignment { get; set; }
public string MainListViewAlignmentN1 { get; set; }
public string MainListViewAlignmentN2 { get; set; }
public string MainListViewAlignmentN3 { get; set; }
public string MainListViewAlignmentN4 { get; set; }
public string MainListViewAlignmentN5 { get; set; }
public string MainListViewAlignmentN6 { get; set; }
public string MainListViewAlignmentN7 { get; set; }
public string MainListViewAlignmentN8 { get; set; }
public string MainListViewAlignmentN9 { get; set; }
public string MainListViewColor1 { get; set; }
public string MainListViewColor2 { get; set; }
public string MainListViewColor3 { get; set; }
public string MainListViewColor4 { get; set; }
public string MainListViewColor5 { get; set; }
public string MainListViewColor6 { get; set; }
public string MainListViewColor7 { get; set; }
public string MainListViewColor8 { get; set; }
public string MainListViewSetNewActor { get; set; }
public string MainListViewSetActor1 { get; set; }
public string MainListViewSetActor2 { get; set; }
public string MainListViewSetActor3 { get; set; }
public string MainListViewSetActor4 { get; set; }
public string MainListViewSetActor5 { get; set; }
public string MainListViewSetActor6 { get; set; }
public string MainListViewSetActor7 { get; set; }
public string MainListViewSetActor8 { get; set; }
public string MainListViewSetActor9 { get; set; }
public string MainListViewSetActor10 { get; set; }
public string MainListViewColorChoose { get; set; }
public string MainRemoveFormatting { get; set; }
public string MainListViewCopyText { get; set; }
public string MainListViewCopyPlainText { get; set; }
public string MainListViewCopyTextFromOriginalToCurrent { get; set; }
public string MainListViewAutoDuration { get; set; }
public string MainListViewColumnDeleteText { get; set; }
public string MainListViewColumnDeleteTextAndShiftUp { get; set; }
public string MainListViewColumnInsertText { get; set; }
public string MainListViewColumnPaste { get; set; }
public string MainListViewColumnTextUp { get; set; }
public string MainListViewColumnTextDown { get; set; }
public string MainListViewGoToNextError { get; set; }
public string MainListViewListErrors { get; set; }
public string MainListViewSortByNumber { get; set; }
public string MainListViewSortByStartTime { get; set; }
public string MainListViewSortByEndTime { get; set; }
public string MainListViewSortByDuration { get; set; }
public string MainListViewSortByGap { get; set; }
public string MainListViewSortByText { get; set; }
public string MainListViewSortBySingleLineMaxLen { get; set; }
public string MainListViewSortByTextTotalLength { get; set; }
public string MainListViewSortByCps { get; set; }
public string MainListViewSortByWpm { get; set; }
public string MainListViewSortByNumberOfLines { get; set; }
public string MainListViewSortByActor { get; set; }
public string MainListViewSortByStyle { get; set; }
public string MainListViewRemoveTimeCodes { get; set; }
public string MainTextBoxSplitAtCursor { get; set; }
public string MainTextBoxSplitAtCursorAndAutoBr { get; set; }
public string MainTextBoxSplitAtCursorAndVideoPos { get; set; }
public string MainTextBoxSplitSelectedLineBilingual { get; set; }
public string MainTextBoxMoveLastWordDown { get; set; }
public string MainTextBoxMoveFirstWordFromNextUp { get; set; }
public string MainTextBoxMoveLastWordDownCurrent { get; set; }
public string MainTextBoxMoveFirstWordUpCurrent { get; set; }
public string MainTextBoxMoveFromCursorToNextAndGoToNext { get; set; }
public string MainTextBoxSelectionToLower { get; set; }
public string MainTextBoxSelectionToUpper { get; set; }
public string MainTextBoxSelectionToggleCasing { get; set; }
public string MainTextBoxSelectionToRuby { get; set; }
public string MainTextBoxToggleAutoDuration { get; set; }
public string MainCreateInsertSubAtVideoPos { get; set; }
public string MainCreateInsertSubAtVideoPosMax { get; set; }
public string MainCreateInsertSubAtVideoPosNoTextBoxFocus { get; set; }
public string MainCreateSetStart { get; set; }
public string MainCreateSetEnd { get; set; }
public string MainAdjustVideoSetStartForAppropriateLine { get; set; }
public string MainAdjustVideoSetEndForAppropriateLine { get; set; }
public string MainAdjustSetEndAndPause { get; set; }
public string MainCreateSetEndAddNewAndGoToNew { get; set; }
public string MainCreateStartDownEndUp { get; set; }
public string MainAdjustSetStartAndOffsetTheRest { get; set; }
public string MainAdjustSetStartAndOffsetTheRest2 { get; set; }
public string MainAdjustSetStartAndOffsetTheWholeSubtitle { get; set; }
public string MainAdjustSetEndAndOffsetTheRest { get; set; }
public string MainAdjustSetEndAndOffsetTheRestAndGoToNext { get; set; }
public string MainAdjustSetStartAndGotoNext { get; set; }
public string MainAdjustSetEndAndGotoNext { get; set; }
public string MainAdjustViaEndAutoStart { get; set; }
public string MainAdjustViaEndAutoStartAndGoToNext { get; set; }
public string MainAdjustSetEndMinusGapAndStartNextHere { get; set; }
public string MainSetEndAndStartNextAfterGap { get; set; }
public string MainAdjustSetStartAutoDurationAndGoToNext { get; set; }
public string MainAdjustSetEndNextStartAndGoToNext { get; set; }
public string MainAdjustStartDownEndUpAndGoToNext { get; set; }
public string MainAdjustSetStartAndEndOfPrevious { get; set; }
public string MainAdjustSetStartAndEndOfPreviousAndGoToNext { get; set; }
public string MainAdjustSetStartKeepDuration { get; set; }
public string MainAdjustSelected100MsForward { get; set; }
public string MainAdjustSelected100MsBack { get; set; }
public string MainAdjustStartXMsBack { get; set; }
public string MainAdjustStartXMsForward { get; set; }
public string MainAdjustEndXMsBack { get; set; }
public string MainAdjustEndXMsForward { get; set; }
public string MoveStartOneFrameBack { get; set; }
public string MoveStartOneFrameForward { get; set; }
public string MoveEndOneFrameBack { get; set; }
public string MoveEndOneFrameForward { get; set; }
public string MoveStartOneFrameBackKeepGapPrev { get; set; }
public string MoveStartOneFrameForwardKeepGapPrev { get; set; }
public string MoveEndOneFrameBackKeepGapNext { get; set; }
public string MoveEndOneFrameForwardKeepGapNext { get; set; }
public string MainAdjustSnapStartToNextShotChange { get; set; }
public string MainAdjustSnapEndToPreviousShotChange { get; set; }
public string MainAdjustExtendToNextShotChange { get; set; }
public string MainAdjustExtendToPreviousShotChange { get; set; }
public string MainAdjustExtendToNextSubtitle { get; set; }
public string MainAdjustExtendToPreviousSubtitle { get; set; }
public string MainAdjustExtendToNextSubtitleMinusChainingGap { get; set; }
public string MainAdjustExtendToPreviousSubtitleMinusChainingGap { get; set; }
public string MainAdjustExtendCurrentSubtitle { get; set; }
public string MainAdjustExtendPreviousLineEndToCurrentStart { get; set; }
public string MainAdjustExtendNextLineStartToCurrentEnd { get; set; }
public string MainSetInCueToClosestShotChangeLeftGreenZone { get; set; }
public string MainSetInCueToClosestShotChangeRightGreenZone { get; set; }
public string MainSetOutCueToClosestShotChangeLeftGreenZone { get; set; }
public string MainSetOutCueToClosestShotChangeRightGreenZone { get; set; }
public string GeneralAutoCalcCurrentDuration { get; set; }
public string GeneralAutoCalcCurrentDurationByOptimalReadingSpeed { get; set; }
public string GeneralAutoCalcCurrentDurationByMinReadingSpeed { get; set; }
public string MainInsertAfter { get; set; }
public string MainTextBoxAutoBreak { get; set; }
public string MainTextBoxBreakAtPosition { get; set; }
public string MainTextBoxBreakAtPositionAndGoToNext { get; set; }
public string MainTextBoxRecord { get; set; }
public string MainTextBoxUnbreak { get; set; }
public string MainTextBoxUnbreakNoSpace { get; set; }
public string MainTextBoxAssaIntellisense { get; set; }
public string MainTextBoxAssaRemoveTag { get; set; }
public string MainWaveformInsertAtCurrentPosition { get; set; }
public string MainInsertBefore { get; set; }
public string MainMergeDialog { get; set; }
public string MainMergeDialogWithNext { get; set; }
public string MainMergeDialogWithPrevious { get; set; }
public string MainAutoBalanceSelectedLines { get; set; }
public string MainEvenlyDistributeSelectedLines { get; set; }
public string MainToggleFocus { get; set; }
public string MainToggleFocusWaveform { get; set; }
public string MainToggleFocusWaveformTextBox { get; set; }
public string WaveformAdd { get; set; }
public string WaveformVerticalZoom { get; set; }
public string WaveformVerticalZoomOut { get; set; }
public string WaveformZoomIn { get; set; }
public string WaveformZoomOut { get; set; }
public string WaveformSplit { get; set; }
public string WaveformPlaySelection { get; set; }
public string WaveformPlaySelectionEnd { get; set; }
public string WaveformSearchSilenceForward { get; set; }
public string WaveformSearchSilenceBack { get; set; }
public string WaveformAddTextHere { get; set; }
public string WaveformAddTextHereFromClipboard { get; set; }
public string WaveformSetParagraphAsSelection { get; set; }
public string WaveformGoToPreviousShotChange { get; set; }
public string WaveformGoToNextShotChange { get; set; }
public string WaveformToggleShotChange { get; set; }
public string WaveformListShotChanges { get; set; }
public string WaveformGuessStart { get; set; }
public string Waveform100MsLeft { get; set; }
public string Waveform100MsRight { get; set; }
public string Waveform1000MsLeft { get; set; }
public string Waveform1000MsRight { get; set; }
public string WaveformAudioToTextVosk { get; set; }
public string WaveformAudioToTextWhisper { get; set; }
public string MainCheckFixTimingViaShotChanges { get; set; }
public string MainTranslateGoogleIt { get; set; }
public string MainTranslateGoogleTranslateIt { get; set; }
public string MainTranslateAuto { get; set; }
public string MainTranslateAutoSelectedLines { get; set; }
public string MainTranslateCustomSearch1 { get; set; }
public string MainTranslateCustomSearch2 { get; set; }
public string MainTranslateCustomSearch3 { get; set; }
public string MainTranslateCustomSearch4 { get; set; }
public string MainTranslateCustomSearch5 { get; set; }
public List<PluginShortcut> PluginShortcuts { get; set; }
public Shortcuts()
{
GeneralGoToFirstSelectedLine = "Control+L";
GeneralMergeSelectedLines = "Control+Shift+M";
GeneralToggleTranslationMode = "Control+Shift+O";
GeneralMergeOriginalAndTranslation = "Control+Alt+Shift+M";
GeneralGoToNextSubtitle = "Shift+Return";
GeneralGoToNextSubtitlePlayTranslate = "Alt+Down";
GeneralGoToPrevSubtitlePlayTranslate = "Alt+Up";
GeneralToggleBookmarksWithText = "Control+Shift+B";
OpenDataFolder = "Control+Alt+Shift+D";
GeneralToggleView = "F2";
GeneralHelp = "F1";
MainFileNew = "Control+N";
MainFileOpen = "Control+O";
MainFileSave = "Control+S";
MainFileSaveAs = "Control+Shift+S";
MainEditUndo = "Control+Z";
MainEditRedo = "Control+Y";
MainEditFind = "Control+F";
MainEditFindNext = "F3";
MainEditReplace = "Control+H";
MainEditMultipleReplace = "Control+Alt+M";
MainEditGoToLineNumber = "Control+G";
MainEditRightToLeft = "Control+Shift+Alt+R";
MainEditInverseSelection = "Control+Shift+I";
MainToolsFixCommonErrors = "Control+Shift+F";
MainToolsFixCommonErrorsPreview = "Control+P";
MainToolsRenumber = "Control+Shift+N";
MainToolsRemoveTextForHI = "Control+Shift+H";
MainToolsChangeCasing = "Control+Shift+C";
MainVideoPlayFromJustBefore = "Shift+F10";
MainVideoPlayPauseToggle = "Control+P";
MainVideoPause = "Control+Alt+P";
MainVideo500MsLeft = "Alt+Left";
MainVideo500MsRight = "Alt+Right";
MainVideoFullscreen = "Alt+Return";
MainVideoReset = "Control+D0";
MainSpellCheck = "Control+Shift+S";
MainSpellCheckFindDoubleWords = "Control+Shift+D";
MainSpellCheckAddWordToNames = "Control+Shift+L";
MainSynchronizationAdjustTimes = "Control+Shift+A";
MainSynchronizationVisualSync = "Control+Shift+V";
MainSynchronizationPointSync = "Control+Shift+P";
MainListViewItalic = "Control+I";
MainTextBoxSplitAtCursor = "Control+Alt+V";
MainTextBoxSelectionToLower = "Control+U";
MainTextBoxSelectionToUpper = "Control+Shift+U";
MainTextBoxSelectionToggleCasing = "Control+Shift+F3";
MainCreateInsertSubAtVideoPos = "Shift+F9";
MainVideoGoToStartCurrent = "Shift+F11";
MainVideoToggleStartEndCurrent = "F4";
MainVideoPlaySelectedLines = "F5";
MainVideoGoToStartCurrent = "F6";
MainVideo3000MsLeft = "F7";
MainListViewGoToNextError = "F8";
MainListViewListErrors = "Control+F8";
MainCreateSetStart = "F11";
MainCreateSetEnd = "F12";
MainAdjustSetStartAndOffsetTheRest = "Control+Space";
MainAdjustSetStartAndOffsetTheRest2 = "F9";
MainAdjustSetEndAndGotoNext = "F10";
MainInsertAfter = "Alt+Insert";
MainWaveformInsertAtCurrentPosition = "Insert";
MainInsertBefore = "Control+Shift+Insert";
MainTextBoxAutoBreak = "Control+R";
MainTranslateAuto = "Control+Shift+G";
MainAdjustExtendToNextSubtitle = "Control+Shift+E";
MainAdjustExtendToPreviousSubtitle = "Alt+Shift+E";
MainAdjustExtendToNextSubtitleMinusChainingGap = "Control+Shift+W";
MainAdjustExtendToPreviousSubtitleMinusChainingGap = "Alt+Shift+W";
WaveformVerticalZoom = "Shift+Add";
WaveformVerticalZoomOut = "Shift+Subtract";
WaveformAddTextHere = "Return";
Waveform100MsLeft = "Shift+Left";
Waveform100MsRight = "Shift+Right";
Waveform1000MsLeft = "Left";
Waveform1000MsRight = "Right";
MainCheckFixTimingViaShotChanges = "Control+Shift+D9";
PluginShortcuts = new List<PluginShortcut>();
}
public Shortcuts Clone()
{
var xws = new XmlWriterSettings { Indent = true };
var sb = new StringBuilder();
using (var textWriter = XmlWriter.Create(sb, xws))
{
textWriter.WriteStartDocument();
textWriter.WriteStartElement("Settings", string.Empty);
Settings.WriteShortcuts(this, textWriter);
textWriter.WriteEndElement();
textWriter.WriteEndDocument();
}
var doc = new XmlDocument { PreserveWhitespace = true };
doc.LoadXml(sb.ToString().Replace("encoding=\"utf-16\"", "encoding=\"utf-8\""));
var shortcuts = new Shortcuts();
Settings.ReadShortcuts(doc, shortcuts);
return shortcuts;
}
public static void Save(string fileName, Shortcuts shortcuts)
{
var xws = new XmlWriterSettings { Indent = true, Encoding = Encoding.UTF8 };
var sb = new StringBuilder();
using (var textWriter = XmlWriter.Create(sb, xws))
{
textWriter.WriteStartDocument();
textWriter.WriteStartElement("Settings", string.Empty);
Settings.WriteShortcuts(shortcuts, textWriter);
textWriter.WriteEndElement();
textWriter.WriteEndDocument();
}
File.WriteAllText(fileName, sb.ToString().Replace("encoding=\"utf-16\"", "encoding=\"utf-8\""), Encoding.UTF8);
}
public static Shortcuts Load(string fileName)
{
var doc = new XmlDocument { PreserveWhitespace = true };
using (var stream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
{
doc.Load(stream);
var shortcuts = new Shortcuts();
Settings.ReadShortcuts(doc, shortcuts);
return shortcuts;
}
}
}
}

View File

@ -0,0 +1,22 @@
using System.Drawing;
namespace Nikse.SubtitleEdit.Core.Settings
{
public class SubtitleBeaming
{
public string FontName { get; set; }
public int FontSize { get; set; }
public Color FontColor { get; set; }
public Color BorderColor { get; set; }
public int BorderWidth { get; set; }
public SubtitleBeaming()
{
FontName = "Verdana";
FontSize = 30;
FontColor = Color.White;
BorderColor = Color.DarkGray;
BorderWidth = 2;
}
}
}

View File

@ -0,0 +1,224 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using Nikse.SubtitleEdit.Core.Common;
namespace Nikse.SubtitleEdit.Core.Settings
{
public class SubtitleSettings
{
public List<AssaStorageCategory> AssaStyleStorageCategories { get; set; }
public List<string> AssaOverrideTagHistory { get; set; }
public bool AssaResolutionAutoNew { get; set; }
public bool AssaResolutionPromptChange { get; set; }
public bool AssaShowScaledBorderAndShadow { get; set; }
public bool AssaShowPlayDepth { get; set; }
public string DCinemaFontFile { get; set; }
public string DCinemaLoadFontResource { get; set; }
public int DCinemaFontSize { get; set; }
public int DCinemaBottomMargin { get; set; }
public double DCinemaZPosition { get; set; }
public int DCinemaFadeUpTime { get; set; }
public int DCinemaFadeDownTime { get; set; }
public bool DCinemaAutoGenerateSubtitleId { get; set; }
public string CurrentDCinemaSubtitleId { get; set; }
public string CurrentDCinemaMovieTitle { get; set; }
public string CurrentDCinemaReelNumber { get; set; }
public string CurrentDCinemaIssueDate { get; set; }
public string CurrentDCinemaLanguage { get; set; }
public string CurrentDCinemaEditRate { get; set; }
public string CurrentDCinemaTimeCodeRate { get; set; }
public string CurrentDCinemaStartTime { get; set; }
public string CurrentDCinemaFontId { get; set; }
public string CurrentDCinemaFontUri { get; set; }
public Color CurrentDCinemaFontColor { get; set; }
public string CurrentDCinemaFontEffect { get; set; }
public Color CurrentDCinemaFontEffectColor { get; set; }
public int CurrentDCinemaFontSize { get; set; }
public int CurrentCavena890LanguageIdLine1 { get; set; }
public int CurrentCavena890LanguageIdLine2 { get; set; }
public string CurrentCavena89Title { get; set; }
public string CurrentCavena890riginalTitle { get; set; }
public string CurrentCavena890Translator { get; set; }
public string CurrentCavena89Comment { get; set; }
public int CurrentCavena89LanguageId { get; set; }
public string Cavena890StartOfMessage { get; set; }
public bool EbuStlTeletextUseBox { get; set; }
public bool EbuStlTeletextUseDoubleHeight { get; set; }
public int EbuStlMarginTop { get; set; }
public int EbuStlMarginBottom { get; set; }
public int EbuStlNewLineRows { get; set; }
public bool EbuStlRemoveEmptyLines { get; set; }
public int PacVerticalTop { get; set; }
public int PacVerticalCenter { get; set; }
public int PacVerticalBottom { get; set; }
public string DvdStudioProHeader { get; set; }
public string TmpegEncXmlFontName { get; set; }
public string TmpegEncXmlFontHeight { get; set; }
public string TmpegEncXmlPosition { get; set; }
public bool CheetahCaptionAlwayWriteEndTime { get; set; }
public bool SamiDisplayTwoClassesAsTwoSubtitles { get; set; }
public int SamiHtmlEncodeMode { get; set; }
public string TimedText10TimeCodeFormat { get; set; }
public string TimedText10TimeCodeFormatSource { get; set; }
public bool TimedText10ShowStyleAndLanguage { get; set; }
public string TimedText10FileExtension { get; set; }
public string TimedTextItunesTopOrigin { get; set; }
public string TimedTextItunesTopExtent { get; set; }
public string TimedTextItunesBottomOrigin { get; set; }
public string TimedTextItunesBottomExtent { get; set; }
public string TimedTextItunesTimeCodeFormat { get; set; }
public string TimedTextItunesStyleAttribute { get; set; }
public string TimedTextImsc11TimeCodeFormat { get; set; }
public string TimedTextImsc11FileExtension { get; set; }
public int FcpFontSize { get; set; }
public string FcpFontName { get; set; }
public string NuendoCharacterListFile { get; set; }
public bool WebVttUseXTimestampMap { get; set; }
public bool WebVttUseMultipleXTimestampMap { get; set; }
public bool WebVttMergeLinesWithSameText { get; set; }
public long WebVttTimescale { get; set; }
public string WebVttCueAn1 { get; set; }
public string WebVttCueAn2 { get; set; }
public string WebVttCueAn3 { get; set; }
public string WebVttCueAn4 { get; set; }
public string WebVttCueAn5 { get; set; }
public string WebVttCueAn6 { get; set; }
public string WebVttCueAn7 { get; set; }
public string WebVttCueAn8 { get; set; }
public string WebVttCueAn9 { get; set; }
public string MPlayer2Extension { get; set; }
public bool TeletextItalicFix { get; set; }
public bool MccDebug { get; set; }
public bool BluRaySupSkipMerge { get; set; }
public bool BluRaySupForceMergeAll { get; set; }
public SubtitleSettings()
{
AssaStyleStorageCategories = new List<AssaStorageCategory>();
AssaOverrideTagHistory = new List<string>();
AssaResolutionAutoNew = true;
AssaResolutionPromptChange = true;
AssaShowScaledBorderAndShadow = true;
AssaShowPlayDepth = true;
DCinemaFontFile = "Arial.ttf";
DCinemaLoadFontResource = "urn:uuid:3dec6dc0-39d0-498d-97d0-928d2eb78391";
DCinemaFontSize = 42;
DCinemaBottomMargin = 8;
DCinemaZPosition = 0;
DCinemaFadeUpTime = 0;
DCinemaFadeDownTime = 0;
DCinemaAutoGenerateSubtitleId = true;
EbuStlTeletextUseBox = true;
EbuStlTeletextUseDoubleHeight = true;
EbuStlMarginTop = 0;
EbuStlMarginBottom = 2;
EbuStlNewLineRows = 2;
PacVerticalTop = 1;
PacVerticalCenter = 6;
PacVerticalBottom = 11;
DvdStudioProHeader = @"$VertAlign = Bottom
$Bold = FALSE
$Underlined = FALSE
$Italic = FALSE
$XOffset = 0
$YOffset = -5
$TextContrast = 15
$Outline1Contrast = 15
$Outline2Contrast = 13
$BackgroundContrast = 0
$ForceDisplay = FALSE
$FadeIn = 0
$FadeOut = 0
$HorzAlign = Center
";
TmpegEncXmlFontName = "Tahoma";
TmpegEncXmlFontHeight = "0.069";
TmpegEncXmlPosition = "23";
SamiDisplayTwoClassesAsTwoSubtitles = true;
SamiHtmlEncodeMode = 0;
TimedText10TimeCodeFormat = "Source";
TimedText10ShowStyleAndLanguage = true;
TimedText10FileExtension = ".xml";
TimedTextItunesTopOrigin = "0% 0%";
TimedTextItunesTopExtent = "100% 15%";
TimedTextItunesBottomOrigin = "0% 85%";
TimedTextItunesBottomExtent = "100% 15%";
TimedTextItunesTimeCodeFormat = "Frames";
TimedTextItunesStyleAttribute = "tts:fontStyle";
TimedTextImsc11TimeCodeFormat = "hh:mm:ss.ms";
TimedTextImsc11FileExtension = ".xml";
FcpFontSize = 18;
FcpFontName = "Lucida Grande";
Cavena890StartOfMessage = "10:00:00:00";
WebVttTimescale = 90000;
WebVttUseXTimestampMap = true;
WebVttUseMultipleXTimestampMap = true;
WebVttCueAn1 = "position:20%";
WebVttCueAn2 = "";
WebVttCueAn3 = "position:80%";
WebVttCueAn4 = "position:20% line:50%";
WebVttCueAn5 = "line:50%";
WebVttCueAn6 = "position:80% line:50%";
WebVttCueAn7 = "position:20% line:20%";
WebVttCueAn8 = "line:20%";
WebVttCueAn9 = "position:80% line:20%";
MPlayer2Extension = ".txt";
TeletextItalicFix = true;
}
public void InitializeDCinameSettings(bool smpte)
{
if (smpte)
{
CurrentDCinemaSubtitleId = "urn:uuid:" + Guid.NewGuid();
CurrentDCinemaLanguage = "en";
CurrentDCinemaFontUri = DCinemaLoadFontResource;
CurrentDCinemaFontId = "theFontId";
}
else
{
string hex = Guid.NewGuid().ToString().RemoveChar('-').ToLowerInvariant();
hex = hex.Insert(8, "-").Insert(13, "-").Insert(18, "-").Insert(23, "-");
CurrentDCinemaSubtitleId = hex;
CurrentDCinemaLanguage = "English";
CurrentDCinemaFontUri = DCinemaFontFile;
CurrentDCinemaFontId = "Arial";
}
CurrentDCinemaIssueDate = DateTime.Now.ToString("s");
CurrentDCinemaMovieTitle = "title";
CurrentDCinemaReelNumber = "1";
CurrentDCinemaFontColor = Color.White;
CurrentDCinemaFontEffect = "border";
CurrentDCinemaFontEffectColor = Color.Black;
CurrentDCinemaFontSize = DCinemaFontSize;
CurrentCavena890LanguageIdLine1 = -1;
CurrentCavena890LanguageIdLine2 = -1;
}
}
}

View File

@ -0,0 +1,671 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using Nikse.SubtitleEdit.Core.Common;
namespace Nikse.SubtitleEdit.Core.Settings
{
public class ToolsSettings
{
public List<AssaTemplateItem> AssaTagTemplates { get; set; }
public int StartSceneIndex { get; set; }
public int EndSceneIndex { get; set; }
public int VerifyPlaySeconds { get; set; }
public bool FixShortDisplayTimesAllowMoveStartTime { get; set; }
public bool RemoveEmptyLinesBetweenText { get; set; }
public string MusicSymbol { get; set; }
public string MusicSymbolReplace { get; set; }
public string UnicodeSymbolsToInsert { get; set; }
public bool SpellCheckAutoChangeNameCasing { get; set; }
public bool SpellCheckUseLargerFont { get; set; }
public bool SpellCheckAutoChangeNamesUseSuggestions { get; set; }
public string SpellCheckSearchEngine { get; set; }
public bool CheckOneLetterWords { get; set; }
public bool SpellCheckEnglishAllowInQuoteAsIng { get; set; }
public bool RememberUseAlwaysList { get; set; }
public bool LiveSpellCheck { get; set; }
public bool SpellCheckShowCompletedMessage { get; set; }
public bool OcrFixUseHardcodedRules { get; set; }
public bool OcrGoogleCloudVisionSeHandlesTextMerge { get; set; }
public int OcrBinaryImageCompareRgbThreshold { get; set; }
public int OcrTesseract4RgbThreshold { get; set; }
public string OcrAddLetterRow1 { get; set; }
public string OcrAddLetterRow2 { get; set; }
public string OcrTrainFonts { get; set; }
public string OcrTrainMergedLetters { get; set; }
public string OcrTrainSrtFile { get; set; }
public bool OcrUseWordSplitList { get; set; }
public bool OcrUseWordSplitListAvoidPropercase { get; set; }
public string BDOpenIn { get; set; }
public string MicrosoftBingApiId { get; set; }
public string MicrosoftTranslatorApiKey { get; set; }
public string MicrosoftTranslatorTokenEndpoint { get; set; }
public string MicrosoftTranslatorCategory { get; set; }
public string GoogleApiV2Key { get; set; }
public bool GoogleTranslateNoKeyWarningShow { get; set; }
public int GoogleApiV1ChunkSize { get; set; }
public string GoogleTranslateLastSourceLanguage { get; set; }
public string GoogleTranslateLastTargetLanguage { get; set; }
public string AutoTranslateLastName { get; set; }
public string AutoTranslateLastUrl { get; set; }
public string AutoTranslateNllbApiUrl { get; set; }
public string AutoTranslateNllbServeUrl { get; set; }
public string AutoTranslateNllbServeModel { get; set; }
public string AutoTranslateLibreUrl { get; set; }
public string AutoTranslateLibreApiKey { get; set; }
public string AutoTranslateMyMemoryApiKey { get; set; }
public string AutoTranslateSeamlessM4TUrl { get; set; }
public string AutoTranslateDeepLApiKey { get; set; }
public string AutoTranslateDeepLUrl { get; set; }
public string AutoTranslatePapagoApiKeyId { get; set; }
public string AutoTranslatePapagoApiKey { get; set; }
public string AutoTranslateDeepLFormality { get; set; }
public bool TranslateAllowSplit { get; set; }
public string TranslateLastService { get; set; }
public string TranslateMergeStrategy { get; set; }
public string TranslateViaCopyPasteSeparator { get; set; }
public int TranslateViaCopyPasteMaxSize { get; set; }
public bool TranslateViaCopyPasteAutoCopyToClipboard { get; set; }
public string ChatGptUrl { get; set; }
public string ChatGptPrompt { get; set; }
public string ChatGptApiKey { get; set; }
public string ChatGptModel { get; set; }
public string LmStudioApiUrl { get; set; }
public string LmStudioModel { get; set; }
public string LmStudioPrompt { get; set; }
public string OllamaApiUrl { get; set; }
public string OllamaModels { get; set; }
public string OllamaModel { get; set; }
public string OllamaPrompt { get; set; }
public string AnthropicApiUrl { get; set; }
public string AnthropicPrompt { get; set; }
public string AnthropicApiKey { get; set; }
public string AnthropicApiModel { get; set; }
public int AutoTranslateDelaySeconds { get; set; }
public int AutoTranslateMaxBytes { get; set; }
public string AutoTranslateStrategy { get; set; }
public string GeminiProApiKey { get; set; }
public string TextToSpeechEngine { get; set; }
public string TextToSpeechLastVoice { get; set; }
public string TextToSpeechElevenLabsApiKey { get; set; }
public string TextToSpeechAzureApiKey { get; set; }
public string TextToSpeechAzureRegion { get; set; }
public bool TextToSpeechPreview { get; set; }
public bool TextToSpeechCustomAudio { get; set; }
public bool TextToSpeechCustomAudioStereo { get; set; }
public string TextToSpeechCustomAudioEncoding { get; set; }
public bool TextToSpeechAddToVideoFile { get; set; }
public bool ListViewSyntaxColorDurationSmall { get; set; }
public bool ListViewSyntaxColorDurationBig { get; set; }
public bool ListViewSyntaxColorOverlap { get; set; }
public bool ListViewSyntaxColorLongLines { get; set; }
public bool ListViewSyntaxColorWideLines { get; set; }
public bool ListViewSyntaxColorGap { get; set; }
public bool ListViewSyntaxMoreThanXLines { get; set; }
public Color ListViewSyntaxErrorColor { get; set; }
public Color ListViewUnfocusedSelectedColor { get; set; }
public Color Color1 { get; set; }
public Color Color2 { get; set; }
public Color Color3 { get; set; }
public Color Color4 { get; set; }
public Color Color5 { get; set; }
public Color Color6 { get; set; }
public Color Color7 { get; set; }
public Color Color8 { get; set; }
public bool ListViewShowColumnStartTime { get; set; }
public bool ListViewShowColumnEndTime { get; set; }
public bool ListViewShowColumnDuration { get; set; }
public bool ListViewShowColumnCharsPerSec { get; set; }
public bool ListViewShowColumnWordsPerMin { get; set; }
public bool ListViewShowColumnGap { get; set; }
public bool ListViewShowColumnActor { get; set; }
public bool ListViewShowColumnRegion { get; set; }
public bool ListViewMultipleReplaceShowColumnRuleInfo { get; set; }
public bool SplitAdvanced { get; set; }
public string SplitOutputFolder { get; set; }
public int SplitNumberOfParts { get; set; }
public string SplitVia { get; set; }
public bool JoinCorrectTimeCodes { get; set; }
public int JoinAddMs { get; set; }
public int SplitLongLinesMax { get; set; }
public string LastShowEarlierOrLaterSelection { get; set; }
public string NewEmptyTranslationText { get; set; }
public string BatchConvertOutputFolder { get; set; }
public bool BatchConvertOverwriteExisting { get; set; }
public bool BatchConvertSaveInSourceFolder { get; set; }
public bool BatchConvertRemoveFormatting { get; set; }
public bool BatchConvertRemoveFormattingAll { get; set; }
public bool BatchConvertRemoveFormattingItalic { get; set; }
public bool BatchConvertRemoveFormattingBold { get; set; }
public bool BatchConvertRemoveFormattingUnderline { get; set; }
public bool BatchConvertRemoveFormattingFontName { get; set; }
public bool BatchConvertRemoveFormattingColor { get; set; }
public bool BatchConvertRemoveFormattingAlignment { get; set; }
public bool BatchConvertRemoveStyle { get; set; }
public bool BatchConvertBridgeGaps { get; set; }
public bool BatchConvertFixCasing { get; set; }
public bool BatchConvertRemoveTextForHI { get; set; }
public bool BatchConvertConvertColorsToDialog { get; set; }
public bool BatchConvertBeautifyTimeCodes { get; set; }
public bool BatchConvertAutoTranslate { get; set; }
public bool BatchConvertFixCommonErrors { get; set; }
public bool BatchConvertMultipleReplace { get; set; }
public bool BatchConvertFixRtl { get; set; }
public string BatchConvertFixRtlMode { get; set; }
public bool BatchConvertSplitLongLines { get; set; }
public bool BatchConvertAutoBalance { get; set; }
public bool BatchConvertSetMinDisplayTimeBetweenSubtitles { get; set; }
public bool BatchConvertMergeShortLines { get; set; }
public bool BatchConvertRemoveLineBreaks { get; set; }
public bool BatchConvertMergeSameText { get; set; }
public bool BatchConvertMergeSameTimeCodes { get; set; }
public bool BatchConvertChangeFrameRate { get; set; }
public bool BatchConvertChangeSpeed { get; set; }
public bool BatchConvertAdjustDisplayDuration { get; set; }
public bool BatchConvertApplyDurationLimits { get; set; }
public bool BatchConvertDeleteLines { get; set; }
public bool BatchConvertAssaChangeRes { get; set; }
public bool BatchConvertSortBy { get; set; }
public string BatchConvertSortByChoice { get; set; }
public bool BatchConvertOffsetTimeCodes { get; set; }
public bool BatchConvertScanFolderIncludeVideo { get; set; }
public string BatchConvertLanguage { get; set; }
public string BatchConvertFormat { get; set; }
public string BatchConvertAssStyles { get; set; }
public string BatchConvertSsaStyles { get; set; }
public bool BatchConvertUseStyleFromSource { get; set; }
public string BatchConvertExportCustomTextTemplate { get; set; }
public bool BatchConvertTsOverrideXPosition { get; set; }
public bool BatchConvertTsOverrideYPosition { get; set; }
public int BatchConvertTsOverrideBottomMargin { get; set; }
public string BatchConvertTsOverrideHAlign { get; set; }
public int BatchConvertTsOverrideHMargin { get; set; }
public bool BatchConvertTsOverrideScreenSize { get; set; }
public int BatchConvertTsScreenWidth { get; set; }
public int BatchConvertTsScreenHeight { get; set; }
public string BatchConvertTsFileNameAppend { get; set; }
public bool BatchConvertTsOnlyTeletext { get; set; }
public string BatchConvertMkvLanguageCodeStyle { get; set; }
public string BatchConvertOcrEngine { get; set; }
public string BatchConvertOcrLanguage { get; set; }
public string WaveformBatchLastFolder { get; set; }
public string ModifySelectionText { get; set; }
public string ModifySelectionRule { get; set; }
public bool ModifySelectionCaseSensitive { get; set; }
public string ExportVobSubFontName { get; set; }
public int ExportVobSubFontSize { get; set; }
public string ExportVobSubVideoResolution { get; set; }
public string ExportVobSubLanguage { get; set; }
public bool ExportVobSubSimpleRendering { get; set; }
public bool ExportVobAntiAliasingWithTransparency { get; set; }
public string ExportBluRayFontName { get; set; }
public int ExportBluRayFontSize { get; set; }
public string ExportFcpFontName { get; set; }
public string ExportFontNameOther { get; set; }
public int ExportFcpFontSize { get; set; }
public string ExportFcpImageType { get; set; }
public string ExportFcpPalNtsc { get; set; }
public string ExportBdnXmlImageType { get; set; }
public int ExportLastFontSize { get; set; }
public int ExportLastLineHeight { get; set; }
public int ExportLastBorderWidth { get; set; }
public bool ExportLastFontBold { get; set; }
public string ExportBluRayVideoResolution { get; set; }
public string ExportFcpVideoResolution { get; set; }
public Color ExportFontColor { get; set; }
public Color ExportBorderColor { get; set; }
public Color ExportShadowColor { get; set; }
public int ExportBoxBorderSize { get; set; }
public string ExportBottomMarginUnit { get; set; }
public int ExportBottomMarginPercent { get; set; }
public int ExportBottomMarginPixels { get; set; }
public string ExportLeftRightMarginUnit { get; set; }
public int ExportLeftRightMarginPercent { get; set; }
public int ExportLeftRightMarginPixels { get; set; }
public int ExportHorizontalAlignment { get; set; }
public int ExportBluRayBottomMarginPercent { get; set; }
public int ExportBluRayBottomMarginPixels { get; set; }
public int ExportBluRayShadow { get; set; }
public bool ExportBluRayRemoveSmallGaps { get; set; }
public string ExportCdgBackgroundImage { get; set; }
public int ExportCdgMarginLeft { get; set; }
public int ExportCdgMarginBottom { get; set; }
public string ExportCdgFormat { get; set; }
public int Export3DType { get; set; }
public int Export3DDepth { get; set; }
public int ExportLastShadowTransparency { get; set; }
public double ExportLastFrameRate { get; set; }
public bool ExportFullFrame { get; set; }
public bool ExportFcpFullPathUrl { get; set; }
public string ExportPenLineJoin { get; set; }
public Color BinEditBackgroundColor { get; set; }
public Color BinEditImageBackgroundColor { get; set; }
public int BinEditTopMargin { get; set; }
public int BinEditBottomMargin { get; set; }
public int BinEditLeftMargin { get; set; }
public int BinEditRightMargin { get; set; }
public string BinEditStartPosition { get; set; }
public string BinEditStartSize { get; set; }
public bool BinEditShowColumnGap { get; set; }
public bool FixCommonErrorsFixOverlapAllowEqualEndStart { get; set; }
public bool FixCommonErrorsSkipStepOne { get; set; }
public string ImportTextSplitting { get; set; }
public string ImportTextSplittingLineMode { get; set; }
public string ImportTextLineBreak { get; set; }
public bool ImportTextMergeShortLines { get; set; }
public bool ImportTextRemoveEmptyLines { get; set; }
public bool ImportTextAutoSplitAtBlank { get; set; }
public bool ImportTextRemoveLinesNoLetters { get; set; }
public bool ImportTextGenerateTimeCodes { get; set; }
public bool ImportTextTakeTimeCodeFromFileName { get; set; }
public bool ImportTextAutoBreak { get; set; }
public bool ImportTextAutoBreakAtEnd { get; set; }
public decimal ImportTextGap { get; set; }
public decimal ImportTextAutoSplitNumberOfLines { get; set; }
public string ImportTextAutoBreakAtEndMarkerText { get; set; }
public bool ImportTextDurationAuto { get; set; }
public decimal ImportTextFixedDuration { get; set; }
public string GenerateTimeCodePatterns { get; set; }
public string MusicSymbolStyle { get; set; }
public int BridgeGapMilliseconds { get; set; }
public int BridgeGapMillisecondsMinGap { get; set; }
public string ExportCustomTemplates { get; set; }
public string ChangeCasingChoice { get; set; }
public bool ChangeCasingNormalFixNames { get; set; }
public bool ChangeCasingNormalOnlyUppercase { get; set; }
public bool UseNoLineBreakAfter { get; set; }
public string NoLineBreakAfterEnglish { get; set; }
public List<string> FindHistory { get; set; }
public string ReplaceIn { get; set; }
public string ExportTextFormatText { get; set; }
public bool ExportTextRemoveStyling { get; set; }
public bool ExportTextShowLineNumbers { get; set; }
public bool ExportTextShowLineNumbersNewLine { get; set; }
public bool ExportTextShowTimeCodes { get; set; }
public bool ExportTextShowTimeCodesNewLine { get; set; }
public bool ExportTextNewLineAfterText { get; set; }
public bool ExportTextNewLineBetweenSubtitles { get; set; }
public string ExportTextTimeCodeFormat { get; set; }
public string ExportTextTimeCodeSeparator { get; set; }
public bool VideoOffsetKeepTimeCodes { get; set; }
public int MoveStartEndMs { get; set; }
public decimal AdjustDurationSeconds { get; set; }
public int AdjustDurationPercent { get; set; }
public string AdjustDurationLast { get; set; }
public bool AdjustDurationExtendOnly { get; set; }
public bool AdjustDurationExtendEnforceDurationLimits { get; set; }
public bool AdjustDurationExtendCheckShotChanges { get; set; }
public bool ChangeSpeedAllowOverlap { get; set; }
public bool AutoBreakCommaBreakEarly { get; set; }
public bool AutoBreakDashEarly { get; set; }
public bool AutoBreakLineEndingEarly { get; set; }
public bool AutoBreakUsePixelWidth { get; set; }
public bool AutoBreakPreferBottomHeavy { get; set; }
public double AutoBreakPreferBottomPercent { get; set; }
public bool ApplyMinimumDurationLimit { get; set; }
public bool ApplyMinimumDurationLimitCheckShotChanges { get; set; }
public bool ApplyMaximumDurationLimit { get; set; }
public int MergeShortLinesMaxGap { get; set; }
public int MergeShortLinesMaxChars { get; set; }
public bool MergeShortLinesOnlyContinuous { get; set; }
public int MergeTextWithSameTimeCodesMaxGap { get; set; }
public bool MergeTextWithSameTimeCodesMakeDialog { get; set; }
public bool MergeTextWithSameTimeCodesReBreakLines { get; set; }
public int MergeLinesWithSameTextMaxMs { get; set; }
public bool MergeLinesWithSameTextIncrement { get; set; }
public bool ConvertColorsToDialogRemoveColorTags { get; set; }
public bool ConvertColorsToDialogAddNewLines { get; set; }
public bool ConvertColorsToDialogReBreakLines { get; set; }
public string ColumnPasteColumn { get; set; }
public string ColumnPasteOverwriteMode { get; set; }
public string AssaAttachmentFontTextPreview { get; set; }
public string AssaSetPositionTarget { get; set; }
public string VisualSyncStartSize { get; set; }
public Color BlankVideoColor { get; set; }
public bool BlankVideoUseCheckeredImage { get; set; }
public int BlankVideoMinutes { get; set; }
public decimal BlankVideoFrameRate { get; set; }
public Color AssaProgressBarForeColor { get; set; }
public Color AssaProgressBarBackColor { get; set; }
public Color AssaProgressBarTextColor { get; set; }
public int AssaProgressBarHeight { get; set; }
public int AssaProgressBarSplitterWidth { get; set; }
public int AssaProgressBarSplitterHeight { get; set; }
public string AssaProgressBarFontName { get; set; }
public int AssaProgressBarFontSize { get; set; }
public bool AssaProgressBarTopAlign { get; set; }
public string AssaProgressBarTextAlign { get; set; }
public int AssaBgBoxPaddingLeft { get; set; }
public int AssaBgBoxPaddingRight { get; set; }
public int AssaBgBoxPaddingTop { get; set; }
public int AssaBgBoxPaddingBottom { get; set; }
public int AssaBgBoxDrawingMarginV { get; set; }
public int AssaBgBoxDrawingMarginH { get; set; }
public string AssaBgBoxDrawingAlignment { get; set; }
public Color AssaBgBoxColor { get; set; }
public Color AssaBgBoxOutlineColor { get; set; }
public Color AssaBgBoxShadowColor { get; set; }
public Color AssaBgBoxTransparentColor { get; set; }
public string AssaBgBoxStyle { get; set; }
public int AssaBgBoxStyleRadius { get; set; }
public int AssaBgBoxStyleCircleAdjustY { get; set; }
public int AssaBgBoxStyleSpikesStep { get; set; }
public int AssaBgBoxStyleSpikesHeight { get; set; }
public int AssaBgBoxStyleBubblesStep { get; set; }
public int AssaBgBoxStyleBubblesHeight { get; set; }
public int AssaBgBoxOutlineWidth { get; set; }
public int AssaBgBoxLayer { get; set; }
public string AssaBgBoxDrawing { get; set; }
public bool AssaBgBoxDrawingFileWatch { get; set; }
public bool AssaBgBoxDrawingOnly { get; set; }
public string GenVideoFontName { get; set; }
public bool GenVideoFontBold { get; set; }
public decimal GenVideoOutline { get; set; }
public int GenVideoFontSize { get; set; }
public string GenVideoEncoding { get; set; }
public string GenVideoPreset { get; set; }
public string GenVideoCrf { get; set; }
public string GenVideoTune { get; set; }
public string GenVideoAudioEncoding { get; set; }
public bool GenVideoAudioForceStereo { get; set; }
public string GenVideoAudioSampleRate { get; set; }
public bool GenVideoTargetFileSize { get; set; }
public float GenVideoFontSizePercentOfHeight { get; set; }
public bool GenVideoNonAssaBox { get; set; }
public bool GenTransparentVideoNonAssaBox { get; set; }
public Color GenVideoNonAssaBoxColor { get; set; }
public Color GenVideoNonAssaTextColor { get; set; }
public bool GenVideoNonAssaAlignRight { get; set; }
public bool GenVideoNonAssaFixRtlUnicode { get; set; }
public string GenVideoEmbedOutputExt { get; set; }
public string GenVideoEmbedOutputSuffix { get; set; }
public string GenVideoEmbedOutputReplace { get; set; }
public bool GenVideoDeleteInputVideoFile { get; set; }
public bool GenVideoUseOutputFolder { get; set; }
public string GenVideoOutputFolder { get; set; }
public string GenVideoOutputFileSuffix { get; set; }
public bool VoskPostProcessing { get; set; }
public string VoskModel { get; set; }
public string WhisperChoice { get; set; }
public bool WhisperIgnoreVersion { get; set; }
public bool WhisperDeleteTempFiles { get; set; }
public string WhisperModel { get; set; }
public string WhisperLanguageCode { get; set; }
public string WhisperLocation { get; set; }
public string WhisperCtranslate2Location { get; set; }
public string WhisperPurfviewFasterWhisperLocation { get; set; }
public string WhisperPurfviewFasterWhisperDefaultCmd { get; set; }
public string WhisperXLocation { get; set; }
public string WhisperStableTsLocation { get; set; }
public string WhisperCppModelLocation { get; set; }
public string WhisperExtraSettings { get; set; }
public string WhisperExtraSettingsHistory { get; set; }
public bool WhisperAutoAdjustTimings { get; set; }
public bool WhisperUseLineMaxChars { get; set; }
public bool WhisperPostProcessingAddPeriods { get; set; }
public bool WhisperPostProcessingMergeLines { get; set; }
public bool WhisperPostProcessingSplitLines { get; set; }
public bool WhisperPostProcessingFixCasing { get; set; }
public bool WhisperPostProcessingFixShortDuration { get; set; }
public int AudioToTextLineMaxChars { get; set; }
public int AudioToTextLineMaxCharsJp { get; set; }
public int AudioToTextLineMaxCharsCn { get; set; }
public int BreakLinesLongerThan { get; set; }
public int UnbreakLinesLongerThan { get; set; }
public ToolsSettings()
{
AssaTagTemplates = new List<AssaTemplateItem>();
StartSceneIndex = 1;
EndSceneIndex = 1;
VerifyPlaySeconds = 2;
FixShortDisplayTimesAllowMoveStartTime = false;
RemoveEmptyLinesBetweenText = true;
MusicSymbol = "♪";
MusicSymbolReplace = "♪,â™," + // ♪ + ♫ in UTF-8 opened as ANSI
"<s M/>,<s m/>," + // music symbols by subtitle creator
"#,*,¶"; // common music symbols
UnicodeSymbolsToInsert = "♪;♫;°;☺;☹;♥;©;☮;☯;Σ;∞;≡;⇒;π";
SpellCheckAutoChangeNameCasing = false;
SpellCheckAutoChangeNamesUseSuggestions = false;
OcrFixUseHardcodedRules = true;
OcrGoogleCloudVisionSeHandlesTextMerge = true;
OcrBinaryImageCompareRgbThreshold = 200;
OcrTesseract4RgbThreshold = 200;
OcrAddLetterRow1 = "♪;á;é;í;ó;ö;ő;ú;ü;ű;ç;ñ;å;¿";
OcrAddLetterRow2 = "♫;Á;É;Í;Ó;Ö;Ő;Ú;Ü;Ű;Ç;Ñ;Å;¡";
OcrTrainFonts = "Arial;Calibri;Corbel;Futura Std Book;Futura Bis;Helvetica Neue;Lucida Console;Tahoma;Trebuchet MS;Verdana";
OcrTrainMergedLetters = "ff ft fi fj fy fl rf rt rv rw ry rt rz ryt tt TV tw yt yw wy wf ryt xy";
OcrUseWordSplitList = true;
OcrUseWordSplitListAvoidPropercase = true;
MicrosoftTranslatorTokenEndpoint = "https://api.cognitive.microsoft.com/sts/v1.0/issueToken";
GoogleTranslateNoKeyWarningShow = true;
GoogleApiV1ChunkSize = 1500;
GoogleTranslateLastTargetLanguage = "en";
AutoTranslateNllbServeUrl = "http://127.0.0.1:6060/";
AutoTranslateNllbApiUrl = "http://localhost:7860/api/v2/";
AutoTranslateLibreUrl = "http://localhost:5000/";
AutoTranslateSeamlessM4TUrl = "http://localhost:5000/";
AutoTranslateDeepLUrl = "https://api-free.deepl.com/";
ChatGptUrl = "https://api.openai.com/v1/chat/completions";
ChatGptPrompt = "Translate from {0} to {1}, keep punctuation as input, do not censor the translation, give only the output without comments:";
ChatGptModel = "gpt-4o";
LmStudioPrompt = "Translate from {0} to {1}, keep punctuation as input, do not censor the translation, give only the output without comments:";
OllamaApiUrl = "http://localhost:11434/api/generate";
OllamaModels = "llama3,llama2,mistral,dolphin-phi,phi,neural-chat,starling-lm,codellama,llama2-uncensored,llama2:13b,llama2:70b,orca-mini,vicuna,llava,gemma:2b,gemma:7b";
OllamaModel = "llama3";
OllamaPrompt = "Translate from {0} to {1}, keep punctuation as input, do not censor the translation, give only the output without comments or notes:";
AnthropicApiUrl = "https://api.anthropic.com/v1/messages";
AnthropicPrompt = "Translate from {0} to {1}, keep sentences in {1} as they are, do not censor the translation, give only the output without comments:";
AnthropicApiModel = "claude-3-5-sonnet-20240620";
TextToSpeechAzureRegion = "westeurope";
AutoTranslateMaxBytes = 2000;
TextToSpeechAddToVideoFile = true;
TranslateAllowSplit = true;
TranslateViaCopyPasteAutoCopyToClipboard = true;
TranslateViaCopyPasteMaxSize = 5000;
TranslateViaCopyPasteSeparator = ".";
CheckOneLetterWords = true;
SpellCheckEnglishAllowInQuoteAsIng = false;
SpellCheckShowCompletedMessage = true;
ListViewSyntaxColorDurationSmall = true;
ListViewSyntaxColorDurationBig = true;
ListViewSyntaxColorOverlap = true;
ListViewSyntaxColorLongLines = true;
ListViewSyntaxColorWideLines = false;
ListViewSyntaxMoreThanXLines = true;
ListViewSyntaxColorGap = true;
ListViewSyntaxErrorColor = Color.FromArgb(255, 180, 150);
ListViewUnfocusedSelectedColor = Color.LightBlue;
Color1 = Color.Yellow;
Color2 = Color.FromArgb(byte.MaxValue, 0, 0);
Color3 = Color.FromArgb(0, byte.MaxValue, 0);
Color4 = Color.Cyan;
Color5 = Color.Black;
Color6 = Color.White;
Color7 = Color.Orange;
Color8 = Color.Pink;
ListViewShowColumnStartTime = true;
ListViewShowColumnEndTime = true;
ListViewShowColumnDuration = true;
SplitAdvanced = false;
SplitNumberOfParts = 3;
SplitVia = "Lines";
JoinCorrectTimeCodes = true;
SplitLongLinesMax = 90;
NewEmptyTranslationText = string.Empty;
BatchConvertLanguage = string.Empty;
BatchConvertTsOverrideBottomMargin = 5; // pct
BatchConvertTsScreenWidth = 1920;
BatchConvertTsScreenHeight = 1080;
BatchConvertOcrEngine = "Tesseract";
BatchConvertOcrLanguage = "en";
BatchConvertTsOverrideHAlign = "center"; // left center right
BatchConvertTsOverrideHMargin = 5; // pct
BatchConvertTsFileNameAppend = ".{two-letter-country-code}";
BatchConvertMkvLanguageCodeStyle = "2";
ModifySelectionRule = "Contains";
ModifySelectionText = string.Empty;
ImportTextDurationAuto = true;
ImportTextGap = 84;
ImportTextFixedDuration = 2500;
GenerateTimeCodePatterns = "HH:mm:ss;yyyy-MM-dd;dddd dd MMMM yyyy <br>HH:mm:ss;dddd dd MMMM yyyy <br>hh:mm:ss tt;s";
MusicSymbolStyle = "Double"; // 'Double' or 'Single'
ExportFontColor = Color.White;
ExportBorderColor = Color.FromArgb(255, 0, 0, 0);
ExportShadowColor = Color.FromArgb(255, 0, 0, 0);
ExportBoxBorderSize = 8;
ExportBottomMarginUnit = "%";
ExportBottomMarginPercent = 5;
ExportBottomMarginPixels = 15;
ExportLeftRightMarginUnit = "%";
ExportLeftRightMarginPercent = 5;
ExportLeftRightMarginPixels = 15;
ExportHorizontalAlignment = 1; // 1=center (0=left, 2=right)
ExportVobSubSimpleRendering = false;
ExportVobAntiAliasingWithTransparency = true;
ExportBluRayBottomMarginPercent = 5;
ExportBluRayBottomMarginPixels = 20;
ExportBluRayShadow = 1;
Export3DType = 0;
Export3DDepth = 0;
ExportCdgMarginLeft = 160;
ExportCdgMarginBottom = 67;
ExportLastShadowTransparency = 200;
ExportLastFrameRate = 24.0d;
ExportFullFrame = false;
ExportPenLineJoin = "Round";
ExportFcpImageType = "Bmp";
ExportFcpPalNtsc = "PAL";
ExportLastBorderWidth = 4;
BinEditBackgroundColor = Color.Black;
BinEditImageBackgroundColor = Color.Blue;
BinEditTopMargin = 10;
BinEditBottomMargin = 10;
BinEditLeftMargin = 10;
BinEditRightMargin = 10;
BridgeGapMilliseconds = 100;
BridgeGapMillisecondsMinGap = 24;
ChangeCasingNormalFixNames = true;
ExportCustomTemplates = "SubRipÆÆ{number}\r\n{start} --> {end}\r\n{text}\r\n\r\nÆhh:mm:ss,zzzÆ[Do not modify]ÆÆsrtæMicroDVDÆÆ{{start}}{{end}}{text}\r\nÆffÆ||ÆÆsub";
UseNoLineBreakAfter = false;
NoLineBreakAfterEnglish = " Mrs.; Ms.; Mr.; Dr.; a; an; the; my; my own; your; his; our; their; it's; is; are;'s; 're; would;'ll;'ve;'d; will; that; which; who; whom; whose; whichever; whoever; wherever; each; either; every; all; both; few; many; sevaral; all; any; most; been; been doing; none; some; my own; your own; his own; her own; our own; their own; I; she; he; as per; as regards; into; onto; than; where as; abaft; aboard; about; above; across; afore; after; against; along; alongside; amid; amidst; among; amongst; anenst; apropos; apud; around; as; aside; astride; at; athwart; atop; barring; before; behind; below; beneath; beside; besides; between; betwixt; beyond; but; by; circa; ca; concerning; despite; down; during; except; excluding; following; for; forenenst; from; given; in; including; inside; into; lest; like; minus; modulo; near; next; of; off; on; onto; opposite; out; outside; over; pace; past; per; plus; pro; qua; regarding; round; sans; save; since; than; through; thru; throughout; thruout; till; to; toward; towards; under; underneath; unlike; until; unto; up; upon; versus; vs; via; vice; with; within; without; considering; respecting; one; two; another; three; our; five; six; seven; eight; nine; ten; eleven; twelve; thirteen; fourteen; fifteen; sixteen; seventeen; eighteen; nineteen; twenty; thirty; forty; fifty; sixty; seventy; eighty; ninety; hundred; thousand; million; billion; trillion; while; however; what; zero; little; enough; after; although; and; as; if; though; although; because; before; both; but; even; how; than; nor; or; only; unless; until; yet; was; were";
FindHistory = new List<string>();
ExportTextFormatText = "None";
ExportTextRemoveStyling = true;
ExportTextShowLineNumbersNewLine = true;
ExportTextShowTimeCodesNewLine = true;
ExportTextNewLineAfterText = true;
ExportTextNewLineBetweenSubtitles = true;
ImportTextLineBreak = "|";
ImportTextAutoSplitNumberOfLines = 2;
ImportTextAutoSplitAtBlank = true;
ImportTextAutoBreakAtEndMarkerText = ".!?";
ImportTextAutoBreakAtEnd = true;
MoveStartEndMs = 100;
AdjustDurationSeconds = 0.1m;
AdjustDurationPercent = 120;
AdjustDurationExtendOnly = true;
AdjustDurationExtendEnforceDurationLimits = true;
AdjustDurationExtendCheckShotChanges = true;
AutoBreakCommaBreakEarly = false;
AutoBreakDashEarly = true;
AutoBreakLineEndingEarly = false;
AutoBreakUsePixelWidth = true;
AutoBreakPreferBottomHeavy = true;
AutoBreakPreferBottomPercent = 5;
ApplyMinimumDurationLimit = true;
ApplyMinimumDurationLimitCheckShotChanges = true;
ApplyMaximumDurationLimit = true;
MergeShortLinesMaxGap = 250;
MergeShortLinesMaxChars = 55;
MergeShortLinesOnlyContinuous = true;
MergeTextWithSameTimeCodesMaxGap = 250;
MergeTextWithSameTimeCodesReBreakLines = false;
MergeLinesWithSameTextMaxMs = 250;
MergeLinesWithSameTextIncrement = true;
MergeTextWithSameTimeCodesMakeDialog = false;
ConvertColorsToDialogRemoveColorTags = true;
ConvertColorsToDialogAddNewLines = true;
ConvertColorsToDialogReBreakLines = false;
ColumnPasteColumn = "all";
ColumnPasteOverwriteMode = "overwrite";
AssaAttachmentFontTextPreview =
"Hello World!" + Environment.NewLine +
"こんにちは世界" + Environment.NewLine +
"你好世界!" + Environment.NewLine +
"1234567890";
BlankVideoColor = Color.CadetBlue;
BlankVideoUseCheckeredImage = true;
BlankVideoMinutes = 2;
BlankVideoFrameRate = 23.976m;
AssaProgressBarForeColor = Color.FromArgb(200, 200, 0, 0);
AssaProgressBarBackColor = Color.FromArgb(150, 80, 80, 80);
AssaProgressBarTextColor = Color.White;
AssaProgressBarHeight = 40;
AssaProgressBarSplitterWidth = 2;
AssaProgressBarSplitterHeight = 40;
AssaProgressBarFontName = "Arial";
AssaProgressBarFontSize = 30;
AssaProgressBarTextAlign = "left";
AssaBgBoxPaddingLeft = 10;
AssaBgBoxPaddingRight = 10;
AssaBgBoxPaddingTop = 6;
AssaBgBoxPaddingBottom = 6;
AssaBgBoxColor = Color.FromArgb(200, 0, 0, 0);
AssaBgBoxOutlineColor = Color.FromArgb(200, 80, 80, 80);
AssaBgBoxShadowColor = Color.FromArgb(100, 0, 0, 0);
AssaBgBoxTransparentColor = Color.Cyan;
AssaBgBoxStyle = "square";
AssaBgBoxStyleRadius = 30;
AssaBgBoxStyleCircleAdjustY = 30;
AssaBgBoxStyleSpikesStep = 15;
AssaBgBoxStyleSpikesHeight = 30;
AssaBgBoxStyleBubblesStep = 75;
AssaBgBoxStyleBubblesHeight = 40;
AssaBgBoxOutlineWidth = 0;
AssaBgBoxLayer = -11893;
AssaBgBoxDrawingFileWatch = true;
GenVideoEncoding = "libx264";
GenVideoPreset = "medium";
GenVideoCrf = "23";
GenVideoTune = "film";
GenVideoAudioEncoding = "copy";
GenVideoAudioForceStereo = true;
GenVideoAudioSampleRate = "48000";
GenVideoFontBold = true;
GenVideoOutline = 6;
GenVideoFontSizePercentOfHeight = 0.078f;
GenVideoNonAssaBox = true;
GenVideoNonAssaBoxColor = Color.FromArgb(150, 0, 0, 0);
GenVideoNonAssaTextColor = Color.White;
GenVideoEmbedOutputSuffix = "embed";
GenVideoEmbedOutputReplace = "embed" + Environment.NewLine + "SoftSub" + Environment.NewLine + "SoftSubbed";
GenVideoOutputFileSuffix = "_new";
VoskPostProcessing = true;
WhisperChoice = Configuration.IsRunningOnWindows ? AudioToText.WhisperChoice.PurfviewFasterWhisper : AudioToText.WhisperChoice.OpenAi;
WhisperDeleteTempFiles = true;
WhisperPurfviewFasterWhisperDefaultCmd = "--standard";
WhisperExtraSettings = "";
WhisperLanguageCode = "en";
WhisperAutoAdjustTimings = true;
WhisperPostProcessingAddPeriods = false;
WhisperPostProcessingMergeLines = true;
WhisperPostProcessingSplitLines = true;
WhisperPostProcessingFixCasing = false;
WhisperPostProcessingFixShortDuration = true;
AudioToTextLineMaxChars = 86;
AudioToTextLineMaxCharsJp = 32;
AudioToTextLineMaxCharsCn = 36;
}
}
}

View File

@ -0,0 +1,18 @@
namespace Nikse.SubtitleEdit.Core.Settings
{
public class VerifyCompletenessSettings
{
public ListSortEnum ListSort { get; set; }
public enum ListSortEnum : int
{
Coverage = 0,
Time = 1,
}
public VerifyCompletenessSettings()
{
ListSort = ListSortEnum.Coverage;
}
}
}

View File

@ -0,0 +1,87 @@
using System.Drawing;
namespace Nikse.SubtitleEdit.Core.Settings
{
public class VideoControlsSettings
{
public string CustomSearchText1 { get; set; }
public string CustomSearchText2 { get; set; }
public string CustomSearchText3 { get; set; }
public string CustomSearchText4 { get; set; }
public string CustomSearchText5 { get; set; }
public string CustomSearchUrl1 { get; set; }
public string CustomSearchUrl2 { get; set; }
public string CustomSearchUrl3 { get; set; }
public string CustomSearchUrl4 { get; set; }
public string CustomSearchUrl5 { get; set; }
public string LastActiveTab { get; set; }
public bool WaveformDrawGrid { get; set; }
public bool WaveformDrawCps { get; set; }
public bool WaveformDrawWpm { get; set; }
public bool WaveformAllowOverlap { get; set; }
public bool WaveformFocusOnMouseEnter { get; set; }
public bool WaveformListViewFocusOnMouseEnter { get; set; }
public bool WaveformSetVideoPositionOnMoveStartEnd { get; set; }
public bool WaveformSingleClickSelect { get; set; }
public bool WaveformSnapToShotChanges { get; set; }
public int WaveformShotChangeStartTimeBeforeMs { get; set; }
public int WaveformShotChangeStartTimeAfterMs { get; set; }
public int WaveformShotChangeEndTimeBeforeMs { get; set; }
public int WaveformShotChangeEndTimeAfterMs { get; set; }
public int WaveformBorderHitMs { get; set; }
public Color WaveformGridColor { get; set; }
public Color WaveformColor { get; set; }
public Color WaveformSelectedColor { get; set; }
public Color WaveformBackgroundColor { get; set; }
public Color WaveformTextColor { get; set; }
public Color WaveformCursorColor { get; set; }
public Color WaveformChaptersColor { get; set; }
public int WaveformTextSize { get; set; }
public bool WaveformTextBold { get; set; }
public string WaveformDoubleClickOnNonParagraphAction { get; set; }
public string WaveformRightClickOnNonParagraphAction { get; set; }
public bool WaveformMouseWheelScrollUpIsForward { get; set; }
public bool WaveformLabelShowCodec { get; set; }
public bool GenerateSpectrogram { get; set; }
public string SpectrogramAppearance { get; set; }
public int WaveformMinimumSampleRate { get; set; }
public double WaveformSeeksSilenceDurationSeconds { get; set; }
public double WaveformSeeksSilenceMaxVolume { get; set; }
public bool WaveformUnwrapText { get; set; }
public bool WaveformHideWpmCpsLabels { get; set; }
public VideoControlsSettings()
{
CustomSearchText1 = "The Free Dictionary";
CustomSearchUrl1 = "https://www.thefreedictionary.com/{0}";
CustomSearchText2 = "Wikipedia";
CustomSearchUrl2 = "https://en.wikipedia.org/wiki?search={0}";
CustomSearchText3 = "DuckDuckGo";
CustomSearchUrl3 = "https://duckduckgo.com/?q={0}";
LastActiveTab = "Translate";
WaveformDrawGrid = true;
WaveformAllowOverlap = false;
WaveformBorderHitMs = 15;
WaveformGridColor = Color.FromArgb(255, 20, 20, 18);
WaveformColor = Color.FromArgb(255, 160, 240, 30);
WaveformSelectedColor = Color.FromArgb(255, 230, 0, 0);
WaveformBackgroundColor = Color.Black;
WaveformTextColor = Color.Gray;
WaveformCursorColor = Color.Turquoise;
WaveformChaptersColor = Color.FromArgb(255, 104, 33, 122);
WaveformTextSize = 9;
WaveformTextBold = true;
WaveformDoubleClickOnNonParagraphAction = "PlayPause";
WaveformDoubleClickOnNonParagraphAction = string.Empty;
WaveformMouseWheelScrollUpIsForward = true;
WaveformLabelShowCodec = true;
SpectrogramAppearance = "OneColorGradient";
WaveformMinimumSampleRate = 126;
WaveformSeeksSilenceDurationSeconds = 0.3;
WaveformSeeksSilenceMaxVolume = 0.1;
WaveformSnapToShotChanges = true;
}
}
}

View File

@ -0,0 +1,77 @@
namespace Nikse.SubtitleEdit.Core.Settings
{
public class VobSubOcrSettings
{
public int XOrMorePixelsMakesSpace { get; set; }
public double AllowDifferenceInPercent { get; set; }
public double BlurayAllowDifferenceInPercent { get; set; }
public string LastImageCompareFolder { get; set; }
public int LastModiLanguageId { get; set; }
public string LastOcrMethod { get; set; }
public string TesseractLastLanguage { get; set; }
public bool UseTesseractFallback { get; set; }
public bool UseItalicsInTesseract { get; set; }
public int TesseractEngineMode { get; set; }
public bool UseMusicSymbolsInTesseract { get; set; }
public bool RightToLeft { get; set; }
public bool TopToBottom { get; set; }
public int DefaultMillisecondsForUnknownDurations { get; set; }
public bool FixOcrErrors { get; set; }
public bool PromptForUnknownWords { get; set; }
public bool GuessUnknownWords { get; set; }
public bool AutoBreakSubtitleIfMoreThanTwoLines { get; set; }
public double ItalicFactor { get; set; }
public bool LineOcrDraw { get; set; }
public int LineOcrMinHeightSplit { get; set; }
public bool LineOcrAdvancedItalic { get; set; }
public string LineOcrLastLanguages { get; set; }
public string LineOcrLastSpellCheck { get; set; }
public int LineOcrLinesToAutoGuess { get; set; }
public int LineOcrMinLineHeight { get; set; }
public int LineOcrMaxLineHeight { get; set; }
public int LineOcrMaxErrorPixels { get; set; }
public string LastBinaryImageCompareDb { get; set; }
public string LastBinaryImageSpellCheck { get; set; }
public bool BinaryAutoDetectBestDb { get; set; }
public string LastTesseractSpellCheck { get; set; }
public bool CaptureTopAlign { get; set; }
public int UnfocusedAttentionBlinkCount { get; set; }
public int UnfocusedAttentionPlaySoundCount { get; set; }
public string CloudVisionApiKey { get; set; }
public string CloudVisionLanguage { get; set; }
public bool CloudVisionSendOriginalImages { get; set; }
public VobSubOcrSettings()
{
XOrMorePixelsMakesSpace = 8;
AllowDifferenceInPercent = 1.0;
BlurayAllowDifferenceInPercent = 7.5;
LastImageCompareFolder = "English";
LastModiLanguageId = 9;
LastOcrMethod = "Tesseract";
UseItalicsInTesseract = true;
TesseractEngineMode = 3; // Default, based on what is available (T4 docs)
UseMusicSymbolsInTesseract = true;
UseTesseractFallback = true;
RightToLeft = false;
TopToBottom = true;
DefaultMillisecondsForUnknownDurations = 5000;
FixOcrErrors = true;
PromptForUnknownWords = true;
GuessUnknownWords = true;
AutoBreakSubtitleIfMoreThanTwoLines = true;
ItalicFactor = 0.2f;
LineOcrLinesToAutoGuess = 100;
LineOcrMaxErrorPixels = 45;
LastBinaryImageCompareDb = "Latin+Latin";
BinaryAutoDetectBestDb = true;
CaptureTopAlign = false;
UnfocusedAttentionBlinkCount = 50;
UnfocusedAttentionPlaySoundCount = 1;
CloudVisionApiKey = string.Empty;
CloudVisionLanguage = "en";
CloudVisionSendOriginalImages = false;
}
}
}

View File

@ -0,0 +1,15 @@
namespace Nikse.SubtitleEdit.Core.Settings
{
public class WordListSettings
{
public string LastLanguage { get; set; }
public string NamesUrl { get; set; }
public bool UseOnlineNames { get; set; }
public WordListSettings()
{
LastLanguage = "en-US";
NamesUrl = "https://raw.githubusercontent.com/SubtitleEdit/subtitleedit/main/Dictionaries/names.xml";
}
}
}

View File

@ -6,6 +6,7 @@ using System.Drawing;
using System.Drawing.Text;
using System.Globalization;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.Settings;
namespace Nikse.SubtitleEdit.Controls
{

View File

@ -8,6 +8,7 @@ using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.Settings;
namespace Nikse.SubtitleEdit.Controls
{

View File

@ -11,6 +11,7 @@ using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.Settings;
namespace Nikse.SubtitleEdit.Forms.Assa
{

View File

@ -13,6 +13,7 @@ using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.Settings;
using MessageBox = Nikse.SubtitleEdit.Forms.SeMsgBox.MessageBox;
namespace Nikse.SubtitleEdit.Forms.Assa

View File

@ -4,6 +4,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.Settings;
namespace Nikse.SubtitleEdit.Forms.Assa
{

View File

@ -5,6 +5,7 @@ using System.Linq;
using System.Windows.Forms;
using System.Xml;
using Nikse.SubtitleEdit.Core.Common;
using Nikse.SubtitleEdit.Core.Settings;
using Nikse.SubtitleEdit.Logic;
namespace Nikse.SubtitleEdit.Forms.Assa

View File

@ -5,6 +5,7 @@ using System.Linq;
using System.Windows.Forms;
using System.Xml;
using Nikse.SubtitleEdit.Core.Common;
using Nikse.SubtitleEdit.Core.Settings;
using Nikse.SubtitleEdit.Logic;
using MessageBox = Nikse.SubtitleEdit.Forms.SeMsgBox.MessageBox;

View File

@ -2,6 +2,7 @@
using System.Drawing;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.Common;
using Nikse.SubtitleEdit.Core.Settings;
using Nikse.SubtitleEdit.Logic;
namespace Nikse.SubtitleEdit.Forms.BeautifyTimeCodes

View File

@ -4,6 +4,7 @@ using Nikse.SubtitleEdit.Core.SubtitleFormats;
using Nikse.SubtitleEdit.Logic;
using System;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.Settings;
namespace Nikse.SubtitleEdit.Forms.BeautifyTimeCodes
{

View File

@ -5,6 +5,7 @@ using System;
using System.Globalization;
using System.Windows.Forms;
using System.Xml.Linq;
using Nikse.SubtitleEdit.Core.Settings;
namespace Nikse.SubtitleEdit.Forms.DCinema
{

View File

@ -5,6 +5,7 @@ using System;
using System.Globalization;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.Forms;
using Nikse.SubtitleEdit.Core.Settings;
namespace Nikse.SubtitleEdit.Forms.DCinema
{

View File

@ -22,6 +22,7 @@ using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Forms;
using System.Xml;
using Nikse.SubtitleEdit.Core.Settings;
using MessageBox = Nikse.SubtitleEdit.Forms.SeMsgBox.MessageBox;
namespace Nikse.SubtitleEdit.Forms
@ -5861,7 +5862,7 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
}
}
private void SubtitleListView1InitializeLanguage(LanguageStructure.General general, Core.Common.Settings settings)
private void SubtitleListView1InitializeLanguage(LanguageStructure.General general, Settings settings)
{
var columnIndexNumber = 0;
var columnIndexStart = 1;

View File

@ -0,0 +1,887 @@
namespace Nikse.SubtitleEdit.Forms
{
sealed partial class GenerateTransparentVideoWithSubtitles
{
/// <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.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.removeSubtitleFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.pickSubtitleFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.addFilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStripBatch = new System.Windows.Forms.ContextMenuStrip(this.components);
this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.bAspectRatio916180270ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.aAspectRatio916270480ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.bAspectRatio916360540ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.aAspectRatio916540960ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.youTubeShortsTikTokAspectRatio9167201280ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.youTubeShortsTikTok10801920ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.pAL720x576ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.p848x480ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.x720ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.p1280x720ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.x1080ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.p1920x1080ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.dCI2KFlat1998x1080ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.dCI2KScope2048x858ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.k2048x1080ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.uHD3840x2160ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.x2160ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStripRes = new System.Windows.Forms.ContextMenuStrip(this.components);
this.checkBoxFontBold = new System.Windows.Forms.CheckBox();
this.panelForeColor = new System.Windows.Forms.Panel();
this.panelOutlineColor = new System.Windows.Forms.Panel();
this.buttonOutlineColor = new System.Windows.Forms.Button();
this.groupBoxSettings = new System.Windows.Forms.GroupBox();
this.buttonForeColor = new System.Windows.Forms.Button();
this.checkBoxBox = new System.Windows.Forms.CheckBox();
this.checkBoxAlignRight = new System.Windows.Forms.CheckBox();
this.checkBoxRightToLeft = new System.Windows.Forms.CheckBox();
this.groupBoxVideo = new System.Windows.Forms.GroupBox();
this.buttonVideoChooseStandardRes = new System.Windows.Forms.Button();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.buttonCancel = new System.Windows.Forms.Button();
this.promptParameterBeforeGenerateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStripGenerate = new System.Windows.Forms.ContextMenuStrip(this.components);
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.buttonGenerate = new System.Windows.Forms.Button();
this.labelPass = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.labelProgress = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.labelPleaseWait = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.textBoxLog = new Nikse.SubtitleEdit.Controls.NikseTextBox();
this.nikseLabelOutline = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.numericUpDownOutline = new Nikse.SubtitleEdit.Controls.NikseUpDown();
this.labelInfo = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.comboBoxSubtitleFont = new Nikse.SubtitleEdit.Controls.NikseComboBox();
this.labelSubtitleFont = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.labelFrameRate = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.comboBoxFrameRate = new Nikse.SubtitleEdit.Controls.NikseComboBox();
this.labelResolution = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.numericUpDownWidth = new Nikse.SubtitleEdit.Controls.NikseUpDown();
this.numericUpDownHeight = new Nikse.SubtitleEdit.Controls.NikseUpDown();
this.labelX = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.numericUpDownFontSize = new Nikse.SubtitleEdit.Controls.NikseUpDown();
this.labelFontSize = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.contextMenuStripBatch.SuspendLayout();
this.contextMenuStripRes.SuspendLayout();
this.groupBoxSettings.SuspendLayout();
this.groupBoxVideo.SuspendLayout();
this.contextMenuStripGenerate.SuspendLayout();
this.SuspendLayout();
//
// deleteToolStripMenuItem
//
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.deleteToolStripMenuItem.Text = "Delete";
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(175, 6);
//
// removeSubtitleFileToolStripMenuItem
//
this.removeSubtitleFileToolStripMenuItem.Name = "removeSubtitleFileToolStripMenuItem";
this.removeSubtitleFileToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.removeSubtitleFileToolStripMenuItem.Text = "Remove subtitle file";
//
// pickSubtitleFileToolStripMenuItem
//
this.pickSubtitleFileToolStripMenuItem.Name = "pickSubtitleFileToolStripMenuItem";
this.pickSubtitleFileToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.pickSubtitleFileToolStripMenuItem.Text = "Pick subtitle file...";
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(175, 6);
//
// addFilesToolStripMenuItem
//
this.addFilesToolStripMenuItem.Name = "addFilesToolStripMenuItem";
this.addFilesToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.addFilesToolStripMenuItem.Text = "Add video files...";
//
// contextMenuStripBatch
//
this.contextMenuStripBatch.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.addFilesToolStripMenuItem,
this.toolStripSeparator2,
this.pickSubtitleFileToolStripMenuItem,
this.removeSubtitleFileToolStripMenuItem,
this.toolStripSeparator1,
this.deleteToolStripMenuItem,
this.clearToolStripMenuItem});
this.contextMenuStripBatch.Name = "contextMenuStripBatch";
this.contextMenuStripBatch.Size = new System.Drawing.Size(179, 126);
//
// clearToolStripMenuItem
//
this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
this.clearToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.clearToolStripMenuItem.Text = "Clear";
//
// bAspectRatio916180270ToolStripMenuItem
//
this.bAspectRatio916180270ToolStripMenuItem.Name = "bAspectRatio916180270ToolStripMenuItem";
this.bAspectRatio916180270ToolStripMenuItem.Size = new System.Drawing.Size(367, 22);
this.bAspectRatio916180270ToolStripMenuItem.Text = "1/4 B - Aspect Ratio 916 - (180x270)";
this.bAspectRatio916180270ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick);
//
// aAspectRatio916270480ToolStripMenuItem
//
this.aAspectRatio916270480ToolStripMenuItem.Name = "aAspectRatio916270480ToolStripMenuItem";
this.aAspectRatio916270480ToolStripMenuItem.Size = new System.Drawing.Size(367, 22);
this.aAspectRatio916270480ToolStripMenuItem.Text = "1/4 A - Aspect Ratio 916 - (270x480)";
this.aAspectRatio916270480ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick);
//
// bAspectRatio916360540ToolStripMenuItem
//
this.bAspectRatio916360540ToolStripMenuItem.Name = "bAspectRatio916360540ToolStripMenuItem";
this.bAspectRatio916360540ToolStripMenuItem.Size = new System.Drawing.Size(367, 22);
this.bAspectRatio916360540ToolStripMenuItem.Text = "1/2 B - Aspect Ratio 916 - (360x540)";
this.bAspectRatio916360540ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick);
//
// aAspectRatio916540960ToolStripMenuItem
//
this.aAspectRatio916540960ToolStripMenuItem.Name = "aAspectRatio916540960ToolStripMenuItem";
this.aAspectRatio916540960ToolStripMenuItem.Size = new System.Drawing.Size(367, 22);
this.aAspectRatio916540960ToolStripMenuItem.Text = "1/2 A - Aspect Ratio 916 - (540x960)";
this.aAspectRatio916540960ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick);
//
// youTubeShortsTikTokAspectRatio9167201280ToolStripMenuItem
//
this.youTubeShortsTikTokAspectRatio9167201280ToolStripMenuItem.Name = "youTubeShortsTikTokAspectRatio9167201280ToolStripMenuItem";
this.youTubeShortsTikTokAspectRatio9167201280ToolStripMenuItem.Size = new System.Drawing.Size(367, 22);
this.youTubeShortsTikTokAspectRatio9167201280ToolStripMenuItem.Text = "YouTube shorts/TikTok - Aspect Ratio 916 - (720x1280)";
this.youTubeShortsTikTokAspectRatio9167201280ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick);
//
// youTubeShortsTikTok10801920ToolStripMenuItem
//
this.youTubeShortsTikTok10801920ToolStripMenuItem.Name = "youTubeShortsTikTok10801920ToolStripMenuItem";
this.youTubeShortsTikTok10801920ToolStripMenuItem.Size = new System.Drawing.Size(367, 22);
this.youTubeShortsTikTok10801920ToolStripMenuItem.Text = "YouTube shorts/TikTok - Aspect Ratio 916 - (1080x1920)";
this.youTubeShortsTikTok10801920ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick);
//
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(364, 6);
//
// pAL720x576ToolStripMenuItem
//
this.pAL720x576ToolStripMenuItem.Name = "pAL720x576ToolStripMenuItem";
this.pAL720x576ToolStripMenuItem.Size = new System.Drawing.Size(367, 22);
this.pAL720x576ToolStripMenuItem.Text = "360p - Aspect Ratio 169 - (640x360)";
this.pAL720x576ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick);
//
// p848x480ToolStripMenuItem
//
this.p848x480ToolStripMenuItem.Name = "p848x480ToolStripMenuItem";
this.p848x480ToolStripMenuItem.Size = new System.Drawing.Size(367, 22);
this.p848x480ToolStripMenuItem.Text = "VGA - Aspect Ratio 4:3 - (640x480)";
this.p848x480ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick);
//
// x720ToolStripMenuItem
//
this.x720ToolStripMenuItem.Name = "x720ToolStripMenuItem";
this.x720ToolStripMenuItem.Size = new System.Drawing.Size(367, 22);
this.x720ToolStripMenuItem.Text = "SD NTSC - Aspect Ratio 3:2 - (720x480)";
this.x720ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick);
//
// p1280x720ToolStripMenuItem
//
this.p1280x720ToolStripMenuItem.Name = "p1280x720ToolStripMenuItem";
this.p1280x720ToolStripMenuItem.Size = new System.Drawing.Size(367, 22);
this.p1280x720ToolStripMenuItem.Text = "SD PAL - Aspect Ratio 4:3 - (720x576)";
this.p1280x720ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick);
//
// x1080ToolStripMenuItem
//
this.x1080ToolStripMenuItem.Name = "x1080ToolStripMenuItem";
this.x1080ToolStripMenuItem.Size = new System.Drawing.Size(367, 22);
this.x1080ToolStripMenuItem.Text = "540p - Aspect Ratio 169 - (960x540)";
this.x1080ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick);
//
// p1920x1080ToolStripMenuItem
//
this.p1920x1080ToolStripMenuItem.Name = "p1920x1080ToolStripMenuItem";
this.p1920x1080ToolStripMenuItem.Size = new System.Drawing.Size(367, 22);
this.p1920x1080ToolStripMenuItem.Text = "HD 720p - Aspect Ratio 169 - (1280x720)";
this.p1920x1080ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick);
//
// dCI2KFlat1998x1080ToolStripMenuItem
//
this.dCI2KFlat1998x1080ToolStripMenuItem.Name = "dCI2KFlat1998x1080ToolStripMenuItem";
this.dCI2KFlat1998x1080ToolStripMenuItem.Size = new System.Drawing.Size(367, 22);
this.dCI2KFlat1998x1080ToolStripMenuItem.Text = "Full HD 1080p - Aspect Ratio 169 - (1920x1080)";
this.dCI2KFlat1998x1080ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick);
//
// dCI2KScope2048x858ToolStripMenuItem
//
this.dCI2KScope2048x858ToolStripMenuItem.Name = "dCI2KScope2048x858ToolStripMenuItem";
this.dCI2KScope2048x858ToolStripMenuItem.Size = new System.Drawing.Size(367, 22);
this.dCI2KScope2048x858ToolStripMenuItem.Text = "2K DCI - Aspect Ratio 169 - (2048x1080)";
this.dCI2KScope2048x858ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick);
//
// k2048x1080ToolStripMenuItem
//
this.k2048x1080ToolStripMenuItem.Name = "k2048x1080ToolStripMenuItem";
this.k2048x1080ToolStripMenuItem.Size = new System.Drawing.Size(367, 22);
this.k2048x1080ToolStripMenuItem.Text = "2K WQHD - Aspect Ratio 169 - (2560x1440)";
this.k2048x1080ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick);
//
// uHD3840x2160ToolStripMenuItem
//
this.uHD3840x2160ToolStripMenuItem.Name = "uHD3840x2160ToolStripMenuItem";
this.uHD3840x2160ToolStripMenuItem.Size = new System.Drawing.Size(367, 22);
this.uHD3840x2160ToolStripMenuItem.Text = "4K UHD - Aspect Ratio 169 - (3840x2160)";
this.uHD3840x2160ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick);
//
// x2160ToolStripMenuItem
//
this.x2160ToolStripMenuItem.Name = "x2160ToolStripMenuItem";
this.x2160ToolStripMenuItem.Size = new System.Drawing.Size(367, 22);
this.x2160ToolStripMenuItem.Text = "4K DCI - Aspect Ratio 169 - (4096x2160)";
this.x2160ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick);
//
// 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.toolStripSeparator4,
this.youTubeShortsTikTok10801920ToolStripMenuItem,
this.youTubeShortsTikTokAspectRatio9167201280ToolStripMenuItem,
this.aAspectRatio916540960ToolStripMenuItem,
this.bAspectRatio916360540ToolStripMenuItem,
this.aAspectRatio916270480ToolStripMenuItem,
this.bAspectRatio916180270ToolStripMenuItem});
this.contextMenuStripRes.Name = "contextMenuStripRes";
this.contextMenuStripRes.Size = new System.Drawing.Size(368, 406);
//
// checkBoxFontBold
//
this.checkBoxFontBold.AutoSize = true;
this.checkBoxFontBold.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.checkBoxFontBold.Location = new System.Drawing.Point(187, 31);
this.checkBoxFontBold.Name = "checkBoxFontBold";
this.checkBoxFontBold.Size = new System.Drawing.Size(51, 17);
this.checkBoxFontBold.TabIndex = 20;
this.checkBoxFontBold.Text = "Bold";
this.checkBoxFontBold.UseVisualStyleBackColor = true;
//
// panelForeColor
//
this.panelForeColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelForeColor.Location = new System.Drawing.Point(369, 28);
this.panelForeColor.Name = "panelForeColor";
this.panelForeColor.Size = new System.Drawing.Size(21, 21);
this.panelForeColor.TabIndex = 6;
this.panelForeColor.Click += new System.EventHandler(this.panelForeColor_Click);
//
// panelOutlineColor
//
this.panelOutlineColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelOutlineColor.Location = new System.Drawing.Point(369, 56);
this.panelOutlineColor.Name = "panelOutlineColor";
this.panelOutlineColor.Size = new System.Drawing.Size(21, 20);
this.panelOutlineColor.TabIndex = 4;
this.panelOutlineColor.Click += new System.EventHandler(this.panelOutlineColor_Click);
//
// buttonOutlineColor
//
this.buttonOutlineColor.Location = new System.Drawing.Point(274, 54);
this.buttonOutlineColor.Name = "buttonOutlineColor";
this.buttonOutlineColor.Size = new System.Drawing.Size(89, 23);
this.buttonOutlineColor.TabIndex = 60;
this.buttonOutlineColor.Text = "Color";
this.buttonOutlineColor.UseVisualStyleBackColor = true;
this.buttonOutlineColor.Click += new System.EventHandler(this.buttonOutlineColor_Click);
//
// 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.nikseLabelOutline);
this.groupBoxSettings.Controls.Add(this.numericUpDownOutline);
this.groupBoxSettings.Controls.Add(this.checkBoxFontBold);
this.groupBoxSettings.Controls.Add(this.panelForeColor);
this.groupBoxSettings.Controls.Add(this.buttonForeColor);
this.groupBoxSettings.Controls.Add(this.panelOutlineColor);
this.groupBoxSettings.Controls.Add(this.buttonOutlineColor);
this.groupBoxSettings.Controls.Add(this.checkBoxBox);
this.groupBoxSettings.Controls.Add(this.checkBoxAlignRight);
this.groupBoxSettings.Controls.Add(this.labelInfo);
this.groupBoxSettings.Controls.Add(this.checkBoxRightToLeft);
this.groupBoxSettings.Controls.Add(this.comboBoxSubtitleFont);
this.groupBoxSettings.Controls.Add(this.labelSubtitleFont);
this.groupBoxSettings.Controls.Add(this.groupBoxVideo);
this.groupBoxSettings.Controls.Add(this.numericUpDownFontSize);
this.groupBoxSettings.Controls.Add(this.labelFontSize);
this.groupBoxSettings.Location = new System.Drawing.Point(12, 6);
this.groupBoxSettings.Name = "groupBoxSettings";
this.groupBoxSettings.Size = new System.Drawing.Size(576, 260);
this.groupBoxSettings.TabIndex = 144;
this.groupBoxSettings.TabStop = false;
this.groupBoxSettings.Text = "Settings";
//
// buttonForeColor
//
this.buttonForeColor.Location = new System.Drawing.Point(274, 25);
this.buttonForeColor.Name = "buttonForeColor";
this.buttonForeColor.Size = new System.Drawing.Size(89, 23);
this.buttonForeColor.TabIndex = 30;
this.buttonForeColor.Text = "Color";
this.buttonForeColor.UseVisualStyleBackColor = true;
this.buttonForeColor.Click += new System.EventHandler(this.buttonForeColor_Click);
//
// checkBoxBox
//
this.checkBoxBox.AutoSize = true;
this.checkBoxBox.Location = new System.Drawing.Point(187, 60);
this.checkBoxBox.Name = "checkBoxBox";
this.checkBoxBox.Size = new System.Drawing.Size(44, 17);
this.checkBoxBox.TabIndex = 50;
this.checkBoxBox.Text = "Box";
this.checkBoxBox.UseVisualStyleBackColor = true;
//
// checkBoxAlignRight
//
this.checkBoxAlignRight.AutoSize = true;
this.checkBoxAlignRight.Location = new System.Drawing.Point(218, 114);
this.checkBoxAlignRight.Name = "checkBoxAlignRight";
this.checkBoxAlignRight.Size = new System.Drawing.Size(72, 17);
this.checkBoxAlignRight.TabIndex = 76;
this.checkBoxAlignRight.Text = "Align right";
this.checkBoxAlignRight.UseVisualStyleBackColor = true;
//
// checkBoxRightToLeft
//
this.checkBoxRightToLeft.AutoSize = true;
this.checkBoxRightToLeft.Location = new System.Drawing.Point(120, 114);
this.checkBoxRightToLeft.Name = "checkBoxRightToLeft";
this.checkBoxRightToLeft.Size = new System.Drawing.Size(80, 17);
this.checkBoxRightToLeft.TabIndex = 75;
this.checkBoxRightToLeft.Text = "Right to left";
this.checkBoxRightToLeft.UseVisualStyleBackColor = true;
//
// groupBoxVideo
//
this.groupBoxVideo.Controls.Add(this.labelFrameRate);
this.groupBoxVideo.Controls.Add(this.comboBoxFrameRate);
this.groupBoxVideo.Controls.Add(this.buttonVideoChooseStandardRes);
this.groupBoxVideo.Controls.Add(this.labelResolution);
this.groupBoxVideo.Controls.Add(this.numericUpDownWidth);
this.groupBoxVideo.Controls.Add(this.numericUpDownHeight);
this.groupBoxVideo.Controls.Add(this.labelX);
this.groupBoxVideo.Location = new System.Drawing.Point(6, 141);
this.groupBoxVideo.Name = "groupBoxVideo";
this.groupBoxVideo.Size = new System.Drawing.Size(530, 89);
this.groupBoxVideo.TabIndex = 70;
this.groupBoxVideo.TabStop = false;
this.groupBoxVideo.Text = "Video";
//
// buttonVideoChooseStandardRes
//
this.buttonVideoChooseStandardRes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.buttonVideoChooseStandardRes.Location = new System.Drawing.Point(257, 17);
this.buttonVideoChooseStandardRes.Name = "buttonVideoChooseStandardRes";
this.buttonVideoChooseStandardRes.Size = new System.Drawing.Size(41, 23);
this.buttonVideoChooseStandardRes.TabIndex = 3;
this.buttonVideoChooseStandardRes.Text = "...";
this.buttonVideoChooseStandardRes.UseVisualStyleBackColor = true;
this.buttonVideoChooseStandardRes.Click += new System.EventHandler(this.buttonVideoChooseStandardRes_Click);
//
// timer1
//
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// 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(463, 311);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(125, 23);
this.buttonCancel.TabIndex = 154;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
// promptParameterBeforeGenerateToolStripMenuItem
//
this.promptParameterBeforeGenerateToolStripMenuItem.Name = "promptParameterBeforeGenerateToolStripMenuItem";
this.promptParameterBeforeGenerateToolStripMenuItem.Size = new System.Drawing.Size(289, 22);
this.promptParameterBeforeGenerateToolStripMenuItem.Text = "Prompt FFmpeg parameter and generate";
this.promptParameterBeforeGenerateToolStripMenuItem.Click += new System.EventHandler(this.promptParameterBeforeGenerateToolStripMenuItem_Click);
//
// contextMenuStripGenerate
//
this.contextMenuStripGenerate.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.promptParameterBeforeGenerateToolStripMenuItem});
this.contextMenuStripGenerate.Name = "contextMenuStripGenerate";
this.contextMenuStripGenerate.Size = new System.Drawing.Size(290, 26);
//
// progressBar1
//
this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.progressBar1.Location = new System.Drawing.Point(12, 311);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(318, 11);
this.progressBar1.TabIndex = 145;
this.progressBar1.Visible = false;
//
// buttonGenerate
//
this.buttonGenerate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonGenerate.ContextMenuStrip = this.contextMenuStripGenerate;
this.buttonGenerate.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonGenerate.Location = new System.Drawing.Point(336, 311);
this.buttonGenerate.Name = "buttonGenerate";
this.buttonGenerate.Size = new System.Drawing.Size(121, 23);
this.buttonGenerate.TabIndex = 153;
this.buttonGenerate.Text = "Generate";
this.buttonGenerate.UseVisualStyleBackColor = true;
this.buttonGenerate.Click += new System.EventHandler(this.buttonGenerate_Click);
//
// labelPass
//
this.labelPass.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.labelPass.AutoSize = true;
this.labelPass.Location = new System.Drawing.Point(279, 295);
this.labelPass.Name = "labelPass";
this.labelPass.Size = new System.Drawing.Size(51, 13);
this.labelPass.TabIndex = 149;
this.labelPass.Text = "Pass one";
//
// labelProgress
//
this.labelProgress.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.labelProgress.AutoSize = true;
this.labelProgress.Location = new System.Drawing.Point(12, 325);
this.labelProgress.Name = "labelProgress";
this.labelProgress.Size = new System.Drawing.Size(88, 13);
this.labelProgress.TabIndex = 147;
this.labelProgress.Text = "Remaining time...";
//
// labelPleaseWait
//
this.labelPleaseWait.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.labelPleaseWait.AutoSize = true;
this.labelPleaseWait.Location = new System.Drawing.Point(12, 295);
this.labelPleaseWait.Name = "labelPleaseWait";
this.labelPleaseWait.Size = new System.Drawing.Size(70, 13);
this.labelPleaseWait.TabIndex = 146;
this.labelPleaseWait.Text = "Please wait...";
//
// textBoxLog
//
this.textBoxLog.FocusedColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215)))));
this.textBoxLog.Location = new System.Drawing.Point(32, 7);
this.textBoxLog.Multiline = true;
this.textBoxLog.Name = "textBoxLog";
this.textBoxLog.ReadOnly = true;
this.textBoxLog.Size = new System.Drawing.Size(188, 26);
this.textBoxLog.TabIndex = 148;
//
// nikseLabelOutline
//
this.nikseLabelOutline.AutoSize = true;
this.nikseLabelOutline.Location = new System.Drawing.Point(19, 58);
this.nikseLabelOutline.Name = "nikseLabelOutline";
this.nikseLabelOutline.Size = new System.Drawing.Size(40, 13);
this.nikseLabelOutline.TabIndex = 151;
this.nikseLabelOutline.Text = "Outline";
//
// numericUpDownOutline
//
this.numericUpDownOutline.BackColor = System.Drawing.SystemColors.Window;
this.numericUpDownOutline.BackColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.numericUpDownOutline.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(171)))), ((int)(((byte)(173)))), ((int)(((byte)(179)))));
this.numericUpDownOutline.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120)))));
this.numericUpDownOutline.ButtonForeColor = System.Drawing.SystemColors.ControlText;
this.numericUpDownOutline.ButtonForeColorDown = System.Drawing.Color.Orange;
this.numericUpDownOutline.ButtonForeColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215)))));
this.numericUpDownOutline.DecimalPlaces = 1;
this.numericUpDownOutline.Increment = new decimal(new int[] {
1,
0,
0,
65536});
this.numericUpDownOutline.Location = new System.Drawing.Point(119, 54);
this.numericUpDownOutline.Maximum = new decimal(new int[] {
100,
0,
0,
0});
this.numericUpDownOutline.Minimum = new decimal(new int[] {
0,
0,
0,
0});
this.numericUpDownOutline.Name = "numericUpDownOutline";
this.numericUpDownOutline.Size = new System.Drawing.Size(54, 23);
this.numericUpDownOutline.TabIndex = 40;
this.numericUpDownOutline.TabStop = false;
this.numericUpDownOutline.ThousandsSeparator = false;
this.numericUpDownOutline.Value = new decimal(new int[] {
0,
0,
0,
0});
//
// labelInfo
//
this.labelInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.labelInfo.AutoSize = true;
this.labelInfo.Location = new System.Drawing.Point(5, 239);
this.labelInfo.Name = "labelInfo";
this.labelInfo.Size = new System.Drawing.Size(25, 13);
this.labelInfo.TabIndex = 1;
this.labelInfo.Text = "Info";
//
// comboBoxSubtitleFont
//
this.comboBoxSubtitleFont.BackColor = System.Drawing.SystemColors.Window;
this.comboBoxSubtitleFont.BackColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.comboBoxSubtitleFont.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(171)))), ((int)(((byte)(173)))), ((int)(((byte)(179)))));
this.comboBoxSubtitleFont.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120)))));
this.comboBoxSubtitleFont.ButtonForeColor = System.Drawing.SystemColors.ControlText;
this.comboBoxSubtitleFont.ButtonForeColorDown = System.Drawing.Color.Orange;
this.comboBoxSubtitleFont.ButtonForeColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215)))));
this.comboBoxSubtitleFont.DropDownHeight = 400;
this.comboBoxSubtitleFont.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxSubtitleFont.DropDownWidth = 250;
this.comboBoxSubtitleFont.FormattingEnabled = true;
this.comboBoxSubtitleFont.Location = new System.Drawing.Point(120, 87);
this.comboBoxSubtitleFont.MaxLength = 32767;
this.comboBoxSubtitleFont.Name = "comboBoxSubtitleFont";
this.comboBoxSubtitleFont.SelectedIndex = -1;
this.comboBoxSubtitleFont.SelectedItem = null;
this.comboBoxSubtitleFont.SelectedText = "";
this.comboBoxSubtitleFont.Size = new System.Drawing.Size(250, 21);
this.comboBoxSubtitleFont.TabIndex = 70;
this.comboBoxSubtitleFont.UsePopupWindow = false;
//
// labelSubtitleFont
//
this.labelSubtitleFont.AutoSize = true;
this.labelSubtitleFont.Location = new System.Drawing.Point(19, 90);
this.labelSubtitleFont.Name = "labelSubtitleFont";
this.labelSubtitleFont.Size = new System.Drawing.Size(63, 13);
this.labelSubtitleFont.TabIndex = 7;
this.labelSubtitleFont.Text = "Subtitle font";
//
// labelFrameRate
//
this.labelFrameRate.AutoSize = true;
this.labelFrameRate.Location = new System.Drawing.Point(13, 54);
this.labelFrameRate.Name = "labelFrameRate";
this.labelFrameRate.Size = new System.Drawing.Size(57, 13);
this.labelFrameRate.TabIndex = 32;
this.labelFrameRate.Text = "Frame rate";
//
// comboBoxFrameRate
//
this.comboBoxFrameRate.BackColor = System.Drawing.SystemColors.Window;
this.comboBoxFrameRate.BackColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.comboBoxFrameRate.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(171)))), ((int)(((byte)(173)))), ((int)(((byte)(179)))));
this.comboBoxFrameRate.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120)))));
this.comboBoxFrameRate.ButtonForeColor = System.Drawing.SystemColors.ControlText;
this.comboBoxFrameRate.ButtonForeColorDown = System.Drawing.Color.Orange;
this.comboBoxFrameRate.ButtonForeColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215)))));
this.comboBoxFrameRate.DropDownHeight = 400;
this.comboBoxFrameRate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown;
this.comboBoxFrameRate.DropDownWidth = 200;
this.comboBoxFrameRate.FormattingEnabled = true;
this.comboBoxFrameRate.Location = new System.Drawing.Point(96, 46);
this.comboBoxFrameRate.MaxLength = 32767;
this.comboBoxFrameRate.Name = "comboBoxFrameRate";
this.comboBoxFrameRate.SelectedIndex = -1;
this.comboBoxFrameRate.SelectedItem = null;
this.comboBoxFrameRate.SelectedText = "";
this.comboBoxFrameRate.Size = new System.Drawing.Size(74, 23);
this.comboBoxFrameRate.TabIndex = 33;
this.comboBoxFrameRate.TabStop = false;
this.comboBoxFrameRate.UsePopupWindow = false;
//
// labelResolution
//
this.labelResolution.AutoSize = true;
this.labelResolution.Location = new System.Drawing.Point(10, 19);
this.labelResolution.Name = "labelResolution";
this.labelResolution.Size = new System.Drawing.Size(57, 13);
this.labelResolution.TabIndex = 0;
this.labelResolution.Text = "Resolution";
//
// numericUpDownWidth
//
this.numericUpDownWidth.BackColor = System.Drawing.SystemColors.Window;
this.numericUpDownWidth.BackColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.numericUpDownWidth.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(171)))), ((int)(((byte)(173)))), ((int)(((byte)(179)))));
this.numericUpDownWidth.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120)))));
this.numericUpDownWidth.ButtonForeColor = System.Drawing.SystemColors.ControlText;
this.numericUpDownWidth.ButtonForeColorDown = System.Drawing.Color.Orange;
this.numericUpDownWidth.ButtonForeColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215)))));
this.numericUpDownWidth.DecimalPlaces = 0;
this.numericUpDownWidth.Increment = new decimal(new int[] {
2,
0,
0,
0});
this.numericUpDownWidth.Location = new System.Drawing.Point(96, 17);
this.numericUpDownWidth.Maximum = new decimal(new int[] {
50000,
0,
0,
0});
this.numericUpDownWidth.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.numericUpDownWidth.Name = "numericUpDownWidth";
this.numericUpDownWidth.Size = new System.Drawing.Size(64, 23);
this.numericUpDownWidth.TabIndex = 1;
this.numericUpDownWidth.TabStop = false;
this.numericUpDownWidth.ThousandsSeparator = false;
this.numericUpDownWidth.Value = new decimal(new int[] {
1280,
0,
0,
0});
//
// numericUpDownHeight
//
this.numericUpDownHeight.BackColor = System.Drawing.SystemColors.Window;
this.numericUpDownHeight.BackColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.numericUpDownHeight.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(171)))), ((int)(((byte)(173)))), ((int)(((byte)(179)))));
this.numericUpDownHeight.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120)))));
this.numericUpDownHeight.ButtonForeColor = System.Drawing.SystemColors.ControlText;
this.numericUpDownHeight.ButtonForeColorDown = System.Drawing.Color.Orange;
this.numericUpDownHeight.ButtonForeColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215)))));
this.numericUpDownHeight.DecimalPlaces = 0;
this.numericUpDownHeight.Increment = new decimal(new int[] {
2,
0,
0,
0});
this.numericUpDownHeight.Location = new System.Drawing.Point(184, 17);
this.numericUpDownHeight.Maximum = new decimal(new int[] {
50000,
0,
0,
0});
this.numericUpDownHeight.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.numericUpDownHeight.Name = "numericUpDownHeight";
this.numericUpDownHeight.Size = new System.Drawing.Size(64, 23);
this.numericUpDownHeight.TabIndex = 2;
this.numericUpDownHeight.TabStop = false;
this.numericUpDownHeight.ThousandsSeparator = false;
this.numericUpDownHeight.Value = new decimal(new int[] {
720,
0,
0,
0});
//
// labelX
//
this.labelX.AutoSize = true;
this.labelX.Location = new System.Drawing.Point(166, 19);
this.labelX.Name = "labelX";
this.labelX.Size = new System.Drawing.Size(12, 13);
this.labelX.TabIndex = 31;
this.labelX.Text = "x";
//
// numericUpDownFontSize
//
this.numericUpDownFontSize.BackColor = System.Drawing.SystemColors.Window;
this.numericUpDownFontSize.BackColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.numericUpDownFontSize.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(171)))), ((int)(((byte)(173)))), ((int)(((byte)(179)))));
this.numericUpDownFontSize.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120)))));
this.numericUpDownFontSize.ButtonForeColor = System.Drawing.SystemColors.ControlText;
this.numericUpDownFontSize.ButtonForeColorDown = System.Drawing.Color.Orange;
this.numericUpDownFontSize.ButtonForeColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215)))));
this.numericUpDownFontSize.DecimalPlaces = 0;
this.numericUpDownFontSize.Increment = new decimal(new int[] {
1,
0,
0,
0});
this.numericUpDownFontSize.Location = new System.Drawing.Point(120, 25);
this.numericUpDownFontSize.Maximum = new decimal(new int[] {
1000,
0,
0,
0});
this.numericUpDownFontSize.Minimum = new decimal(new int[] {
3,
0,
0,
0});
this.numericUpDownFontSize.Name = "numericUpDownFontSize";
this.numericUpDownFontSize.Size = new System.Drawing.Size(54, 20);
this.numericUpDownFontSize.TabIndex = 10;
this.numericUpDownFontSize.TabStop = false;
this.numericUpDownFontSize.ThousandsSeparator = false;
this.numericUpDownFontSize.Value = new decimal(new int[] {
50,
0,
0,
0});
//
// labelFontSize
//
this.labelFontSize.AutoSize = true;
this.labelFontSize.Location = new System.Drawing.Point(19, 27);
this.labelFontSize.Name = "labelFontSize";
this.labelFontSize.Size = new System.Drawing.Size(49, 13);
this.labelFontSize.TabIndex = 0;
this.labelFontSize.Text = "Font size";
//
// GenerateTransparentVideoWithSubtitles
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(600, 345);
this.Controls.Add(this.labelPass);
this.Controls.Add(this.labelProgress);
this.Controls.Add(this.labelPleaseWait);
this.Controls.Add(this.textBoxLog);
this.Controls.Add(this.groupBoxSettings);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.progressBar1);
this.Controls.Add(this.buttonGenerate);
this.KeyPreview = true;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "GenerateTransparentVideoWithSubtitles";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "GenerateTransparentVideoWithSubtitles";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.GenerateTransparentVideoWithSubtitles_FormClosing);
this.contextMenuStripBatch.ResumeLayout(false);
this.contextMenuStripRes.ResumeLayout(false);
this.groupBoxSettings.ResumeLayout(false);
this.groupBoxSettings.PerformLayout();
this.groupBoxVideo.ResumeLayout(false);
this.groupBoxVideo.PerformLayout();
this.contextMenuStripGenerate.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem removeSubtitleFileToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem pickSubtitleFileToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripMenuItem addFilesToolStripMenuItem;
private System.Windows.Forms.ContextMenuStrip contextMenuStripBatch;
private System.Windows.Forms.ToolStripMenuItem clearToolStripMenuItem;
private Controls.NikseUpDown numericUpDownFontSize;
private Controls.NikseLabel labelFontSize;
private Controls.NikseLabel labelPass;
private Controls.NikseLabel labelProgress;
private Controls.NikseLabel labelPleaseWait;
private Controls.NikseTextBox textBoxLog;
private System.Windows.Forms.ToolStripMenuItem bAspectRatio916180270ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem aAspectRatio916270480ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem bAspectRatio916360540ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem aAspectRatio916540960ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem youTubeShortsTikTokAspectRatio9167201280ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem youTubeShortsTikTok10801920ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
private System.Windows.Forms.ToolStripMenuItem pAL720x576ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem p848x480ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem x720ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem p1280x720ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem x1080ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem p1920x1080ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem dCI2KFlat1998x1080ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem dCI2KScope2048x858ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem k2048x1080ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem uHD3840x2160ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem x2160ToolStripMenuItem;
private System.Windows.Forms.ContextMenuStrip contextMenuStripRes;
private Controls.NikseLabel nikseLabelOutline;
private Controls.NikseUpDown numericUpDownOutline;
private System.Windows.Forms.CheckBox checkBoxFontBold;
private System.Windows.Forms.Panel panelForeColor;
private System.Windows.Forms.Panel panelOutlineColor;
private System.Windows.Forms.Button buttonOutlineColor;
private System.Windows.Forms.GroupBox groupBoxSettings;
private System.Windows.Forms.Button buttonForeColor;
private System.Windows.Forms.CheckBox checkBoxBox;
private System.Windows.Forms.CheckBox checkBoxAlignRight;
private Controls.NikseLabel labelInfo;
private System.Windows.Forms.CheckBox checkBoxRightToLeft;
private Controls.NikseComboBox comboBoxSubtitleFont;
private Controls.NikseLabel labelSubtitleFont;
private System.Windows.Forms.GroupBox groupBoxVideo;
private System.Windows.Forms.Button buttonVideoChooseStandardRes;
private Controls.NikseLabel labelResolution;
private Controls.NikseUpDown numericUpDownWidth;
private Controls.NikseUpDown numericUpDownHeight;
private Controls.NikseLabel labelX;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Button buttonCancel;
private System.Windows.Forms.ToolStripMenuItem promptParameterBeforeGenerateToolStripMenuItem;
private System.Windows.Forms.ContextMenuStrip contextMenuStripGenerate;
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.Button buttonGenerate;
private Controls.NikseLabel labelFrameRate;
private Controls.NikseComboBox comboBoxFrameRate;
}
}

View File

@ -0,0 +1,641 @@
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;
namespace Nikse.SubtitleEdit.Forms
{
public sealed partial class GenerateTransparentVideoWithSubtitles : Form
{
private bool _abort;
private readonly Subtitle _assaSubtitle;
private readonly VideoInfo _videoInfo;
private static readonly Regex FrameFinderRegex = new Regex(@"[Ff]rame=\s*\d+", RegexOptions.Compiled);
private long _processedFrames;
private long _startTicks;
private long _totalFrames;
private StringBuilder _log;
private readonly bool _isAssa;
private bool _promptFFmpegParameters;
public string VideoFileName { get; private set; }
public long MillisecondsEncoding { get; private set; }
public GenerateTransparentVideoWithSubtitles(Subtitle subtitle, SubtitleFormat format, VideoInfo videoInfo)
{
UiUtil.PreInitialize(this);
InitializeComponent();
textBoxLog.ScrollBars = ScrollBars.Both;
UiUtil.FixFonts(this);
_videoInfo = videoInfo;
_assaSubtitle = new Subtitle(subtitle);
if (format.GetType() == typeof(NetflixImsc11Japanese) && _videoInfo != null)
{
_assaSubtitle = new Subtitle();
var raw = NetflixImsc11JapaneseToAss.Convert(subtitle, _videoInfo.Width, _videoInfo.Height);
new AdvancedSubStationAlpha().LoadSubtitle(_assaSubtitle, raw.SplitToLines(), null);
}
Text = LanguageSettings.Current.Main.Menu.Video.GenerateTransparentVideoWithSubs.Trim('.');
buttonGenerate.Text = LanguageSettings.Current.Watermark.Generate;
labelPleaseWait.Text = LanguageSettings.Current.General.PleaseWait;
labelResolution.Text = LanguageSettings.Current.SubStationAlphaProperties.Resolution;
labelFontSize.Text = LanguageSettings.Current.ExportPngXml.FontSize;
nikseLabelOutline.Text = LanguageSettings.Current.SubStationAlphaStyles.Outline;
checkBoxFontBold.Text = LanguageSettings.Current.General.Bold;
numericUpDownOutline.Text = LanguageSettings.Current.SubStationAlphaStyles.Outline;
labelSubtitleFont.Text = LanguageSettings.Current.ExportPngXml.FontFamily;
buttonOutlineColor.Text = LanguageSettings.Current.GenerateVideoWithBurnedInSubs.OutputSettings;
buttonCancel.Text = LanguageSettings.Current.General.Cancel;
checkBoxRightToLeft.Text = LanguageSettings.Current.Settings.FixRTLViaUnicodeChars;
checkBoxAlignRight.Text = LanguageSettings.Current.GenerateVideoWithBurnedInSubs.AlignRight;
checkBoxBox.Text = LanguageSettings.Current.SubStationAlphaStyles.OpaqueBox;
deleteToolStripMenuItem.Text = LanguageSettings.Current.DvdSubRip.Remove;
clearToolStripMenuItem.Text = LanguageSettings.Current.DvdSubRip.Clear;
addFilesToolStripMenuItem.Text = LanguageSettings.Current.DvdSubRip.Add;
labelFrameRate.Text = LanguageSettings.Current.General.FrameRate;
progressBar1.Visible = false;
labelPleaseWait.Visible = false;
labelProgress.Text = string.Empty;
labelPass.Text = string.Empty;
groupBoxSettings.Text = LanguageSettings.Current.Settings.Title;
groupBoxVideo.Text = LanguageSettings.Current.Main.Menu.Video.Title;
promptParameterBeforeGenerateToolStripMenuItem.Text = LanguageSettings.Current.GenerateBlankVideo.GenerateWithFfmpegParametersPrompt;
checkBoxBox.Checked = Configuration.Settings.Tools.GenTransparentVideoNonAssaBox;
checkBoxAlignRight.Checked = Configuration.Settings.Tools.GenVideoNonAssaAlignRight;
checkBoxRightToLeft.Checked = Configuration.Settings.Tools.GenVideoNonAssaAlignRight;
if (_videoInfo != null)
{
numericUpDownWidth.Value = _videoInfo.Width;
numericUpDownHeight.Value = _videoInfo.Height;
}
var left = Math.Max(Math.Max(labelResolution.Left + labelResolution.Width, labelFontSize.Left + labelFontSize.Width), labelSubtitleFont.Left + labelSubtitleFont.Width) + 5;
numericUpDownFontSize.Left = left;
comboBoxSubtitleFont.Left = left;
numericUpDownOutline.Left = left;
numericUpDownWidth.Left = left;
comboBoxFrameRate.Left = left;
labelX.Left = numericUpDownWidth.Left + numericUpDownWidth.Width + 3;
numericUpDownHeight.Left = labelX.Left + labelX.Width + 3;
buttonVideoChooseStandardRes.Left = numericUpDownHeight.Left + numericUpDownHeight.Width + 9;
labelInfo.Text = LanguageSettings.Current.GenerateVideoWithBurnedInSubs.InfoAssaOff;
checkBoxFontBold.Left = numericUpDownFontSize.Right + 12;
checkBoxBox.Left = numericUpDownOutline.Right + 12;
checkBoxRightToLeft.Left = left;
checkBoxAlignRight.Left = checkBoxRightToLeft.Right + 12;
buttonOutlineColor.Left = checkBoxBox.Right + 2;
buttonOutlineColor.Text = LanguageSettings.Current.AssaSetBackgroundBox.BoxColor;
panelOutlineColor.Left = buttonOutlineColor.Right + 3;
buttonForeColor.Left = buttonOutlineColor.Left;
panelForeColor.Left = panelOutlineColor.Left;
buttonForeColor.Text = LanguageSettings.Current.Settings.WaveformTextColor;
_isAssa = format.GetType() == typeof(AdvancedSubStationAlpha);
checkBoxFontBold.Checked = Configuration.Settings.Tools.GenVideoFontBold;
numericUpDownOutline.Value = Configuration.Settings.Tools.GenVideoOutline;
var initialFont = Configuration.Settings.Tools.GenVideoFontName;
if (string.IsNullOrEmpty(initialFont))
{
initialFont = Configuration.Settings.Tools.ExportBluRayFontName;
}
labelInfo.Text = LanguageSettings.Current.GenerateVideoWithBurnedInSubs.InfoAssaOn;
if (string.IsNullOrEmpty(initialFont))
{
initialFont = UiUtil.GetDefaultFont().Name;
}
foreach (var x in FontHelper.GetRegularOrBoldCapableFontFamilies())
{
comboBoxSubtitleFont.Items.Add(x.Name);
if (x.Name.Equals(initialFont, StringComparison.OrdinalIgnoreCase))
{
comboBoxSubtitleFont.SelectedIndex = comboBoxSubtitleFont.Items.Count - 1;
}
}
if (comboBoxSubtitleFont.SelectedIndex < 0 && comboBoxSubtitleFont.Items.Count > 0)
{
comboBoxSubtitleFont.SelectedIndex = 0;
}
if (Configuration.Settings.Tools.GenVideoFontSize >= numericUpDownFontSize.Minimum &&
Configuration.Settings.Tools.GenVideoFontSize >= numericUpDownFontSize.Minimum)
{
numericUpDownFontSize.Value = Configuration.Settings.Tools.GenVideoFontSize;
}
checkBoxRightToLeft.Checked = Configuration.Settings.General.RightToLeftMode && LanguageAutoDetect.CouldBeRightToLeftLanguage(_assaSubtitle);
textBoxLog.Visible = false;
UiUtil.FixLargeFonts(this, buttonGenerate);
UiUtil.FixFonts(this, 2000);
comboBoxFrameRate.Items.Clear();
comboBoxFrameRate.Items.Add("23.976");
comboBoxFrameRate.Items.Add("24");
comboBoxFrameRate.Items.Add("25");
comboBoxFrameRate.Items.Add("29.97");
comboBoxFrameRate.Items.Add("30");
comboBoxFrameRate.Items.Add("50");
comboBoxFrameRate.Items.Add("59.94");
comboBoxFrameRate.Items.Add("60");
comboBoxFrameRate.SelectedIndex = 2;
FontEnableOrDisable(_isAssa);
panelOutlineColor.BackColor = Configuration.Settings.Tools.GenVideoNonAssaBoxColor;
panelForeColor.BackColor = Configuration.Settings.Tools.GenVideoNonAssaTextColor;
}
private void FontEnableOrDisable(bool assa)
{
var enabled = !assa;
numericUpDownFontSize.Enabled = enabled;
numericUpDownFontSize.Enabled = enabled;
labelFontSize.Enabled = enabled;
nikseLabelOutline.Enabled = enabled;
labelSubtitleFont.Enabled = enabled;
comboBoxSubtitleFont.Enabled = enabled;
checkBoxAlignRight.Enabled = enabled;
checkBoxBox.Enabled = enabled;
checkBoxFontBold.Enabled = enabled;
numericUpDownOutline.Enabled = enabled;
buttonForeColor.Enabled = enabled;
buttonOutlineColor.Enabled = enabled;
panelOutlineColor.Enabled = enabled;
panelForeColor.Enabled = enabled;
labelInfo.Text = assa ? LanguageSettings.Current.GenerateVideoWithBurnedInSubs.InfoAssaOn : string.Empty;
}
private void FixRightToLeft(Subtitle subtitle)
{
if (!checkBoxRightToLeft.Checked)
{
return;
}
for (var index = 0; index < subtitle.Paragraphs.Count; index++)
{
var paragraph = subtitle.Paragraphs[index];
if (LanguageAutoDetect.ContainsRightToLeftLetter(paragraph.Text))
{
paragraph.Text = Utilities.FixRtlViaUnicodeChars(paragraph.Text);
}
}
}
private void SetStyleForNonAssa(Subtitle sub)
{
sub.Header = AdvancedSubStationAlpha.DefaultHeader;
var style = AdvancedSubStationAlpha.GetSsaStyle("Default", sub.Header);
style.FontSize = numericUpDownFontSize.Value;
style.Bold = checkBoxFontBold.Checked;
style.FontName = comboBoxSubtitleFont.Text;
style.Background = panelOutlineColor.BackColor;
style.Primary = panelForeColor.BackColor;
style.OutlineWidth = numericUpDownOutline.Value;
style.ShadowWidth = style.OutlineWidth * 0.5m;
if (checkBoxAlignRight.Checked)
{
style.Alignment = "3";
}
if (checkBoxBox.Checked)
{
style.BorderStyle = "4"; // box - multi line
style.ShadowWidth = 0;
style.OutlineWidth = numericUpDownOutline.Value;
}
else
{
style.Outline = panelOutlineColor.BackColor;
}
sub.Header = AdvancedSubStationAlpha.GetHeaderAndStylesFromAdvancedSubStationAlpha(sub.Header, new List<SsaStyle> { style });
sub.Header = AdvancedSubStationAlpha.AddTagToHeader("PlayResX", "PlayResX: " + ((int)numericUpDownWidth.Value).ToString(CultureInfo.InvariantCulture), "[Script Info]", sub.Header);
sub.Header = AdvancedSubStationAlpha.AddTagToHeader("PlayResY", "PlayResY: " + ((int)numericUpDownHeight.Value).ToString(CultureInfo.InvariantCulture), "[Script Info]", sub.Header);
}
private void buttonCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
}
private void buttonGenerate_Click(object sender, EventArgs e)
{
CalculateTotalFrames();
labelProgress.Text = string.Empty;
labelProgress.ForeColor = UiUtil.ForeColor;
_log = new StringBuilder();
buttonGenerate.Enabled = false;
var oldFontSizeEnabled = numericUpDownFontSize.Enabled;
numericUpDownFontSize.Enabled = false;
using (var saveDialog = new SaveFileDialog
{
FileName = SuggestNewVideoFileName(),
Filter = "MP4|*.mp4|Matroska|*.mkv|WebM|*.webm|mov|*.mov",
AddExtension = true,
InitialDirectory = string.IsNullOrEmpty(_assaSubtitle.FileName) ? string.Empty : Path.GetDirectoryName(_assaSubtitle.FileName),
})
{
if (saveDialog.ShowDialog(this) != DialogResult.OK)
{
buttonGenerate.Enabled = true;
numericUpDownFontSize.Enabled = true;
return;
}
VideoFileName = saveDialog.FileName;
}
var stopWatch = Stopwatch.StartNew();
if (!ConvertVideo(oldFontSizeEnabled, _assaSubtitle))
{
buttonGenerate.Enabled = true;
numericUpDownFontSize.Enabled = true;
progressBar1.Visible = false;
labelPleaseWait.Visible = false;
timer1.Stop();
MillisecondsEncoding = stopWatch.ElapsedMilliseconds;
labelProgress.Text = string.Empty;
groupBoxSettings.Enabled = true;
if (!_abort && _log.ToString().Length > 10)
{
var title = "Error occurred during encoding";
MessageBox.Show($"Encoding with ffmpeg failed: {Environment.NewLine}{_log}", title, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
return;
}
progressBar1.Visible = false;
labelPleaseWait.Visible = false;
timer1.Stop();
MillisecondsEncoding = stopWatch.ElapsedMilliseconds;
labelProgress.Text = string.Empty;
groupBoxSettings.Enabled = true;
if (_abort)
{
DialogResult = DialogResult.Cancel;
buttonGenerate.Enabled = true;
numericUpDownFontSize.Enabled = true;
return;
}
if (!File.Exists(VideoFileName) || new FileInfo(VideoFileName).Length == 0)
{
SeLogger.Error(Environment.NewLine + "Generate video failed: " + Environment.NewLine + _log);
MessageBox.Show("Generate embedded video failed" + Environment.NewLine +
"For more info see the error log: " + SeLogger.ErrorFile);
buttonGenerate.Enabled = true;
numericUpDownFontSize.Enabled = oldFontSizeEnabled;
return;
}
var encodingTime = new TimeCode(MillisecondsEncoding).ToString();
using (var f = new ExportPngXmlDialogOpenFolder(string.Format(LanguageSettings.Current.GenerateVideoWithBurnedInSubs.XGeneratedWithBurnedInSubsInX, Path.GetFileName(VideoFileName), encodingTime), Path.GetDirectoryName(VideoFileName), VideoFileName))
{
f.ShowDialog(this);
}
buttonGenerate.Enabled = true;
numericUpDownFontSize.Enabled = true;
}
private void CalculateTotalFrames()
{
var seconds = _assaSubtitle.Paragraphs.Max(p => p.EndTime.TotalSeconds);
var frameRate = double.Parse(comboBoxFrameRate.Text, CultureInfo.InvariantCulture);
_totalFrames = (long)Math.Round(seconds * frameRate, MidpointRounding.AwayFromZero) + 1;
}
private static string GetAssaFileName(string inputVideoFileName)
{
var path = string.IsNullOrEmpty(inputVideoFileName) ? string.Empty : 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(_assaSubtitle.FileName);
fileName += ".transparent-subs";
if (numericUpDownWidth.Value > 0 && numericUpDownHeight.Value > 0)
{
fileName += $".{numericUpDownWidth.Value}x{numericUpDownHeight.Value}";
}
return fileName.Replace(".", "_") + ".mp4";
}
private bool ConvertVideo(bool oldFontSizeEnabled, Subtitle subtitle)
{
if (File.Exists(VideoFileName))
{
try
{
File.Delete(VideoFileName);
}
catch
{
MessageBox.Show($"Cannot overwrite video file {VideoFileName} - probably in use!");
buttonGenerate.Enabled = true;
numericUpDownFontSize.Enabled = oldFontSizeEnabled;
return false;
}
}
_log = new StringBuilder();
if (_videoInfo != null)
{
_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);
}
if (!_isAssa)
{
SetStyleForNonAssa(subtitle);
}
FixRightToLeft(subtitle);
var format = new AdvancedSubStationAlpha();
var assaTempFileName = GetAssaFileName(_assaSubtitle.FileName);
if (Configuration.Settings.General.CurrentVideoIsSmpte && comboBoxFrameRate.Text.Contains(".", StringComparison.Ordinal))
{
foreach (var assaP in subtitle.Paragraphs)
{
assaP.StartTime.TotalMilliseconds *= 1.001;
assaP.EndTime.TotalMilliseconds *= 1.001;
}
}
FileUtil.WriteAllText(assaTempFileName, format.ToText(subtitle, null), new TextEncoding(Encoding.UTF8, "UTF8"));
groupBoxSettings.Enabled = false;
labelPleaseWait.Visible = true;
labelPleaseWait.Text = LanguageSettings.Current.General.PleaseWait;
if (_totalFrames > 0)
{
progressBar1.Visible = true;
}
var result = RunOnePassEncoding(assaTempFileName);
try
{
File.Delete(assaTempFileName);
}
catch
{
// ignore
}
return result;
}
private bool CheckForPromptParameters(Process process, string title)
{
if (!_promptFFmpegParameters)
{
return true;
}
using (var form = new GenerateVideoFFmpegPrompt(title, process.StartInfo.Arguments))
{
if (form.ShowDialog(this) != DialogResult.OK)
{
return false;
}
_log.AppendLine("ffmpeg arguments custom: " + process.StartInfo.Arguments);
process.StartInfo.Arguments = form.Parameters;
}
return true;
}
private Process GetFfmpegProcess(string outputVideoFileName, string assaTempFileName)
{
return VideoPreviewGenerator.GenerateTransparentVideoFile(
assaTempFileName,
outputVideoFileName,
(int)numericUpDownWidth.Value,
(int)numericUpDownHeight.Value,
comboBoxFrameRate.Text,
OutputHandler);
}
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 bool RunOnePassEncoding(string assaTempFileName)
{
var process = GetFfmpegProcess(VideoFileName, assaTempFileName);
_log.AppendLine("ffmpeg arguments: " + process.StartInfo.Arguments);
if (!CheckForPromptParameters(process, Text))
{
_abort = true;
return false;
}
process.Start();
process.BeginOutputReadLine();
process.BeginErrorReadLine();
_startTicks = DateTime.UtcNow.Ticks;
timer1.Start();
while (!process.HasExited)
{
Application.DoEvents();
WindowsHelper.PreventStandBy();
System.Threading.Thread.Sleep(100);
if (_abort)
{
process.Kill();
return false;
}
var v = (int)_processedFrames;
SetProgress(v);
}
if (_abort)
{
return false;
}
if (process.ExitCode != 0)
{
_log.AppendLine("ffmpeg exit code: " + process.ExitCode);
return false;
}
return true;
}
private void SetProgress(int v)
{
if (_totalFrames == 0)
{
progressBar1.Value = progressBar1.Maximum;
}
var pct = Math.Min(progressBar1.Maximum, (int)Math.Round(v * 100.0 / _totalFrames, MidpointRounding.AwayFromZero));
if (pct >= progressBar1.Minimum && pct <= progressBar1.Maximum && _totalFrames > 0)
{
progressBar1.Value = pct;
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (_processedFrames <= 0)
{
return;
}
var durationMs = (DateTime.UtcNow.Ticks - _startTicks) / 10_000;
var msPerFrame = (float)durationMs / _processedFrames;
var estimatedTotalMs = msPerFrame * _totalFrames;
var estimatedLeft = ProgressHelper.ToProgressTime(estimatedTotalMs - durationMs);
labelProgress.Text = estimatedLeft;
}
private void promptParameterBeforeGenerateToolStripMenuItem_Click(object sender, EventArgs e)
{
_promptFFmpegParameters = true;
buttonGenerate_Click(null, null);
}
private void ResolutionPickClick(object sender, EventArgs e)
{
labelX.Left = numericUpDownWidth.Left + numericUpDownWidth.Width + 3;
numericUpDownWidth.Visible = true;
labelX.Text = "x";
numericUpDownHeight.Visible = true;
var text = (sender as ToolStripMenuItem).Text;
var match = new Regex("\\d+x\\d+").Match(text);
var parts = match.Value.Split('x');
numericUpDownWidth.Value = int.Parse(parts[0]);
numericUpDownHeight.Value = int.Parse(parts[1]);
}
private void buttonVideoChooseStandardRes_Click(object sender, EventArgs e)
{
var coordinates = buttonVideoChooseStandardRes.PointToClient(Cursor.Position);
contextMenuStripRes.Show(buttonVideoChooseStandardRes, coordinates);
}
private void buttonForeColor_Click(object sender, EventArgs e)
{
using (var colorChooser = new ColorChooser { Color = panelForeColor.BackColor })
{
if (colorChooser.ShowDialog() == DialogResult.OK)
{
panelForeColor.BackColor = colorChooser.Color;
}
}
}
private void buttonOutlineColor_Click(object sender, EventArgs e)
{
using (var colorChooser = new ColorChooser { Color = panelOutlineColor.BackColor })
{
if (colorChooser.ShowDialog() == DialogResult.OK)
{
panelOutlineColor.BackColor = colorChooser.Color;
}
}
}
private void panelForeColor_Click(object sender, EventArgs e)
{
buttonForeColor_Click(null, null);
}
private void panelOutlineColor_Click(object sender, EventArgs e)
{
buttonOutlineColor_Click(null, null);
}
private void GenerateTransparentVideoWithSubtitles_FormClosing(object sender, FormClosingEventArgs e)
{
Configuration.Settings.Tools.GenVideoFontName = comboBoxSubtitleFont.Text;
Configuration.Settings.Tools.GenVideoFontBold = checkBoxFontBold.Checked;
Configuration.Settings.Tools.GenVideoOutline = (int)numericUpDownOutline.Value;
Configuration.Settings.Tools.GenVideoFontSize = (int)numericUpDownFontSize.Value;
Configuration.Settings.Tools.GenTransparentVideoNonAssaBox = checkBoxBox.Checked;
Configuration.Settings.Tools.GenVideoNonAssaAlignRight = checkBoxAlignRight.Checked;
Configuration.Settings.Tools.GenVideoNonAssaFixRtlUnicode = checkBoxRightToLeft.Checked;
Configuration.Settings.Tools.GenVideoNonAssaBoxColor = panelOutlineColor.BackColor;
Configuration.Settings.Tools.GenVideoNonAssaTextColor = panelForeColor.BackColor;
}
}
}

View File

@ -0,0 +1,132 @@
<?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="contextMenuStripBatch.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>6, 10</value>
</metadata>
<metadata name="contextMenuStripRes.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>185, 10</value>
</metadata>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>352, 10</value>
</metadata>
<metadata name="contextMenuStripGenerate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>440, 10</value>
</metadata>
</root>

View File

@ -245,6 +245,7 @@ namespace Nikse.SubtitleEdit.Forms
this.generateBlankVideoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.generateVideoWithSoftcodedSubtitlesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.generateVideoWithHardcodedSubtitleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.generaeTransparentVideoWithSubtitleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.audioToTextWhisperTolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.videoaudioToTextToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.textToSpeechAndAddToVideoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -2302,6 +2303,7 @@ namespace Nikse.SubtitleEdit.Forms
this.generateBlankVideoToolStripMenuItem,
this.generateVideoWithSoftcodedSubtitlesToolStripMenuItem,
this.generateVideoWithHardcodedSubtitleToolStripMenuItem,
this.generaeTransparentVideoWithSubtitleToolStripMenuItem,
this.audioToTextWhisperTolStripMenuItem,
this.videoaudioToTextToolStripMenuItem,
this.textToSpeechAndAddToVideoToolStripMenuItem,
@ -2418,6 +2420,13 @@ namespace Nikse.SubtitleEdit.Forms
this.generateVideoWithHardcodedSubtitleToolStripMenuItem.Text = "Generate video with hardcoded subtitle...";
this.generateVideoWithHardcodedSubtitleToolStripMenuItem.Click += new System.EventHandler(this.GenerateVideoWithHardcodedSubtitleToolStripMenuItemClick);
//
// generaeTransparentVideoWithSubtitleToolStripMenuItem
//
this.generaeTransparentVideoWithSubtitleToolStripMenuItem.Name = "generaeTransparentVideoWithSubtitleToolStripMenuItem";
this.generaeTransparentVideoWithSubtitleToolStripMenuItem.Size = new System.Drawing.Size(295, 22);
this.generaeTransparentVideoWithSubtitleToolStripMenuItem.Text = "Generae transparent video with subtitle";
this.generaeTransparentVideoWithSubtitleToolStripMenuItem.Click += new System.EventHandler(this.generaeTransparentVideoWithSubtitleToolStripMenuItem_Click);
//
// audioToTextWhisperTolStripMenuItem
//
this.audioToTextWhisperTolStripMenuItem.Name = "audioToTextWhisperTolStripMenuItem";
@ -6545,5 +6554,6 @@ namespace Nikse.SubtitleEdit.Forms
private ToolStripMenuItem videoInfoToolStripMenuItem;
private ToolStripMenuItem openContainingFolderToolStripMenuItem;
private ToolStripMenuItem insertNewSubtitleHereToolStripMenuItem;
private ToolStripMenuItem generaeTransparentVideoWithSubtitleToolStripMenuItem;
}
}

View File

@ -47,6 +47,7 @@ using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.Settings;
using Nikse.SubtitleEdit.Forms.Tts;
using CheckForUpdatesHelper = Nikse.SubtitleEdit.Logic.CheckForUpdatesHelper;
using MessageBox = Nikse.SubtitleEdit.Forms.SeMsgBox.MessageBox;
@ -1840,6 +1841,7 @@ namespace Nikse.SubtitleEdit.Forms
generateBlankVideoToolStripMenuItem.Text = _language.Menu.Video.GenerateBlankVideo;
generateVideoWithHardcodedSubtitleToolStripMenuItem.Text = _language.Menu.Video.GenerateVideoWithBurnedInSub;
generateVideoWithSoftcodedSubtitlesToolStripMenuItem.Text = _language.Menu.Video.GenerateVideoWithEmbeddedSubs;
generaeTransparentVideoWithSubtitleToolStripMenuItem.Text = _language.Menu.Video.GenerateTransparentVideoWithSubs;
videoaudioToTextToolStripMenuItem.Text = string.Format(_language.Menu.Video.VideoAudioToTextX, "Vosk/Kaldi");
audioToTextWhisperTolStripMenuItem.Text = string.Format(_language.Menu.Video.VideoAudioToTextX, "Whisper");
textToSpeechAndAddToVideoToolStripMenuItem.Text = _language.Menu.Video.TextToSpeechAndAddToVideo;
@ -36898,5 +36900,22 @@ namespace Nikse.SubtitleEdit.Forms
ShowStatus(string.Format(_language.VideoControls.NewTextInsertAtX, newParagraph.StartTime.ToShortString()));
}
private void generaeTransparentVideoWithSubtitleToolStripMenuItem_Click(object sender, EventArgs e)
{
if (!IsSubtitleLoaded)
{
DisplaySubtitleNotLoadedMessage();
return;
}
using (var form = new GenerateTransparentVideoWithSubtitles(_subtitle, GetCurrentSubtitleFormat(), _videoInfo))
{
if (form.ShowDialog(this) != DialogResult.OK)
{
return;
}
}
}
}
}

View File

@ -9,6 +9,7 @@ using System.Text.RegularExpressions;
using System.Windows.Forms;
using System.Xml;
using Nikse.SubtitleEdit.Controls.Adapters;
using Nikse.SubtitleEdit.Core.Settings;
using MessageBox = Nikse.SubtitleEdit.Forms.SeMsgBox.MessageBox;
namespace Nikse.SubtitleEdit.Forms

View File

@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Xml;
using Nikse.SubtitleEdit.Core.Settings;
namespace Nikse.SubtitleEdit.Forms
{

View File

@ -28,6 +28,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
using Nikse.SubtitleEdit.Core.Settings;
using MessageBox = Nikse.SubtitleEdit.Forms.SeMsgBox.MessageBox;
using Timer = System.Windows.Forms.Timer;

View File

@ -16,6 +16,7 @@ using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.Settings;
using MessageBox = Nikse.SubtitleEdit.Forms.SeMsgBox.MessageBox;
namespace Nikse.SubtitleEdit.Forms.Options
@ -131,7 +132,7 @@ namespace Nikse.SubtitleEdit.Forms.Options
Init();
_loading = false;
_oldSettings = Core.Common.Settings.CustomSerialize(Configuration.Settings);
_oldSettings = Core.Settings.Settings.CustomSerialize(Configuration.Settings);
}
public void Init()
@ -2455,7 +2456,7 @@ namespace Nikse.SubtitleEdit.Forms.Options
}
}
if (_oldSettings == Core.Common.Settings.CustomSerialize(Configuration.Settings))
if (_oldSettings == Core.Settings.Settings.CustomSerialize(Configuration.Settings))
{
DialogResult = DialogResult.Cancel;
return;

View File

@ -8,6 +8,7 @@ using System.Globalization;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.Settings;
using MessageBox = Nikse.SubtitleEdit.Forms.SeMsgBox.MessageBox;
namespace Nikse.SubtitleEdit.Forms.Options

View File

@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.Settings;
namespace Nikse.SubtitleEdit.Forms
{

View File

@ -9,6 +9,7 @@ using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.SubtitleFormats;
using MessageBox = Nikse.SubtitleEdit.Forms.SeMsgBox.MessageBox;
using System.Threading;
using Nikse.SubtitleEdit.Core.Settings;
namespace Nikse.SubtitleEdit.Forms
{

View File

@ -384,6 +384,7 @@ namespace Nikse.SubtitleEdit.Forms.Translate
comboBoxFormality.Visible = true;
comboBoxFormality.DropDownStyle = ComboBoxStyle.DropDown;
comboBoxFormality.Items.Clear();
comboBoxFormality.Items.Add("claude-3-5-sonnet-20240620");
comboBoxFormality.Items.Add("claude-3-opus-20240229");
comboBoxFormality.Items.Add("claude-3-sonnet-20240229");
comboBoxFormality.Items.Add("claude-3-haiku-20240307");

View File

@ -2,6 +2,7 @@
using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.AutoTranslate;
using Nikse.SubtitleEdit.Core.Common;
using Nikse.SubtitleEdit.Core.Settings;
using Nikse.SubtitleEdit.Logic;
namespace Nikse.SubtitleEdit.Forms.Translate

View File

@ -8,6 +8,7 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using Nikse.SubtitleEdit.Core.Settings;
namespace Nikse.SubtitleEdit.Forms.Translate
{

View File

@ -933,7 +933,8 @@ namespace Nikse.SubtitleEdit.Forms.Tts
private bool GenerateParagraphAudioCoqui(Subtitle subtitle, bool showProgressBar, string overrideFileName)
{
var httpClient = new HttpClient();
using (var httpClient = new HttpClient())
{
httpClient.BaseAddress = new Uri(nikseComboBoxVoice.Text.StartsWith("http", StringComparison.OrdinalIgnoreCase) ? nikseComboBoxVoice.Text : "http://localhost:5002/api/tts");
progressBar1.Value = 0;
@ -977,10 +978,12 @@ namespace Nikse.SubtitleEdit.Forms.Tts
return true;
}
}
private bool GenerateParagraphAudioAllTalk(Subtitle subtitle, bool showProgressBar, string overrideFileName)
{
var httpClient = new HttpClient();
using (var httpClient = new HttpClient())
{
httpClient.BaseAddress = new Uri("http://127.0.0.1:7851");
progressBar1.Value = 0;
@ -1054,6 +1057,7 @@ namespace Nikse.SubtitleEdit.Forms.Tts
return true;
}
}
private bool GenerateParagraphAudioElevenLabs(Subtitle subtitle, bool showProgressBar, string overrideFileName)
{
@ -1064,7 +1068,8 @@ namespace Nikse.SubtitleEdit.Forms.Tts
return false;
}
var httpClient = new HttpClient();
using (var httpClient = new HttpClient())
{
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "application/json");
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("accept", "audio/mpeg");
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("xi-api-key", nikseTextBoxApiKey.Text.Trim());
@ -1124,6 +1129,11 @@ namespace Nikse.SubtitleEdit.Forms.Tts
progressBar1.Refresh();
labelProgress.Refresh();
Application.DoEvents();
if (_abort)
{
return false;
}
}
progressBar1.Visible = false;
@ -1131,6 +1141,7 @@ namespace Nikse.SubtitleEdit.Forms.Tts
return true;
}
}
private List<AzureVoiceModel> GetAzureVoices(bool useCache)
{
@ -1233,7 +1244,8 @@ namespace Nikse.SubtitleEdit.Forms.Tts
return false;
}
var httpClient = new HttpClient();
using (var httpClient = new HttpClient())
{
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "ssml+xml");
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("accept", "audio/mpeg");
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("X-Microsoft-OutputFormat", "audio-16khz-32kbitrate-mono-mp3");
@ -1294,6 +1306,11 @@ namespace Nikse.SubtitleEdit.Forms.Tts
progressBar1.Refresh();
labelProgress.Refresh();
Application.DoEvents();
if (_abort)
{
return false;
}
}
progressBar1.Visible = false;
@ -1301,6 +1318,7 @@ namespace Nikse.SubtitleEdit.Forms.Tts
return true;
}
}
private void buttonOK_Click(object sender, EventArgs e)
{
@ -1806,7 +1824,8 @@ namespace Nikse.SubtitleEdit.Forms.Tts
if (!useCache)
{
var httpClient = new HttpClient();
using (var httpClient = new HttpClient())
{
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "application/json");
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("accept", "application/json");
var url = "https://huggingface.co/rhasspy/piper-voices/resolve/main/voices.json?download=true";
@ -1823,6 +1842,7 @@ namespace Nikse.SubtitleEdit.Forms.Tts
File.WriteAllBytes(jsonFileName, bytes);
}
}
if (File.Exists(jsonFileName))
{
@ -1903,7 +1923,8 @@ namespace Nikse.SubtitleEdit.Forms.Tts
if (!useCache)
{
var httpClient = new HttpClient();
using (var httpClient = new HttpClient())
{
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "application/json");
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("accept", "application/json");
@ -1927,6 +1948,7 @@ namespace Nikse.SubtitleEdit.Forms.Tts
File.WriteAllBytes(jsonFileName, bytes);
}
}
if (File.Exists(jsonFileName))
{
@ -1991,7 +2013,8 @@ namespace Nikse.SubtitleEdit.Forms.Tts
if (!useCache)
{
var httpClient = new HttpClient();
using(var httpClient = new HttpClient())
{
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "application/json");
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("accept", "application/json");
@ -2010,6 +2033,7 @@ namespace Nikse.SubtitleEdit.Forms.Tts
File.WriteAllBytes(jsonFileName, bytes);
}
}
if (File.Exists(jsonFileName))
{

View File

@ -7,7 +7,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using static Nikse.SubtitleEdit.Core.Common.VerifyCompletenessSettings;
using static Nikse.SubtitleEdit.Core.Settings.VerifyCompletenessSettings;
namespace Nikse.SubtitleEdit.Forms
{

View File

@ -1445,6 +1445,7 @@ Vi udnytter billedets indre rytme.</CreateSimpleChainingToolTip>
<GenerateBlankVideo>Generer blank video...</GenerateBlankVideo>
<GenerateVideoWithBurnedInSub>Generer video med indbrændt sub...</GenerateVideoWithBurnedInSub>
<GenerateVideoWithEmbeddedSubs>Generer video med indlejrede undertekster...</GenerateVideoWithEmbeddedSubs>
<GenerateTransparentVideoWithSubs>Generer gennemsigtig video med undertekster...</GenerateTransparentVideoWithSubs>
<VideoAudioToTextX>Lyd til tekst ({0})...</VideoAudioToTextX>
<ImportChaptersFromVideo>Importer kapitler fra video</ImportChaptersFromVideo>
<GenerateImportShotChanges>Generer/importer sceneændringer...</GenerateImportShotChanges>
@ -2128,6 +2129,8 @@ Hvis du har redigeret denne fil med Subtitle Edit du måske finde en backup via
<DurationGreaterThan>Varighed større end</DurationGreaterThan>
<CpsLessThan>CPS mindre end</CpsLessThan>
<CpsGreaterThan>CPS større end</CpsGreaterThan>
<LengthLessThan>Længde mindre end</LengthLessThan>
<LengthGreaterThan>Længde større end</LengthGreaterThan>
<ExactlyOneLine>Præcis én linje</ExactlyOneLine>
<ExactlyTwoLines>Præcis to linjer</ExactlyTwoLines>
<MoreThanTwoLines>Mere end to linjer</MoreThanTwoLines>
@ -3166,6 +3169,7 @@ Fortsæt?</RestoreDefaultSettingsMsg>
<MergingAudioTrackXOfY>Samler lydspor: {0} / {1}...</MergingAudioTrackXOfY>
<GeneratingSpeechFromTextXOfY>Genererer tale fra tekst: {0} / {1}...</GeneratingSpeechFromTextXOfY>
<ReviewAudioClips>Gennemgå lydklip</ReviewAudioClips>
<CustomAudioEncoding>Brugerdefineret lyd encoding</CustomAudioEncoding>
<ReviewInfo>Gennemgå og rediger/fjern lydklip</ReviewInfo>
<Play>Spil</Play>
<AutoContinue>Auto-fortsæt</AutoContinue>

View File

@ -1451,6 +1451,7 @@ Vi utnyttjar bildens inneboende rytm.</CreateSimpleChainingToolTip>
<GenerateBlankVideo>Generera tom video...</GenerateBlankVideo>
<GenerateVideoWithBurnedInSub>Generera video med inbränd sub...</GenerateVideoWithBurnedInSub>
<GenerateVideoWithEmbeddedSubs>Skapa video med inbäddade undertexter...</GenerateVideoWithEmbeddedSubs>
<GenerateTransparentVideoWithSubs>Skapa transparent video med undertexter...</GenerateTransparentVideoWithSubs>
<VideoAudioToTextX>Ljud till text ({0})...</VideoAudioToTextX>
<ImportChaptersFromVideo>Importera kapitel från video</ImportChaptersFromVideo>
<GenerateImportShotChanges>Skapa/importera scenändringar...</GenerateImportShotChanges>
@ -2137,6 +2138,8 @@ Ladda ner och fortsätta?</VideoFromUrlRequirements>
<DurationGreaterThan>Varaktighet längre än</DurationGreaterThan>
<CpsLessThan>CPS mindre än</CpsLessThan>
<CpsGreaterThan>CPS större än</CpsGreaterThan>
<LengthLessThan>Längd mindre än</LengthLessThan>
<LengthGreaterThan>Längd större än</LengthGreaterThan>
<ExactlyOneLine>Exakt en rad</ExactlyOneLine>
<ExactlyTwoLines>Exakt två rader</ExactlyTwoLines>
<MoreThanTwoLines>Mer än två rader</MoreThanTwoLines>
@ -3176,6 +3179,7 @@ och N bryter</WrapStyle2>
<MergingAudioTrackXOfY>Slår ihop ljudspår: {0} / {1}...</MergingAudioTrackXOfY>
<GeneratingSpeechFromTextXOfY>Genererar tal från text: {0} / {1}...</GeneratingSpeechFromTextXOfY>
<ReviewAudioClips>Granska ljudklipp</ReviewAudioClips>
<CustomAudioEncoding>Anpassad ljudkodning</CustomAudioEncoding>
<ReviewInfo>Granska och redigera/ta bort ljudklipp</ReviewInfo>
<Play>Spela</Play>
<AutoContinue>Auto-fortsätt</AutoContinue>

View File

@ -2034,6 +2034,7 @@ namespace Nikse.SubtitleEdit.Logic
GenerateBlankVideo = "Generate blank video...",
GenerateVideoWithEmbeddedSubs = "Generate video with added/removed embedded subtitles...",
GenerateVideoWithBurnedInSub = "Generate video with burned-in subtitle...",
GenerateTransparentVideoWithSubs = "Generate transparent video with subtitles...",
VideoAudioToTextX = "Audio to text ({0})...",
ImportChaptersFromVideo = "Import chapters from video",
GenerateImportShotChanges = "Generate/import shot changes...",

View File

@ -4744,6 +4744,9 @@ namespace Nikse.SubtitleEdit.Logic
case "Main/Menu/Video/GenerateVideoWithEmbeddedSubs":
language.Main.Menu.Video.GenerateVideoWithEmbeddedSubs = reader.Value;
break;
case "Main/Menu/Video/GenerateTransparentVideoWithSubs":
language.Main.Menu.Video.GenerateTransparentVideoWithSubs = reader.Value;
break;
case "Main/Menu/Video/VideoAudioToTextX":
language.Main.Menu.Video.VideoAudioToTextX = reader.Value;
break;

View File

@ -1845,6 +1845,7 @@
public string GenerateBlankVideo { get; set; }
public string GenerateVideoWithBurnedInSub { get; set; }
public string GenerateVideoWithEmbeddedSubs { get; set; }
public string GenerateTransparentVideoWithSubs { get; set; }
public string VideoAudioToTextX { get; set; }
public string ImportChaptersFromVideo { get; set; }
public string GenerateImportShotChanges { get; set; }

View File

@ -14,6 +14,7 @@ using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.Settings;
namespace Nikse.SubtitleEdit.Logic
{

View File

@ -682,5 +682,36 @@ namespace Nikse.SubtitleEdit.Logic
return processMakeVideo;
}
public static Process GenerateTransparentVideoFile(string assaSubtitleFileName, string outputVideoFileName, int width, int height, string frameRate, DataReceivedEventHandler dataReceivedHandler)
{
if (width % 2 == 1)
{
width++;
}
if (height % 2 == 1)
{
height++;
}
outputVideoFileName = $"\"{outputVideoFileName}\"";
var processMakeVideo = new Process
{
StartInfo =
{
FileName = GetFfmpegLocation(),
Arguments = $" -y -f lavfi -i \"color=c=black@0.0:s={width}x{height}:r={frameRate}:d=00\\\\:00\\\\:30,format=rgba,subtitles=f={Path.GetFileName(assaSubtitleFileName)}:alpha=1\" -c:v png {outputVideoFileName}".TrimStart(),
UseShellExecute = false,
CreateNoWindow = true,
WorkingDirectory = Path.GetDirectoryName(assaSubtitleFileName) ?? string.Empty,
}
};
processMakeVideo.StartInfo.Arguments = processMakeVideo.StartInfo.Arguments.Trim();
SetupDataReceiveHandler(dataReceivedHandler, processMakeVideo);
return processMakeVideo;
}
}
}