Skip to content

Commit

Permalink
changes for 3.30.0
Browse files Browse the repository at this point in the history
* Upgrade architecture to 64 bits, allowing to use more memory from system and avoid crash
* Load frames from 4k video is more fast now
  • Loading branch information
argorar committed Sep 11, 2023
1 parent 4ac51ef commit 65c16c1
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 23 deletions.
36 changes: 17 additions & 19 deletions Components/PreviewFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,17 @@ public PreviewFrame()

frame = Program.VideoSource.GetFrame((int)framenumber);

encodeW = frame.EncodedResolution.Width;
encodeH = frame.EncodedResolution.Height;

if (frame.EncodedResolution.Width * frame.EncodedResolution.Height > 2073600) // 1080p (1920*1080)
{
encodeW = frame.EncodedResolution.Width / 2;
encodeH = frame.EncodedResolution.Height / 2;
}
else
{
encodeW = frame.EncodedResolution.Width;
encodeH = frame.EncodedResolution.Height;
}

Program.VideoSource.SetOutputFormat(pixelformat, encodeW, encodeH, FFMSSharp.Resizer.BilinearFast);
}

Expand Down Expand Up @@ -109,22 +117,12 @@ public void GeneratePreview(bool force)

using (var graphics = Graphics.FromImage(destImage))
{
if (encodeW > 2000)
{
graphics.CompositingMode = CompositingMode.SourceCopy;
graphics.CompositingQuality = CompositingQuality.HighSpeed;
graphics.InterpolationMode = InterpolationMode.Bilinear;
graphics.SmoothingMode = SmoothingMode.HighSpeed;
graphics.PixelOffsetMode = PixelOffsetMode.HighSpeed;
}
else
{
graphics.CompositingMode = CompositingMode.SourceCopy;
graphics.CompositingQuality = CompositingQuality.HighQuality;
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
graphics.SmoothingMode = SmoothingMode.HighQuality;
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
}

graphics.CompositingMode = CompositingMode.SourceCopy;
graphics.CompositingQuality = CompositingQuality.HighSpeed;
graphics.InterpolationMode = InterpolationMode.Bilinear;
graphics.SmoothingMode = SmoothingMode.HighSpeed;
graphics.PixelOffsetMode = PixelOffsetMode.HighSpeed;

using (var wrapMode = new ImageAttributes())
{
Expand Down
Binary file added NewUpdate/3.30.0.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion NewUpdate/latest
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.29.0
3.30.0
2 changes: 1 addition & 1 deletion Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.29.0")]
[assembly: AssemblyVersion("3.30.0")]
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ Drag and drop two or more video files inside the application, select what do you
* 3nly

## Changelog

#### Version 3.30.0
* Upgrade architecture to 64 bits, allowing to use more memory from system and avoid crash. See realted [issue](https://github.com/argorar/WebMConverter/issues/45)
* Load frames from 4k video is more fast now

#### Version 3.29.0
* Add feature to make set target frame rate more efficient when desire output is minor like 30 fps from 60 fps source. See related [request](https://github.com/argorar/WebMConverter/issues/51)

Expand Down
4 changes: 2 additions & 2 deletions Updater/Updater.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<PlatformTarget>x64</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
Expand All @@ -40,7 +40,7 @@
<WarningLevel>0</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<PlatformTarget>x64</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\Release\</OutputPath>
Expand Down

0 comments on commit 65c16c1

Please sign in to comment.