Skip to content

Commit

Permalink
Added basic MAC support
Browse files Browse the repository at this point in the history
  • Loading branch information
ElrohirGT committed Oct 28, 2021
1 parent 971743f commit 11e5974
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
18 changes: 17 additions & 1 deletion VideoCompresser/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using static ConsoleUtilitiesLite.ConsoleUtilitiesLite;

Expand All @@ -19,11 +20,26 @@ class Program
public static readonly string FFPLAY_PATH = Path.Combine(AppContext.BaseDirectory, @"ffmpeg 4.4\ffplay.exe");
public static readonly string FFPROBE_PATH = Path.Combine(AppContext.BaseDirectory, @"ffmpeg 4.4\ffprobe.exe");

static Program()
{
string baseDirectory = Path.Combine(AppContext.BaseDirectory, @"ffmpeg 4.4");
FFMPEG_PATH = Path.Combine(baseDirectory, "ffmpeg");
FFPLAY_PATH = Path.Combine(baseDirectory, "ffplay");
FFPROBE_PATH = Path.Combine(baseDirectory, "ffprobe");

if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
FFMPEG_PATH += ".exe";
FFPLAY_PATH += ".exe";
FFPROBE_PATH += ".exe";
}
}

static void Main(string[] args)
{
Console.OutputEncoding = System.Text.Encoding.Unicode;
Console.Clear();

//Console.WriteLine(FFMPEG_PATH);
//Console.WriteLine();
//Console.WriteLine(FFPLAY_PATH);
Expand Down
9 changes: 9 additions & 0 deletions VideoCompresser/VideoCompresser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
<None Update="ffmpeg 4.4\ffprobe.exe">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="ffmpeg 4.4\ffmpeg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="ffmpeg 4.4\ffplay">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="ffmpeg 4.4\ffprobe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Binary file added VideoCompresser/ffmpeg 4.4/ffmpeg
Binary file not shown.
Binary file added VideoCompresser/ffmpeg 4.4/ffplay
Binary file not shown.
Binary file added VideoCompresser/ffmpeg 4.4/ffprobe
Binary file not shown.

0 comments on commit 11e5974

Please sign in to comment.