简体   繁体   English

使用ffmpeg捆绑Flex AIR应用程序

[英]Bundle Flex AIR application with ffmpeg

In my Flex AIR application, I use ffmpeg via the NativeProcess API . 在我的Flex AIR应用程序中,我通过NativeProcess API使用ffmpeg

When user installs my application, I would like him to install ffmpeg as well. 当用户安装我的应用程序时,我希望他也安装ffmpeg Ideally, he would have it after installing my application without downloading ffmpeg from www.ffmpeg.org/ , installing and configuring it separately. 理想情况下,他可以在安装我的应用程序之后安装我的应用程序而无需从www.ffmpeg.org/下载ffmpegwww.ffmpeg.org/安装和配置它。

What is the best way to do it? 最好的方法是什么?

If my memory is correct, you can't bundle executables into the installer for security reasons. 如果我的内存是正确的,出于安全原因,您无法将可执行文件捆绑到安装程序中。 Well you can, but you can't execute them where they're extracted (mind you, that memory dates from before the introduction of NativeProcess). 嗯,你可以,但你不能在它们被提取的地方执行它们(请注意,那个记忆可以追溯到引入NativeProcess之前)。

The idea - I guess - is that the user can't download an AIR app that can potentially run malicious code without him knowing it. 这个想法 - 我想 - 用户无法下载可能在他不知情的情况下运行恶意代码的AIR应用程序。 The user has to somehow explicitly allow this, for instance by downloading the file into a specific location. 用户必须以某种方式明确地允许这一点,例如通过将文件下载到特定位置。

To reduce the number of steps for the user, you could place a zip with a preconfigured version of ffmpeg on a server, and automatically download that on first run of the application. 要减少用户的步骤数,可以在服务器上放置带有预配置版本ffmpeg的zip,并在首次运行应用程序时自动下载。 The user will then only have to pick a location to which the zip will be extracted. 然后,用户只需要选择要提取zip的位置。

If you don't have a web server, you can serve up the zip through some third-party service like Amazon S3, DropBox, Github, etc. 如果您没有Web服务器,可以通过Amazon S3,DropBox,Github等第三方服务提供zip。

You can embed any file you want. 您可以嵌入任何所需的文件。 You probably can not run an installer. 您可能无法运行安装程序。 But do ffmpeg need to be installed? 但是需要安装ffmpeg吗? If it is enough to copy all the files to a spécific location, you can perfectley embed those files in your application, and then run the executable via NativeProcess. 如果将所有文件复制到spécific位置就足够了,您可以将这些文件嵌入到应用程序中,然后通过NativeProcess运行可执行文件。 In flash pro, you just have to specify à folder (or files) in the AIR parmeters 'included files' (guessed name as i have flash pro in french). 在Flash专业版中,您只需在AIR参数的“包含文件”中指定à文件夹(或文件)(猜测名称为我有法语版的flash pro)。 I guess that's easy in flex to ... Those file are then stored in File.applicationDirectory 我想这很容易在flex ...那些文件然后存储在File.applicationDirectory

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

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