Fixes for export "FCP + image" export drop frame

This commit is contained in:
Nikolaj Olsson 2017-04-02 21:11:22 +02:00
parent d182ce112a
commit f0c13c2236
2 changed files with 24 additions and 2 deletions

View File

@ -29,9 +29,10 @@
* Fixed possible crash in "Batch convert" - thx FreezinG117
* Fixed issue with the German open quotation mark - thx Ninelpienel
* Fixed bug in "Reverse RTL start/end" - thx darnn
* Fixed "FCP + image" export in frame rate 29.97 - thx chris
* Fixed "FCP + image" export for drop frame rates - thx chris
* Fixed finding Tesseract traineddata files on Linux - thx mooop12
* Fixed loading of "mks" files from cmd line - thx Charles
* Fixed auto-backup for "EBU STL" format - thx Mirka
3.5.2 (3rd March 2017)

View File

@ -746,6 +746,19 @@ namespace Nikse.SubtitleEdit.Forms
s = s.Replace("<timebase>25</timebase>", "<timebase>30</timebase>");
s = s.Replace("<ntsc>FALSE</ntsc>", "<ntsc>TRUE</ntsc>");
}
else if (comboBoxFrameRate.Text == "23.976")
{
s = s.Replace("<displayformat>NDF</displayformat>", "<displayformat>DF</displayformat>"); //Non Drop Frame or Drop Frame
s = s.Replace("<timebase>25</timebase>", "<timebase>24</timebase>");
s = s.Replace("<ntsc>FALSE</ntsc>", "<ntsc>TRUE</ntsc>");
}
else if (comboBoxFrameRate.Text == "59.94")
{
s = s.Replace("<displayformat>NDF</displayformat>", "<displayformat>DF</displayformat>"); //Non Drop Frame or Drop Frame
s = s.Replace("<timebase>25</timebase>", "<timebase>60</timebase>");
s = s.Replace("<ntsc>FALSE</ntsc>", "<ntsc>TRUE</ntsc>");
}
else
{
s = s.Replace("<timebase>25</timebase>", "<timebase>" + comboBoxFrameRate.Text + "</timebase>");
@ -1367,8 +1380,16 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
if (Math.Abs(param.FramesPerSeconds - 29.97) < 0.01)
{
param.FramesPerSeconds = 30 / 1.001;
param.FramesPerSeconds = 30.0 / 1.0001;
}
else if (Math.Abs(param.FramesPerSeconds - 23.976) < 0.01)
{
param.FramesPerSeconds = 24.0 / 1.0001;
}
else if (Math.Abs(param.FramesPerSeconds - 59.94) < 0.01)
{
param.FramesPerSeconds = 60.0 / 1.0001;
}
int duration = (int)Math.Round(param.P.Duration.TotalSeconds * param.FramesPerSeconds);
int start = (int)Math.Round(param.P.StartTime.TotalSeconds * param.FramesPerSeconds);