How to record voice files using PHP, FLASH
Asked Answered
C

6

7

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!

Countess answered 14/1, 2010 at 16:42 Comment(2)
I read about RED5, but on a shared hosting environment I won't be able to install it. So need an independent solution.Countess
You also need the Flash client that connects to Red5 via rtmp and streams the audio and video data to it. Red5 is just a media server, it's job is to receive the data and store it in .flv files.Madonna
M
4

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.

Miguelinamiguelita answered 16/1, 2010 at 7:31 Comment(1)
Use audior.ec and flvar.com for audio and hdfvr.com for video.Madonna
Q
11

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

Quinquagesima answered 14/12, 2011 at 17:51 Comment(2)
Question: How can I control how the audio is played? I don't see a $.jRecorder.play function, and I want to be able to play/pause the audio after it is recorded. And I don't want it to automatically play after I hit stop. --ThanksCoparcenary
To play / pause / fastforward etc you need to use some normal player. Once you get the WAV file uploaded in the server (after converting to mp3 using tools like FFMPEG ), you can simply use any jPlayer to load the file through browser and manage. This plugin only records and push to your server. Playing with the recorded content is less important here.Quinquagesima
M
4

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.

Miguelinamiguelita answered 16/1, 2010 at 7:31 Comment(1)
Use audior.ec and flvar.com for audio and hdfvr.com for video.Madonna
H
0

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.

Hydrant answered 14/1, 2010 at 16:46 Comment(1)
@ftrotter nope, he mentions bothHydrant
C
0

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.

Centrality answered 14/1, 2010 at 16:53 Comment(0)
E
0

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.

Ed answered 8/3, 2013 at 2:52 Comment(0)
D
0

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.

Dismount answered 19/8, 2013 at 7:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.