mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
parent
f5ee7cd22e
commit
7315cf2916
7 changed files with 8 additions and 8 deletions
|
@ -43,7 +43,7 @@ public static string OutputLocation(this FileInfo file, ImageType type)
|
||||||
public static string OutputLocation(this FileInfo file, Enum type, string keyword)
|
public static string OutputLocation(this FileInfo file, Enum type, string keyword)
|
||||||
{
|
{
|
||||||
string originalLocation = file.Directory.FullName,
|
string originalLocation = file.Directory.FullName,
|
||||||
outputFile = file.Name.Replace(file.Extension, keyword + "." + type.ToString().ToLower());
|
outputFile = file.Name.Replace(file.Extension, keyword + "." + type.ToString().ToLowerInvariant());
|
||||||
|
|
||||||
return $"{originalLocation}{Path.DirectorySeparatorChar}{outputFile}";
|
return $"{originalLocation}{Path.DirectorySeparatorChar}{outputFile}";
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,6 @@ public AudioCodecArgument(AudioCodec audioCodec)
|
||||||
AudioCodec = audioCodec;
|
AudioCodec = audioCodec;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Text => $"-c:a {AudioCodec.ToString().ToLower()}";
|
public string Text => $"-c:a {AudioCodec.ToString().ToLowerInvariant()}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,8 @@ public BitStreamFilterArgument(Channel channel, Filter filter)
|
||||||
|
|
||||||
public string Text => Channel switch
|
public string Text => Channel switch
|
||||||
{
|
{
|
||||||
Channel.Audio => $"-bsf:a {Filter.ToString().ToLower()}",
|
Channel.Audio => $"-bsf:a {Filter.ToString().ToLowerInvariant()}",
|
||||||
Channel.Video => $"-bsf:v {Filter.ToString().ToLower()}",
|
Channel.Video => $"-bsf:v {Filter.ToString().ToLowerInvariant()}",
|
||||||
_ => string.Empty
|
_ => string.Empty
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ public ForceFormatArgument(string format)
|
||||||
_format = format;
|
_format = format;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ForceFormatArgument(VideoCodec value) : this(value.ToString().ToLower()) { }
|
public ForceFormatArgument(VideoCodec value) : this(value.ToString().ToLowerInvariant()) { }
|
||||||
|
|
||||||
public string Text => $"-f {_format}";
|
public string Text => $"-f {_format}";
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,6 @@ public SpeedPresetArgument(Speed speed)
|
||||||
Speed = speed;
|
Speed = speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Text => $"-preset {Speed.ToString().ToLower()}";
|
public string Text => $"-preset {Speed.ToString().ToLowerInvariant()}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ public VideoCodecArgument(string codec)
|
||||||
Codec = codec;
|
Codec = codec;
|
||||||
}
|
}
|
||||||
|
|
||||||
public VideoCodecArgument(VideoCodec value) : this(value.ToString().ToLower()) { }
|
public VideoCodecArgument(VideoCodec value) : this(value.ToString().ToLowerInvariant()) { }
|
||||||
|
|
||||||
public string Text => $"-c:v {Codec} -pix_fmt yuv420p";
|
public string Text => $"-c:v {Codec} -pix_fmt yuv420p";
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ public class ImageInfo
|
||||||
/// <param name="fileInfo">Image file information.</param>
|
/// <param name="fileInfo">Image file information.</param>
|
||||||
public ImageInfo(FileInfo fileInfo)
|
public ImageInfo(FileInfo fileInfo)
|
||||||
{
|
{
|
||||||
if (!fileInfo.Extension.ToLower().EndsWith(FileExtension.Png))
|
if (!fileInfo.Extension.ToLowerInvariant().EndsWith(FileExtension.Png))
|
||||||
{
|
{
|
||||||
throw new Exception("Image joining currently suppors only .png file types");
|
throw new Exception("Image joining currently suppors only .png file types");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue