Skip to content
This repository has been archived by the owner on Oct 7, 2019. It is now read-only.

Commit

Permalink
added new qualiity
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado-x committed Jan 21, 2014
1 parent b997834 commit 749cbf6
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 8 deletions.
9 changes: 7 additions & 2 deletions Encoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ public bool EncodeVideo(string inputFile, Format format, Quality quality, string
videoBitRate = "1024k";
}

if (quality == Quality.VeryHigh)
{
resolution = "1920x1080";
videoBitRate = "1024k";
}

if (format == Format.Mp4)
{
if (quality == Quality.Low)
Expand All @@ -71,8 +77,7 @@ public bool EncodeVideo(string inputFile, Format format, Quality quality, string
Outpoot = RunProcess(HandBrakePath, arguments);
}


if (quality == Quality.Medium || quality == Quality.High)
if (quality == Quality.Medium || quality == Quality.High || quality == Quality.VeryHigh)
{
var arguments = String.Format("-i {0} -ab 128k -ac 2 -vcodec libx264 -s {1} -crf 22 -threads 0 -b {3} -strict experimental {2}", inputFile, resolution, outputFile, videoBitRate);
Outpoot = RunProcess(FFmpegPath, arguments);
Expand Down
8 changes: 4 additions & 4 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("X.Framework")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyProduct("X.Media.Encoding")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// 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("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: AssemblyVersion("1.2.0.*")]
[assembly: AssemblyFileVersion("1.2.1.90")]
2 changes: 1 addition & 1 deletion Properties/Resources.Designer.cs

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

1 change: 1 addition & 0 deletions Quality.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ namespace X.Media.Encoding
{
public enum Quality
{
VeryHigh,
High,
Medium,
Low
Expand Down
2 changes: 1 addition & 1 deletion X.Media.Encoding.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<AssemblyName>X.Media.Encoding</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
22 changes: 22 additions & 0 deletions X.Media.Encoding.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "X.Media.Encoding", "X.Media.Encoding.csproj", "{70C9C454-7347-442C-B682-DCAC5811B079}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{70C9C454-7347-442C-B682-DCAC5811B079}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{70C9C454-7347-442C-B682-DCAC5811B079}.Debug|Any CPU.Build.0 = Debug|Any CPU
{70C9C454-7347-442C-B682-DCAC5811B079}.Release|Any CPU.ActiveCfg = Release|Any CPU
{70C9C454-7347-442C-B682-DCAC5811B079}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

0 comments on commit 749cbf6

Please sign in to comment.