将视频转换为MP4格式,需要保存在远程服务器中 [英] Convert video to MP4 format and need to save in remote server

查看:128
本文介绍了将视频转换为MP4格式,需要保存在远程服务器中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我需要将视频转换为MP4格式并通过网络API保存在远程服务器中。



现在,我刚刚在网站上传视频并将文件发送到Request.Files中的API

然后将其检索为HTTPPOSTEDFILE并保存在远程服务器中。



但现在我需要将视频格式转换为MP4。



有没有免费插件可用于转换视频或任何代码?







问候,

Lalitha

解决方案

由于您在这里谈论网站,您可能会惹恼您的托管服务,因为转码是一项非常耗费CPU和RAM的操作 - 如果您一次为多个客户开始这样做,那么您就是将在Web服务器上使用重要资源 - 这将影响所有其他页面的所有其他操作。我强烈建议您在单独的专用机器上进行后台处理。

这不是一个简单的过程;有应用程序可以做到这一点 - FFMpeg是一个 - 并且有包装类允许您将它用作C#的DLL程序集: NReco.VideoConverter:C#FFMpeg包装器.NET库(免费) [ ^ 是一个,但可以理解,它需要花钱。

您可以找到免费版本:将视频转换为MP4 c - Google搜索 [ ^ ]但这需要一些跟踪,我只使用Yamb MPBox来改变现有MP4的宽高比文件,所以我不能告诉你它们有多好。



除非这是一个非常必要的要求,并且你已经与托管服务进行了讨论,我建议你可能想重新考虑一下! :笑:

Hi Friends,

I need to convert video to MP4 format and save in remote server through web API.

For Now, I just uploaded video in website and send file to API in Request.Files
then retrieve it as HTTPPOSTEDFILE and save in remote server.

but Now I need to convert video format to MP4.

is there any free plugins are available to convert videos or any code?



Regards,
Lalitha

解决方案

Since you are talking about websites here, you are likely to annoy your hosting service as transcoding is a very CPU and RAM intensive operation - and if you start doing this for several clients at once, you are going to be using significant resources on the webserver(s) - which will impact all other actions for all other pages. I'd strongly recommend that you do this as a background process on a separate dedicated machine.
It's not a trivial process; there are apps to do it - FFMpeg is one - and there are "wrapper classes" which allow you to use it as a DLL assembly from C#: NReco.VideoConverter: C# FFMpeg wrapper .NET library (FREE)[^] is one, but understandably, it costs money.
You may find a free version: convert video to MP4 c - Google Search[^] but that will take some tracking down, and I've only used Yamb MPBox to change the aspect ratio of existing MP4 files, so I can't tell you how good any of them are.

Unless this is a really necessary requirement, and you have discussed it with your hosting service, I'd suggest that you might want to rethink this! :laugh:


这篇关于将视频转换为MP4格式,需要保存在远程服务器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆