简体   繁体   English

使用C#将大型(4gb)avi文件转换为mpeg或mp4格式

[英]Converting large (4gb) avi file to mpeg or mp4 format using C#

I have successfully converted avi files to Mpeg using NREco converter http://www.nrecosite.com/video_converter_net.aspx 我已经使用NREco转换器http://www.nrecosite.com/video_converter_net.aspx将avi文件成功转换为Mpeg

But, the length (duration) of the converted video is never greater than 2mins, 35 secs. 但是,转换后的视频的长度(持续时间)永远不会大于2分钟35秒。 I tried using ffmpeg command line utility ( https://www.ffmpeg.org/download.html or http://ffmpeg.zeranoe.com/builds/ ffmpeg 64 bit static for windows) but the length was always less than or equal to 2mins, 35 seconds. 我尝试使用ffmpeg命令行实用程序(对于Windows为https://www.ffmpeg.org/download.htmlhttp://ffmpeg.zeranoe.com/builds/ ffmpeg 64位静态),但长度始终小于或等于至2分钟35秒。 How to increase the duration of the ffmpeg converted video? 如何增加ffmpeg转换视频的持续时间?

I tried the -t command but couldn't increase the length (duration) of the converted video. 我尝试了-t命令,但无法增加转换后视频的长度(持续时间)。 Original video is a 14mins 5 sec avi file. 原始视频是一个14分钟5秒的avi文件。

ffmpeg -i inputAVIfilename outputMPEGfilename
ffmpeg -i inputAVIfilename -t 90000 outputMPEGfilename

The video file has only bitmap images. 该视频文件只有位图图像。 No sound tracks are required. 不需要音轨。

Please note that my dll would be used with both windows & web applications. 请注意,我的dll将与Windows和Web应用程序一起使用。

Converting of videos of from one format to other can be done either using software or hardware. 可以使用软件或硬件将视频从一种格式转换为另一种格式。 In your case you are using ffmpeg which is software based solution. 在您的情况下,您正在使用基于软件的解决方案ffmpeg。 Generally speaking software based solutions are a lot slower, inefficient and has many operating system restrain, and I am suspecting you have reached that limit. 一般而言,基于软件的解决方案速度较慢,效率低下,并且受到许多操作系统的限制,我怀疑您已达到此极限。

I suggest that you use cloud based solution such as Azure Media service or Elementals. 我建议您使用基于云的解决方案,例如Azure媒体服务或Elementals。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM