如何使用PHP、FLASH录制语音文件

发布于 2024-08-17 11:58:42 字数 256 浏览 5 评论 0原文

我正在开发一个应用程序,我需要录制语音(对于那些没有网络摄像头的人,因此他们只能使用麦克风来录制语音)或视频(那些有网络摄像头的人 - 例如笔记本电脑或外部)文件并将其保存在服务器上,然后将文件名和登录用户 ID 保存在数据库中以供以后访问。

我知道我需要为此使用某种 Flash 应用程序。但是有没有免费的可以达到这个目的,或者即使有付费的可以达到这个目的,那就太好了。我尝试过谷歌,但可能我无法找到正确的术语或其他东西,我无法成功找到合适的解决方案。

请帮帮我!

I am developing an application where I need to record voice(for those who does not have a webcam so they can use only microphone to record voice) or video(those who have a a webcam - like laptop or external) files and save them on server, thereafter save the file name and logged in users id on database for later access.

I know I need to use some sort of flash app for this. But is there any free one which could server this purpose or even if there are paid ones which could serve this purpose that would be great. I tried google but may be I was not being able to go after the proper term or something, I could not succeed finding a proper solution for this.

Please, help me out!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

幸福不弃 2024-08-24 11:58:42

您只需使用 jQuery 插件 jRecorder 即可做到这一点。您甚至不需要 Flash Media Server 或 RED 服务器。 JRecorder 与 jPlayer 相同,您可以使用 jQuery 和 HTML 来设计您的录音机,甚至不需要 Flash 或 Action 脚本知识。

jRecorder使用1个pix隐藏的swf文件来管理所有的录制/预览并将文件数据(wav文件)发送到您定义的URL(您可以在其中用PHP或Java编写代码来接收POST文件)

它非常简单和整洁。

您可以从以下位置下载此插件:

http://www.sajithmr.me/jrecorder-jquery

You can do that simply using jRecorder, a jQuery plugin. You don't even need a Flash Media Server or RED server. JRecorder is same as jPlayer, you can use jQuery and HTML to design your recorder and you don't even need Flash or Action script knowledge for this.

jRecorder uses 1 pix hidden swf file which manages all the recording / previewing and sending the file data (wav file) to a URL you defined (Where you can write code in PHP or Java to receive a POST file)

It is quite simple and tidy.

You can download this Plugin from:

http://www.sajithmr.me/jrecorder-jquery

欢你一世 2024-08-24 11:58:42

我在我们最新的项目中具有相同的功能,客户希望从网络摄像头录制视频,并且视频出现在用户的个人资料页面中。

对于服务器,我们实现了 RED5 服务器。您的主机中需要有一个 Java 虚拟机。您可以在网站上阅读详细要求和安装说明。

为了处理录制,我们开发了自己的 Flash 应用程序,因为客户要求自定义界面以与整个网站界面相匹配。我不知道细节,因为我们将其外包给了一位 Flash 开发人员。也许你可以看到遵循 此线程,由 JeroenW 开发的闪存记录。

要播放录制的视频,您可以使用任何支持播放 rtmp 视频源的 Flash 视频播放器。您无法直接在 RED5 中播放录制的 flv 文件,因为该文件缺少播放器所需的元数据。将录制的文件作为 rtmp 提供是由 RED5 完成的。

I have same feature in our latest project, the client want to have video recording from webcam and the video appear in the user's profile page.

For the server, we implement the RED5 server. It need a Java virtual machine in your hosting. You can read the detail requirement and installation instruction in the website.

To handle recording, we develop our own flash application, because the client request a custom interface to match with the overall website interface. I don't know the detail, since we outsource it to a fellow flash developer. Maybe you can see follow this thread, the development of flash recording by JeroenW.

To play recorded video, you can use any flash video player that support playing rtmp video source. You cannot play the recorded flv file in RED5 directly, since the file lack of metadata required by the player. Serving the recorded file as rtmp is done by RED5.

池木 2024-08-24 11:58:42

除了 red5 之外,还有 Adob​​e 自己的 Flash Media 服务器,允许您将音频/视频直接录制到服务器。

或者,如果您觉得很极客,您也许可以使用与服务器的套接字连接并在服务器端自行解码流来组合自己的解决方案。您应该能够将音频/视频本地捕获到内存中,然后将字节流提供给您自己的服务器应用程序。

In addition to red5 there is Adobe's own Flash Media server that allows you to record audio/video straight to the server.

Or if you feel geeky you might be able to put together your own solution for this using a socket connection to the server and decoding the stream yourself on the server side. You should be able capture the audio/video locally into memory and then feed the byte stream up to your own server application.

可爱咩 2024-08-24 11:58:42

有开源解决方案,但您需要一个自己的服务器来运行它们。
除非您的提供商非常好并且准备好安装必要的软件,否则无法从共享托管运行这些东西。

几周前我问了同样的问题,请检查出答案。

There are Open Source solutions but you will need an own server to run them.
There is no way to run these things from shared hosting except if your provider is really nice, and ready to install the necessary software.

I asked the same question a few weeks back, check out the answers.

似梦非梦 2024-08-24 11:58:42

当谷歌搜索“如何录制音频 php”时,这个问题首先出现,所以这里适合未来的任何人。

使用 flash 录制音频并使用 PHP 保存的简单方法:
https://github.com/clouddueling/SimpleRecorder

录制音频,将音频数据发布到您选择的网址。

This question when googling "How to record audio php" comes up first so here for anyone from the future.

A simple way to record audio with flash and save it with PHP:
https://github.com/clouddueling/SimpleRecorder

Record audio, post audio data to your choice of url.

以为你会在 2024-08-24 11:58:42

您可以尝试 recordmp3online.com,它有一个 SDK。这个的好处是,它不需要第三方服务器(ala Red5),并且支持没有安装闪存的移动设备。

You could try recordmp3online.com which has an SDK. The nice thing about this one, is that it doesn't need a third party server(ala Red5), and supports mobile devices that don't have flash installed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文