将视频文件转换为.flv文件

时间:2022-07-28 13:59:04

I am having a problem with converting video files to .flv files. I am using ffmpeg.exe tool to achieve this. Here on my local server when I use ffmpeg.exe tool with c# code everything is working good. But when I deploy the same code with ffmpeg tool on to my hosting server, where as .exe files are not allowed to execute, the code is not running. Is there any other way to achieve the same other than redirecting to video conversion sites because I want to save .flv files on my hosting server. Any help is appreciated.

我在将视频文件转换为.flv文件时遇到问题。我正在使用ffmpeg.exe工具来实现这一目标。在我的本地服务器上,当我使用带有c#代码的ffmpeg.exe工具时,一切正常。但是当我使用ffmpeg工具将相同的代码部署到我的托管服务器上时,不允许执行.exe文件,代码没有运行。除了重定向到视频转换网站之外,还有其他方法可以实现相同目的,因为我想在托管服务器上保存.flv文件。任何帮助表示赞赏。

Thanks

3 个解决方案

#1


After doing a quick bit of research, there do exist libraries you can use in C# do to FLV encoding, however that could get really pricey...and so could upgrading.

在进行了一些快速的研究之后,确实存在可以在C#中使用的库到FLV编码,但是这可能会变得非常昂贵......所以可以进行升级。

Something you could do...depending on how your current set up is arranged, is have a computer of yours run a CRON job (assuming Linux), or somethign similar, and pull the raw videos uploaded to your site every so often, convert them, and then push them back on to your site. It would mean a bit of wait time for the customer, but it would be a lot chepaer.

您可以做的事情......取决于您当前设置的排列方式,您的计算机是否运行CRON作业(假设是Linux),或者某些类似的计算机,并且经常将上传到您网站的原始视频拉出来,转换他们,然后将他们推回到您的网站。这对客户来说意味着一些等待时间,但这将是一个很多的人。

#2


Only effective solution is to upgrade hosting to an arrangement where you can run executables such as ffmpeg.exe.

只有有效的解决方案是将托管升级到可以运行可执行文件(如ffmpeg.exe)的安排。

#3


Upgrade or use an online converter like heywatch which has api. But this is double work than upgrading the hosting.

升级或使用像apy这样的在线转换器。但这是升级主机的双重工作。

#1


After doing a quick bit of research, there do exist libraries you can use in C# do to FLV encoding, however that could get really pricey...and so could upgrading.

在进行了一些快速的研究之后,确实存在可以在C#中使用的库到FLV编码,但是这可能会变得非常昂贵......所以可以进行升级。

Something you could do...depending on how your current set up is arranged, is have a computer of yours run a CRON job (assuming Linux), or somethign similar, and pull the raw videos uploaded to your site every so often, convert them, and then push them back on to your site. It would mean a bit of wait time for the customer, but it would be a lot chepaer.

您可以做的事情......取决于您当前设置的排列方式,您的计算机是否运行CRON作业(假设是Linux),或者某些类似的计算机,并且经常将上传到您网站的原始视频拉出来,转换他们,然后将他们推回到您的网站。这对客户来说意味着一些等待时间,但这将是一个很多的人。

#2


Only effective solution is to upgrade hosting to an arrangement where you can run executables such as ffmpeg.exe.

只有有效的解决方案是将托管升级到可以运行可执行文件(如ffmpeg.exe)的安排。

#3


Upgrade or use an online converter like heywatch which has api. But this is double work than upgrading the hosting.

升级或使用像apy这样的在线转换器。但这是升级主机的双重工作。