简体   繁体   English

自动将视频格式转换为Flash Video

[英]Convert video format to Flash Video automatically

I need to allow web site users to upload videos to my web site in various common formats. 我需要允许网站用户以各种常见格式将视频上传到我的网站。 From these I need to convert them to Flash video, and also limit their lengths and size. 从这些我需要将它们转换为Flash视频,并限制它们的长度和大小。 I need to do this automatically as part of the web site processing. 作为网站处理的一部分,我需要自动执行此操作。

Is there some simple tool that will allow me to do this? 是否有一些简单的工具可以让我这样做? If not, can you point me in a direction that might help me out. 如果没有,你能指出我可能帮助我的方向。

Thanks. 谢谢。

使用ffmpeg,您可以运行以下命令将input.avi转换为output.flv for flash:

ffmpeg -y -i input.avi -acodec mp3 -f flv output.flv

ffmpeg or mencoder is usually used for this kind of thing. ffmpegmencoder通常用于此类事情。

As you are using asp.net you should really be interfacing with the DLL. 当您使用asp.net时,您应该真正与DLL连接。 There is also a c# wrapper available for ffmpeg. ffmpeg还有一个c#包装器

我使用ffmpeg,它可以很好地与我的视频一起使用。

I've had this issue recently too, and I didn't want to go down the route of implementing a video conversion backend on the server. 我最近也遇到过这个问题,我不想在服务器上实现视频转换后端。

In the end, what seemed like a reasonable compromise would be to make use of a video conversion service supplied by one of the online services - something like bits on the run's API , although it is a paid service, seemed like it would straight forward enough to implement as a web service. 最后,似乎是一个合理的折衷方案是利用其中一个在线服务提供的视频转换服务 - 比如运行API的位 ,虽然它是一个付费服务,似乎很容易直截了当实现作为Web服务。

However, if this additional cost is not acceptable, then in a PHP world, I would try to use something like ffmpeg-php . 但是,如果这个额外的成本是不可接受的,那么在PHP世界中,我会尝试使用像ffmpeg-php这样的东西。 I guess there must be an equivalent in the asp.net world too, but bear in mind that video conversion can potentially take a really long time, and kicking off this process in a web scripting language is not ideal, if you are waiting for the request to finish, or are facing execution timeouts. 我想在asp.net世界中也必须有一个等价物,但请记住,视频转换可能需要很长时间,如果你正在等待,那么用Web脚本语言开始这个过程并不理想。请求完成,或正面临执行超时。

I think you need a server side software like Adobe Flash Media Server. 我认为你需要像Adobe Flash Media Server这样的服务器端软件。 It can convert video automatically to flv on your server. 它可以将视频自动转换为服务器上的flv。

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

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