diff --git a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs index c680c3e..cb237ed 100644 --- a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs +++ b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs @@ -1,18 +1,20 @@ using System; +using System.IO; using System.Runtime.InteropServices; namespace FFMpegCore.Pipes { static class PipeHelpers { - public static string GetUnqiuePipeName() => $"FFMpegCore_{Guid.NewGuid()}"; + public static string GetUnqiuePipeName() => $"FFMpegCore_{Guid.NewGuid().ToString("N").Substring(0, 5)}"; public static string GetPipePath(string pipeName) { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) return $@"\\.\pipe\{pipeName}"; - else - return $"unix:/tmp/CoreFxPipe_{pipeName}"; + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + return $"unix:{Path.GetTempPath()}/CoreFxPipe_{pipeName}"; + return $"unix:/tmp/CoreFxPipe_{pipeName}"; } } }