mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
Changed ForceFormatArgument and VideoCodecArgument to string arguments
This commit is contained in:
parent
b83479e1b6
commit
06f5c319ad
2 changed files with 10 additions and 7 deletions
|
@ -5,16 +5,17 @@ namespace FFMpegCore.FFMPEG.Argument
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents force format parameter
|
/// Represents force format parameter
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ForceFormatArgument : Argument<VideoCodec>
|
public class ForceFormatArgument : Argument<string>
|
||||||
{
|
{
|
||||||
public ForceFormatArgument() { }
|
public ForceFormatArgument() { }
|
||||||
|
public ForceFormatArgument(string format) : base(format) { }
|
||||||
|
|
||||||
public ForceFormatArgument(VideoCodec value) : base(value) { }
|
public ForceFormatArgument(VideoCodec value) : base(value.ToString().ToLower()) { }
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override string GetStringValue()
|
public override string GetStringValue()
|
||||||
{
|
{
|
||||||
return $"-f {Value.ToString().ToLower()}";
|
return $"-f {Value}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,15 +5,17 @@ namespace FFMpegCore.FFMPEG.Argument
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents video codec parameter
|
/// Represents video codec parameter
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class VideoCodecArgument : Argument<VideoCodec>
|
public class VideoCodecArgument : Argument<string>
|
||||||
{
|
{
|
||||||
public int Bitrate { get; protected set; } = 0;
|
public int Bitrate { get; protected set; } = 0;
|
||||||
|
|
||||||
public VideoCodecArgument() { }
|
public VideoCodecArgument() { }
|
||||||
|
|
||||||
public VideoCodecArgument(VideoCodec value) : base(value) { }
|
public VideoCodecArgument(string codec) : base(codec) { }
|
||||||
|
|
||||||
public VideoCodecArgument(VideoCodec value, int bitrate) : base(value)
|
public VideoCodecArgument(VideoCodec value) : base(value.ToString().ToLower()) { }
|
||||||
|
|
||||||
|
public VideoCodecArgument(VideoCodec value, int bitrate) : base(value.ToString().ToLower())
|
||||||
{
|
{
|
||||||
Bitrate = bitrate;
|
Bitrate = bitrate;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +23,7 @@ public VideoCodecArgument(VideoCodec value, int bitrate) : base(value)
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public override string GetStringValue()
|
public override string GetStringValue()
|
||||||
{
|
{
|
||||||
var video = $"-c:v {Value.ToString().ToLower()} -pix_fmt yuv420p";
|
var video = $"-c:v {Value} -pix_fmt yuv420p";
|
||||||
|
|
||||||
if (Bitrate != default)
|
if (Bitrate != default)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue