Recording audio to internet - SoundCloud API? - javascript

So I need to allow clients to record audio to the internet. Best solution I've found so far which keeps them on our site is the Soundcloud API and I just give them our account details and they use a version of the Soundcloud recorder (Flash/Javascript) hacked together for out site.
Main issue is, these recordings are long. Maybe up to an hour. Because Soundcloud API records in the browser then uploads the audio and transcodes on its server there's a lot to go wrong in the upload process which takes a long time with a big file. It's ok if we just record the audio in say 20 min chunks but it's just not that reliable.
We tried to build our own using wami-recorder, but that meant transcoding from wav to MP3 in the browser before upload to make the file smaller, but taking more time on the client machine - at least Soundcloud does the transcoding server-side.
Given the size of the files should I be looking at a server side recorder/streaming solution based on red5 or something, or is a client side recorder with upload a better proposal?
thanks a lot!

Related

Convert Video to Audio in client side then upload it to backend to reduce uploading size

In our project we only need the audio of a video file, to reduce the uploading size for a client I'm looking for a way to convert chosen video file to audio in clientside then try to upload the file to the backend.
It's a react app by the way.
Any idea or solution or library will help.
Taking the audio track from the video is a conversion process that uses video/audio codecs and could take almost the same time as the video length itself to re-encode the streams.
It might be either a client application (downloaded on a user pc) or you have to upload the file to your backend, or to some online service that provides an Online Converter from MP4 to MP3 for example, this converter - https://conversiontools.io/convert/mp4-to-mp3. It has limitations for a free tier.
Check other links:
https://stackoverflow.com/a/17532410/4299666

Creating an mp3 player for GWT

I am creating a web application with GWT that needs to be able to upload and manipulate (play, pause, scroll, etc.) mp3 files from the user's computer. It also has to be able to add time stamps, whose information can later be downloaded. I can't seem to find any simple way to add an mp3 player to my application. Is there some widget pack or something I can download without having to develop it all on my own?
http://www.gwtproject.org/javadoc/latest/com/google/gwt/media/client/package-summary.html ?
The only thing you will be able to do in GWT client side is playing these mp3 files.
Adding timestamps, information you will have to do serverside.

HTML5 audio - recording saves file OK, but no sound when playing back through audio control

I have an asp.net web application that allows a user to record audio. I'm using code from https://github.com/nusofthq/Recordmp3js along with Matt Diamond's recorder files (modified for wav instead of mp3). Not sure if it matters but I'm using the updated API for mediaDevices.getUserMedia().
The recording works fine, the wav file is saved to disk, and if I listen to the file on disk I can hear the recording. However, if I try to play the audio back through the HTML5 audio control on the page, there is no sound. The length of the file matches what is on disk so I don't think it's because the audio control is unable to find the file.
I can post my Javascript if that will be helpful. I'm currently testing on localhost using Firefox. Firebug doesn't show any errors.
Please let me know if any additional information may be helpful.
Thank you!
The (quickest) solution was to reset Firefox. Wav files now play without any issues.

Web Audio API and Audio Download and Protection

I'm reading a book about Web Audio API.
In the book it states that to play and load a sound using the WEB AUDIO API, there are 4 steps that needs to be taken:
1.) Load the sound file with XHR and decode it. (Will end up with a 'buffer')
2.) Connect the buffer to audio effects nodes.
3.) To hear the sound, connect the last node in the effects chain to the destination.
4.) Start the sound.
My question is...given these 4 steps, is there a way for the user of the website that uses the Web Audio to download the audio/audios played on the website???
If so, how does one prevent this.
or does it being 'buffered' prevent it from being illegally downloaded?
I would like to find a way to protect the audio files I use inside my game/app that I put up on the webpage that are played with the Web Audio API.....
Thank you....
EASILY save it, no. But 1) if it's being transferred as an MP3, etc file the user can go into their network cache and copy it; there's no inherent DRM or anything. 2) Even if the sound was being generated completely from scratch (e.g. mathematically) the user could use a virtual audio device like Soundflower to save the output.
So no, it's not really possible to prevent the user from saving audio files.

Live video broadcasting

I am going to develop a chat based application for mobile which allows video chat. I am using HTML5, javascript and PhoneGap. Using phoneGap, I am able to access mobile camera, capture a video, save the video and upload it in server. I have done it for android. But I need live broadcasting of the video. Is there any solution of that?
Note: It is not any android native app.
You didn't specify what facility you're currently using for the video capture. AFAIK, current WebView doesn't yet support WebRTC which is the w3 standard that will soon enable you to access the video frames in your HTML5 code. So I'm assuming you're using PhoneGap's navigator.device.capture.captureVideo facility.
On Android, captureVideo creates 3gp files. The problem with 3gp is that they cannot be streamed or played while capturing: the MOOV atom of the file is required for parsing the video frames in it, and it is written only after all frames in the file have been encoded. So you must stop the recording before you can make any use of the file.
Your best shot in HTML5 is to implement a loop that captures a short clip (3-5 seconds?) of video, then sends it to a server while the next chunk is being captured. The server will need to concatenate the clips to a single file that can be broadcast with a streaming server. This will add several seconds to the latency of the broadcast, and you are quite likely to suffer from lost frames at the point in the gap between two separate chunk captures. That might be sufficient for some use cases (security cameras, for example).
If your application is such that you cannot afford to lose frames, I see no other option but to implement the video capture and streaming in Java, as a PhoneGap Plugin.
See Spydroid http://code.google.com/p/spydroid-ipcamera/
It uses the solution with the special FileDescriptor you found. Basically they let the video encoder write a .mp4 with H.264 to the special file descriptor that calls your code on write. Then they strip off the MP4 header and turn the H.264 NALUs into RTP packets.

Categories

Resources