0
我一直在努力,現在其目的是在服務器上運行,開發時間長一個C#應用程序工作。它從一個數據庫獲取信息並用它製作一個視頻。我一直在使用這個porpuse庫(Aforge)。但現在看起來我必須使用FFMPEG將5個mp4合併爲一個。我的問題是:與FFMPEG /熔接機和C#
我必須從下載「執行」exe文件,使其工作?或者我可以簡單地使用像其他庫(如Aforge)的DLL?
FFMPEG看起來很複雜,我。我一直試圖使用Splicer insted。有一個非常漂亮和乾淨的example,我很樂意使用。但我無法讓拼接器工作。我正在使用VS 13.如何獲得拼接器的工作?將dll添加到「調試文件夾」,然後添加引用?如果是的話哪個dll?
這是我的代碼到目前爲止。它不顯示任何錯誤,但它不會做任何事情(我加了參考和splicer.dll到我的項目)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Splicer;
using Splicer.Renderer;
using Splicer.Timeline;
namespace MergeVideos
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
string firstVideoFilePath = @"C:\file1.avi";
string secondVideoFilePath = @"C:\file2.avi";
string outputVideoPath = @"C:\output.avi";
using (ITimeline timeline = new DefaultTimeline())
{
IGroup group = timeline.AddVideoGroup(32, 720, 576);
var firstVideoClip = group.AddTrack().AddVideo(firstVideoFilePath);
var secondVideoClip = group.AddTrack().AddVideo(secondVideoFilePath, firstVideoClip.Duration);
using (AviFileRenderer renderer = new AviFileRenderer(timeline, outputVideoPath))
{
renderer.Render();
}
}
}
}
}
提前感謝!