Skip to content

Commit

Permalink
Fix desync with latest codecs #21
Browse files Browse the repository at this point in the history
  • Loading branch information
argorar committed Sep 14, 2023
1 parent 56d7d38 commit 19c4865
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 45 deletions.
Binary file removed Binaries/Win32/ffms1.dll
Binary file not shown.
Binary file modified Binaries/Win32/ffms2.dll
Binary file not shown.
Binary file modified Binaries/Win64/FFMSSharp.dll
Binary file not shown.
Binary file modified Binaries/Win64/ffms2.dll
Binary file not shown.
51 changes: 17 additions & 34 deletions MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public partial class MainForm : Form

public MainForm()
{
//ad42af1
FFMSSharp.FFMS2.Initialize(Path.Combine(Environment.CurrentDirectory, "Binaries", "Win64"));
_temporaryFilesList = new List<string>();
cache = new ConcurrentDictionary<int, Bitmap>(MAX_PROCESS, MAX_CAPACITY);
Expand Down Expand Up @@ -300,7 +301,6 @@ private void LoadConfiguration()
CRF4k.Value = Decimal.Parse(configuration.AppSettings.Settings["CRF4k"].Value);
CRFother.Value = Decimal.Parse(configuration.AppSettings.Settings["CRFother"].Value);
checkBoxAlpha.Enabled = boxNGOV.Checked && !checkMP4.Checked;
checkFixAudio.Enabled = boxAudio.Checked;
Program.DisablePop = boxDisablePop.Checked;
Program.DisableUpdates = boxDisableUpdates.Checked;
}
Expand Down Expand Up @@ -1412,7 +1412,6 @@ void buttonVariableDefault_Click(object sender, EventArgs e)
void boxAudio_CheckedChanged(object sender, EventArgs e)
{
numericAudioQuality.Enabled = boxAudioBitrate.Enabled = numericDelay.Enabled = ((CheckBox)sender).Checked ;
checkFixAudio.Enabled = boxAudio.Checked;
numericNormalization.Enabled = boxAudio.Checked;

if (boxNGOV.Checked)
Expand Down Expand Up @@ -1601,7 +1600,7 @@ void SetFile(string path)
indexbw.DoWork += delegate (object sender, DoWorkEventArgs e)
{
logIndexingProgress("Indexing starting...");
using (FFMSSharp.Indexer indexer = new FFMSSharp.Indexer(path, FFMSSharp.Source.Lavf))
using (FFMSSharp.Indexer indexer = new FFMSSharp.Indexer(path))
{

indexer.UpdateIndexProgress += delegate (object sendertwo, FFMSSharp.IndexingProgressChangeEventArgs etwo)
Expand Down Expand Up @@ -1885,7 +1884,6 @@ void SetFile(string path)
}

Program.VideoSource = index.VideoSource(path, videotrack, Environment.ProcessorCount);
index.Dispose();
var frame = Program.VideoSource.GetFrame(0); // We're assuming that the entire video has the same settings here, which should be fine. (These options usually don't vary, I hope.)
Program.VideoColorRange = frame.ColorRange;
Program.VideoInterlaced = frame.InterlacedFrame;
Expand Down Expand Up @@ -2088,9 +2086,8 @@ void WriteAvisynthScript(string avsFileName, string avsInputFile)
var pluginPath = Path.Combine(Environment.CurrentDirectory, "Binaries", "Win32");
var shortPluginPath = GetCompatiblePath(pluginPath);

string version = checkFixAudio.Checked ? "1" : "2";
avscript.WriteLine($@"PluginPath = ""{shortPluginPath}\""");
avscript.WriteLine(@"try { LoadPlugin(PluginPath+""ffms"+version+@".dll"") } catch (_) { LoadCPlugin(PluginPath+""ffms"+version+@".dll"") }");
avscript.WriteLine(@"try { LoadPlugin(PluginPath+""ffms2.dll"") } catch (_) { LoadCPlugin(PluginPath+""ffms2.dll"") }");

if (Filters.Subtitle != null)
{
Expand Down
8 changes: 4 additions & 4 deletions MainForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAM
cwAAAk1TRnQBSQFMAgEBDAEAAZgBBAGYAQQBZAEAAWQBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
cwAAAk1TRnQBSQFMAgEBDAEAAaABBAGgAQQBZAEAAWQBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABkAEBAgABkAEBAgABAQEAAQgGAAFxAQIXAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEA
AcAB3AHAAQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEA
A0IBAAM5AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIA
Expand Down Expand Up @@ -736,6 +736,9 @@
<metadata name="tableEncodingAudio.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="labelNormalization.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="panelEncodingModeSwapperTwo.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
Expand All @@ -754,9 +757,6 @@
<metadata name="labelAudioQualityHint.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="labelNormalization.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="tabAdvanced.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
Expand Down
2 changes: 1 addition & 1 deletion WebMConverter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="FFMSSharp, Version=3.0.2.0, Culture=neutral, processorArchitecture=x86">
<Reference Include="FFMSSharp, Version=3.0.2.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>Binaries\Win64\FFMSSharp.dll</HintPath>
</Reference>
Expand Down

0 comments on commit 19c4865

Please sign in to comment.