mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Alllow to open mov with embedded subs
This commit is contained in:
parent
18e23c193e
commit
04dabfbcbd
@ -3009,7 +3009,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
}
|
||||
|
||||
if ((ext == ".mp4" || ext == ".m4v" || ext == ".3gp" || ext == ".cmaf") && file.Length > 2000 || ext == ".m4s")
|
||||
if ((ext == ".mp4" || ext == ".m4v" || ext == ".3gp" || ext == ".mov" || ext == ".cmaf") && file.Length > 2000 || ext == ".m4s")
|
||||
{
|
||||
if (!new IsmtDfxp().IsMine(null, fileName))
|
||||
{
|
||||
@ -3094,7 +3094,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
}
|
||||
|
||||
if (ext == ".ismt" || ext == ".mp4" || ext == ".m4v" || ext == ".3gp" || ext == ".cmaf" || ext == ".m4s")
|
||||
if (ext == ".ismt" || ext == ".mp4" || ext == ".m4v" || ext == ".mov" || ext == ".3gp" || ext == ".cmaf" || ext == ".m4s")
|
||||
{
|
||||
var f = new IsmtDfxp();
|
||||
if (f.IsMine(null, fileName))
|
||||
@ -8773,7 +8773,10 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
toolStripMenuItemPreview.Visible = formatType == typeof(WebVTT) &&
|
||||
!string.IsNullOrEmpty(_videoFileName) &&
|
||||
(_videoFileName.EndsWith(".mp4", StringComparison.OrdinalIgnoreCase) || _videoFileName.EndsWith(".m4v", StringComparison.OrdinalIgnoreCase) || _videoFileName.EndsWith(".webm", StringComparison.OrdinalIgnoreCase)) &&
|
||||
(_videoFileName.EndsWith(".mp4", StringComparison.OrdinalIgnoreCase) ||
|
||||
_videoFileName.EndsWith(".m4v", StringComparison.OrdinalIgnoreCase) ||
|
||||
_videoFileName.EndsWith(".mov", StringComparison.OrdinalIgnoreCase) ||
|
||||
_videoFileName.EndsWith(".webm", StringComparison.OrdinalIgnoreCase)) &&
|
||||
IsSubtitleLoaded;
|
||||
|
||||
// Insert "selected lines" sub menu items dynamically
|
||||
@ -15409,7 +15412,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
SetEncoding(Encoding.UTF8);
|
||||
ShowStatus(_language.SubtitleImportedFromMatroskaFile);
|
||||
_subtitle.Renumber();
|
||||
if (fileName.EndsWith(".mp4", StringComparison.OrdinalIgnoreCase) || fileName.EndsWith(".m4v", StringComparison.OrdinalIgnoreCase))
|
||||
if (fileName.EndsWith(".mp4", StringComparison.OrdinalIgnoreCase) ||
|
||||
fileName.EndsWith(".m4v", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
_fileName = fileName.Substring(0, fileName.Length - 4) + GetCurrentSubtitleFormat().Extension;
|
||||
}
|
||||
@ -15511,7 +15515,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ext == ".ismt" || ext == ".mp4" || ext == ".m4v" || ext == ".3gp" || ext == ".cmaf" || ext == ".m4s")
|
||||
if (ext == ".ismt" || ext == ".mp4" || ext == ".m4v" || ext == ".mov" || ext == ".3gp" || ext == ".cmaf" || ext == ".m4s")
|
||||
{
|
||||
var mp4Parser = new MP4Parser(fileName);
|
||||
var mp4SubtitleTracks = mp4Parser.GetSubtitleTracks();
|
||||
@ -21479,7 +21483,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
return;
|
||||
}
|
||||
|
||||
if ((extension == ".mp4" || extension == ".m4v" || extension == ".3gp") && file.Length > 10000)
|
||||
if ((extension == ".mp4" || extension == ".m4v" || extension == ".mov" || extension == ".3gp") && file.Length > 10000)
|
||||
{
|
||||
var mp4Parser = new MP4Parser(fileName);
|
||||
var mp4SubtitleTracks = mp4Parser.GetSubtitleTracks();
|
||||
@ -32016,7 +32020,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
openFileDialog1.Title = _language.OpenSubtitleVideoFile;
|
||||
openFileDialog1.FileName = string.Empty;
|
||||
openFileDialog1.Filter = _language.VideoFiles + "|*.mkv;*.mks;*.mp4;*.ts;*.m2ts;*.mpeg;*.divx;*.avi";
|
||||
openFileDialog1.Filter = _language.VideoFiles + "|*.mkv;*.mks;*.mp4;*.mov;*.ts;*.m2ts;*.mpeg;*.divx;*.avi";
|
||||
if (openFileDialog1.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
openFileDialog1.InitialDirectory = Path.GetDirectoryName(openFileDialog1.FileName);
|
||||
|
Loading…
Reference in New Issue
Block a user