- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
需要帮助解决后续问题。
我从 youtube 下载了 3 个视频,并使用 NReco.VideoConverter.FFMpegConverter.ConvertMedia 将其剪切成小块,并使用以下代码:
ffMpegConverter.ConvertMedia (SourceFile, Format.mp4, tempVideo, Format.mp4,
new ConvertSettings () {
Seek = StartTime,
MaxDuration = (EndTime - StartTime),
VideoCodec = "libx264",
AudioCodec = "mp3",
CustomOutputArgs = string.Format ("-vf \"pad=640:360:x=(640-iw)/2:y=(360-ih)/2:color=black\" -af \"volume = {0}dB\"", volumeMultiplier),
VideoFrameRate = 25,
AudioSampleRate = 44100,
VideoFrameSize = "640x360"
});
-i {0} -i {1} -filter_complex \"[1:v]scale={3}:{4},format=argb,colorchannelmixer=aa={5}[wat];[0:v][wat]overlay=main_w-overlay_w-{6}:main_h-overlay_h-{7} [out]\" -map \"[out]\" -map 0:a -y {2}
最佳答案
我没有找到 NReco 没有合并这些文件的原因,但我编写了自己的包装器
static void Main (string[] args) {
concatMedia (new string[] {
args[0], args[1]
}, args[2]);
}
private static string makeTempFile (string fileName) {
FFMpegConverter c = new FFMpegConverter ();
FileInfo fileInfo = new System.IO.FileInfo (fileName);
string tempFile = Path.Combine (fileInfo.DirectoryName, Path.GetFileNameWithoutExtension (fileName) + ".ts");
c.Invoke (string.Format ("-i {0} -c copy -bsf:v h264_mp4toannexb -f mpegts -y {1}", fileName, tempFile));
return tempFile;
}
private static void concatMedia (string[] files, string output) {
FFMpegConverter c = new FFMpegConverter ();
List<string> tempFiles = new List<string> ();
foreach (var item in files) {
tempFiles.Add (makeTempFile (item));
}
c.Invoke (string.Format ("-i \"concat:{0}\" -c copy -bsf:a aac_adtstoasc -y {1}", string.Join ("|", tempFiles), output));
foreach (var item in tempFiles) {
System.IO.File.Delete (item);
}
}
关于c# - FFMPEG NReco.ConcatMedia 合并来自不同来源的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43891341/
如何将视频转换为一系列位图?我需要一帧一帧并在内存中处理它们(无磁盘输出)。 我选择了NReco.VideoConverter但不确定哪种方法可以做到这一点。我了解 FFMpegConverter.G
尝试将原始图像写入 ConvertLiveMedia 时出现异常: System.IO.IOException: "Канал был закрыт. System.IO.IOException: "
我已使用以下代码将图像转换为视频 NReco.VideoConverter.ConvertSettings setting = new NReco.VideoConverter.ConvertSett
我正在使用 Nreco PdfGenerator 从 HTML 生成 pdf。一切都很好,但字符彼此靠得很近,不容易阅读。 有什么办法可以解决这个问题吗? HTML 版本 PDF版本 这是我的CSS
我已经使用这个工具大约一个星期了,现在,今天,它刚刚停止工作。我已将其余代码恢复到以前的状态,但我不断收到相同的错误。 我从抛出的异常中得到的是: An exception of type 'Syst
我正在使用 NReco.PdfGenerator 库从 html 生成 pdf。它适用于英语。我还需要包括 non-english language(marathi) ,在那种情况下不能像预期的那样工
如何在使用 nreco.videoconverter 转换后获取结果文件名我的要求是将文件路径保存到数据库 var converter = ne
我正在尝试将 HTML 代码转换为 JPEG 图像。它有点管用,但当我尝试使用条形码时却不行。 服务器端,我正在使用: 我正在使用 CODE128 协议(protocol)对 EAN133 条码进行编
我正在尝试使用 Nreco.VideoConverter 在 C# 中编写一个转换器。我以前从未有过这些经验。我开始研究这个领域是因为我在工作中被问到。我的问题是;我可以更改视频转换器中的比特率值。如
如何使用 C# 在 NReco PdfGenerator 中使用 HTML 强制创建新页面? 也许是特定的类或 id,就像这样适用于分页: Seite von 谢谢。 最佳答案 可以使用以下 cs
我将 NReco.VideoConverter 用于视频转换应用程序。现在我正在尝试将源视频中的音频替换为 mp3 音轨。我正在使用来自官方网站的这个片段:http://www.nrecosite.c
需要帮助解决后续问题。 我从 youtube 下载了 3 个视频,并使用 NReco.VideoConverter.FFMpegConverter.ConvertMedia 将其剪切成小块,并使用以下
我有一个作为 Azure Web 角色运行的应用程序,我想在 Wowza 服务器上截取实时 RTSP 视频流的屏幕截图。我正在使用 NReco FFMpegConverter 包装器。我遇到了一致性问
我正在开发一个用于实时流媒体的应用程序。 从视频设备捕获帧并使用名为 nreco 的 ffmpeg 包装器进行编码。 问题是,如果我尝试通过 red5 服务器上的 rtmp 将编码视频流式传输到 re
我将“NReco.PdfGenerator.dll”用于我的网络项目(Visual Studio 2012,c#),并且它可以成功地从互联网网址(如 http://google.com.tw)导出但是
在 NReco - wkhtmltopdf 的 html 到 pdf 包装器中,有没有办法以毫米为单位设置打印页面大小,就像您可以使用边框一样?在 docs 中找到了指定四种页面大小之一的方法,这不够
以下代码: string pathToVideoFile = "O:\\Byblioteka\\MAH01238.MP4"; var ffMpeg = new NReco.VideoConverter
我正在使用 Nreco Video Converter 在我的 MVC 项目中拍摄视频缩略图。应用程序在本地正常运行,但在实时主机上显示错误 错误是 拒绝访问路径“C:\Inetpub\vhosts*
我正在使用 Nreco PDFGenerator使用以下 PowerShell 脚本生成 PDF: $PdfGenerator = "$((Get-Location).Path)\lib\NReco.
我已经创建了一个用于 pdf 生成的 C# Azure 函数,并且正在使用 NReco pdf 生成器,但它无法在 Aazure 上运行。 您能否建议一种让它在 azure 中运行的方法? 我已通过
我是一名优秀的程序员,十分优秀!