簡體   English   中英

C#使用FFMpegConverter進行視頻連接

[英]C# Video concatenation using FFMpegConverter

我需要在ASP.NET Web API中實現視頻連接。 我可以使用'FFMpegConverter'Nuget Package成功連接從互聯網下載的一些示例視頻。 但是,當我嘗試連接從我的手機捕獲的文件並嘗試打開它時,我收到以下錯誤。 在此輸入圖像描述

以下是我正在使用的代碼段:

var ffMpeg = new NReco.VideoConverter.FFMpegConverter();
ffMpeg.ConcatMedia(_fileNames, videoRootPath.mp4, 
                   NReco.VideoConverter.Format.mp4, set);

這些是mp4文件的屬性屏幕截圖。

在此輸入圖像描述

提前致謝

通過對代碼進行以下更改,我得到了正確的輸出

  var ffMpeg = new NReco.VideoConverter.FFMpegConverter();
                NReco.VideoConverter.ConcatSettings set = new NReco.VideoConverter.ConcatSettings();
                ffMpeg.ConcatMedia(_fileNames, videoRootPath + tobename + ".mp4", NReco.VideoConverter.Format.mp4, set);

必須使用默認值初始化NReco.VideoConverter.ConcatSettings。 這應該是“ffMpeg.Concatmedia”方法的第四個參數。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM