mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 00:24:14 +01:00
parent
7e6738edaf
commit
f3031db17b
2 changed files with 20 additions and 2 deletions
|
@ -334,7 +334,7 @@ public void Builder_BuildString_SubtitleHardBurnFilter()
|
|||
.HardBurnSubtitle(SubtitleHardBurnOptions
|
||||
.Create(subtitlePath: "sample.srt")
|
||||
.SetCharacterEncoding("UTF-8")
|
||||
.SetOriginalSize(1366,768)
|
||||
.SetOriginalSize(1366, 768)
|
||||
.SetSubtitleIndex(0)
|
||||
.WithStyle(StyleOptions.Create()
|
||||
.WithParameter("FontName", "DejaVu Serif")
|
||||
|
@ -479,10 +479,21 @@ public void Builder_BuildString_DynamicAudioNormalizerWithValuesFormat()
|
|||
{
|
||||
var str = FFMpegArguments.FromFileInput("input.mp4")
|
||||
.OutputToFile("output.mp4", false,
|
||||
opt => opt.WithAudioFilters(filterOptions => filterOptions.DynamicNormalizer(125, 13, 0.9215, 5.124, 0.5458,false,true,true, 0.3333333)))
|
||||
opt => opt.WithAudioFilters(filterOptions => filterOptions.DynamicNormalizer(125, 13, 0.9215, 5.124, 0.5458, false, true, true, 0.3333333)))
|
||||
.Arguments;
|
||||
|
||||
Assert.AreEqual("-i \"input.mp4\" -af \"dynaudnorm=f=125:g=13:p=0.92:m=5.1:r=0.5:n=0:c=1:b=1:s=0.3\" \"output.mp4\"", str);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Builder_BuildString_Audible_AAXC_Decryption()
|
||||
{
|
||||
var str = FFMpegArguments.FromFileInput("input.aaxc", false, x => x.WithAudibleEncryptionKeys("123", "456"))
|
||||
.MapMetaData()
|
||||
.OutputToFile("output.m4b", true, x => x.WithTagVersion(3).DisableChannel(Channel.Video).CopyChannel(Channel.Audio))
|
||||
.Arguments;
|
||||
|
||||
Assert.AreEqual("-audible_key 123 -audible_iv 456 -i \"input.aaxc\" -map_metadata 0 -id3v2_version 3 -vn -c:a copy \"output.m4b\" -y", str);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -94,5 +94,12 @@ public void Concat_Escape()
|
|||
var arg = new DemuxConcatArgument(new[] { @"Heaven's River\05 - Investigation.m4b" });
|
||||
arg.Values.Should().BeEquivalentTo(new[] { @"file 'Heaven'\''s River\05 - Investigation.m4b'" });
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Audible_Aaxc_Test()
|
||||
{
|
||||
var arg = new AudibleEncryptionKeyArgument("123", "456");
|
||||
arg.Text.Should().Be($"-audible_key 123 -audible_iv 456");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue