Recognize a song with a media stream in javascript - javascript

I was wondering if there is a way to recognize a song based on a media stream, because i want to capture the audio of a tab in google chrome and then know what song it is.
So far the only thing i really found was a song recognizer with an mp3 file, but i was wondering if there is an api or something that i can do it with a stream.

Yes, there actually are a couple of different API's out there, the most popular one (and IMO the best one) being Echoprint.
Good luck with your coding!

Related

How to take video snapshot with VLC Web Plugin

I currently need to extract snapshot(s) from an IP Camera using RTSP on a web page.
VLC Web Plugin works well with playing stream, but before I get my hands dirty on playing with its Javascript API, can some one tell me whether the API can help me to take the snapshot(s) of the stream, like the way it done with VLC Media Player, cuz it does not present on the above page.
If the answer is 'No', please give me some other way to do this.
Thanks in advance.
Dang Loi.
The VLC plugin only provides metadata properties accessible from JavaScript.
For this reason there is no way to access the bitmap/video itself as plugins runs sand-boxed in the browser. The only way to obtain such data would be if the plugin itself provided a mechanism for it.
The only way to grab a frame is therefor to use a generic screen snagger (such as SnagIt), of course, without the ability to control it from JavaScript.
You could, as an option, look into the HTML5 Video element to see if you can use your video source with that. In that case you could grab frames, draw them to canvas and from there save it as an image.
Another option in case the original stream format isn't supported, is to transcode it on the fly to a format supported by the browser. Here is one such transcoder.

Recording audio from multiple microphones simultaneously with getUserMedia()

it is possible to access different microphones at the same time using getUserMedia()?
This whould be useful to
filter out background noise;
create some sort of stereoscopic effect;
make available multiple audio tracks for an international
streaming conference.
Apparently, it is quite tricky for video source:
Capture video from several webcams with getUserMedia
I was wondering if, for the audio source, the problem was different.
You should be able to do this but I imagine the browser support will let you down somewhere along the line.
You should be able to create several media sources by specifying a microphone ID when using getUserMedia. You can find the IDs of all connected media devices using MediaDevices.enumerateDevices()
Once you have two separate microphone inputs you should be able to get the data using an AudioContext.
Then it's a case of doing what ever you're doing to the bit data before it's output to the browser.
This is all very high level and the details of the actual implementation would probably take quite a long time to figure out but as for your question: Yes, it should be possible if browser support is there.

Streaming audio via html5/js (a la radio)?

Is there a library or technique out there that will let me embed a streamed audio source in a webpage? I've seen other SO answers recommending audio.js for similar requests, but it looks like that will only let you pick a single audio file.
While I guess I could put a bunch of effort into making a file-like audio stream, I feel like there has to be a better way to go about this.
Looks like the best thing for the job is one of the use-cases of jPlayer; will update if problems crop up or something better rears its head.

How can I do video capture in the browser?

Ideally what I was initially looking for is an implementation of the HTML5 Media Capture API with a polyfill rolling back to Flash, however, my research has concluded that the API is in its infancy and is yet to be taken up by any of the major vendors, and in addition to that, Flash means for doing what I need seem scarce.
I need to be able to take webcam input from a camera, show a live preview, record, and play back that recording, nothing more, no upload to server necessary, all local.
Are there any decent Flash solutions? Or other means of achieving this?
I have found a lot of references to Red5, to clarify, would that refer to this: http://www.red5-recorder.com? Is this really the tool to use or are there better alternatives?
I ended up using http://nimbb.com for this, the free version has some limitations but gives the basic functionality needed met my criteria for the project.
In addition to my needs it also allows users to upload recordings to the Nimbb website and share over social, which can't hurt!
I too am looking around for the same feature. The best I found was Open-Tok, they do all the work
http://www.tokbox.com/opentok/plugnplay#VideoMessages
My problem is my site is adult in nature, so the people recording the videos would more than likely be naked. This is against the terms of service for Open-Tok I do like their offering.

jQuery Audio Player

I was given 2 MP3 files, one that is 4.5Mb and one that is 5.6Mb. I was instructed to have them play on a website I am managing. I have found a nice, clean looking CSS based jQuery audio player.
My question is, is this the right solution for files that big? I am not sure if the player preloads the file, or streams it? (If that is the correct terminology) I don't deal much with audio players and such...
This player is from happyworm.com/jquery/jplayer/latest/demo-01.htm
Is there another approach I shoudl take to get this to play properly? I don't want it to have to buffer, and the visitor to wait, or slow page loading... etc.etc. I want it to play clean and not affect the visitors session to the site.
The name is a bit misleading - the MP3 playing is done in a Flash component, as in all other similar players, too. The jQuery part of it is the control and customization of the player (which is very nice, I'm not saying anything against the product).
The player should be capable to play an MP3 file while it loads. It's not going to be real streaming (because you can't skip to arbitrary positions) but it should work out all right.
Make sure you test the buffering yourself, using a big MP3 file. Remember to encode the MP3 files according to the rules because otherwise the files will act up, especially in older players.

Categories