/// <summary> /// Applies an H264 profile. /// </summary> public FFmpegH264VideoCommandBuilder WithProfile(H264Profile profile) { if (profile == H264Profile.None) { return(this); } TryAddSimpleCommand($"-profile:v {profile.ToString().ToLowerInvariant()}", profile.ToString()); return(this); }
public FFmpegVideoCommandBuilder WithProfile(H264Profile profile) { if (profile == H264Profile.none) { return(this); } TryAddSimpleCommand($"-profile:v {profile}", profile.ToString()); return(this); }
public void Parse() { var bp_30 = new H264Profile(H264ProfileType.BP, 30); var main_30 = new H264Profile(H264ProfileType.MP, 30); var high_30 = new H264Profile(H264ProfileType.HiP, 30); Assert.Equal(bp_30, CodecInfo.Parse("avc1.42001e")); // 66:0:30 Assert.Equal(new H264Profile(H264ProfileType.BP, 31), CodecInfo.Parse("avc1.42001f")); // 66:0:31 Assert.Equal(new H264Profile(H264ProfileType.BP, 32), CodecInfo.Parse("avc1.420020")); // 66:0:32 Assert.Equal(high_30, CodecInfo.Parse("avc1.64001E")); // 100:0:30 Assert.Equal(new H264Profile(H264ProfileType.HiP, 41), CodecInfo.Parse("avc1.640029")); // 100:0:41 Assert.Equal("avc1.42001e", bp_30.ToString()); Assert.Equal("avc1.4d001e", main_30.ToString()); Assert.Equal("avc1.64001e", high_30.ToString()); }