I am trying to make a react page that listens to music, just like shazam does. Do I have to use some API or something like that and how to do it?
ACR-Cloud allows you to scan audio files and it will recognize the song playing, unlike popular methods where the song is listened to in real-time and recognized, you can record the audio and scan it. However, it'll create the impression that you are listening to it in real-time. I think that's what you need.
On frontend, you can record a n(10 for ex) sec audio clip and send it to our backend which will perform the automatic recognition and send back the response to the front-end.
Take a look at ThisSong-Backend(Python)
Shazam Clone UI Demo (Front End Demo with Reach Native)
Also, there's an official ShazamKit
Related
I have to create an app to live stream and save live stream video.
An app ( which is simple version of cam app as Botslab/Mi home/ ... ) just lives every time, saves video (maybe every 20 mins) to memory stick and watches saved videos on App
I plan to use react-native-webrtc for the project.
But when I read docs, it has a problem: mediaDevices.getDisplayMedia() can help to record video but my skill is not good enough so I can't find a way to use it in React Native.
I have seen https://stackoverflow.com/a/59082227/14745811 but it can't stream HD or fullHD quality
So does anyone have any suggestions?
Of course, a free option because I use my company server.
I am trying to implement video live streaming
live streaming and
upload it to server and
save the streaming video (Playback)
in react native can any one help me with a sample project
this is will be helpful https://www.npmjs.com/package/react-native-video
for point upload it to server, what exactly do u need upload? video uploading or something else?
So - you'll need a backend server that can accept a video stream, and convert it into a stream that can be consumed in React Native. You'd also like the server to save the streamed video, and encode it so it can be played back as video on demand (VOD) after the stream has stopped. None of this is React - it'll all be done on the backend.
You can build all this yourself, but there are a number of APIs that can do this for you. Disclaimer: I work for one such company: api.video. (A Google search will find others)
For livestreaming from the browser, you can use getUserMedia and stream to a server. (you can see my demo using JavaScript at livestream.a.video. This stream wil be visible to all your users, and then also recorded and saved as VOD for later playback.
To upload a recorded video - you can use file.slice() to break the video into manageable chunks, and upload to the server - for transcoding into a video stream (demo at upload.a.video, and tutorial.)
For playback, these APIs will give you a player URL or the m3u8 url that you can incorporate into a video player. This is your React Native part - and there are several video players that you can add into your application to playback HLS video. At api.video, we have our own player, and also support 3rd party players.
I am trying to build a messaging app with react native and I don't want to use pre-built messaging components such as gifted-chat because what I want is to learn how to code such mechanisms.
Posting data is simple. I can just call my RESTful API whenever the "Send" button is pressed.
But then I would like messages sent by the other person to appear at the bottom of the conversation so that it looks like real time messaging. But how can I listen for new messages sent by the other person? Asking the API every 'n' seconds doesn't seem like a good idea.
As Dan suggested use sockets, there are plenty of tutorials that can show you how to implement real-time messaging in node.js with socketio. Here is my favorite! A quick google search returns plenty more of varying degrees of simplicity.
If you don't want to build your own backend then you can try Firebase. You will find some tutorials on google about how to implement a chat app.
I want to create an application capable to play YouTube video's audios and also save the downloaded content in a local cache, therefore when the user decides to resume or play the video again, then it doesn't have to download part of video again but only download the remaining part (User can decide what to do with the cache then, and how to organize it).
It is also very convenient for mobiles (it is my main focus) but I'd like to create a desktop one too for experimental purposes.
So, my question itself is, does YouTube provide any API for this? I mean, in order to cache the download content I need that my application download the content and not any embed player (also remember that it is a native application). I have a third-party application in my Android system that plays YouTube videos, so I think it's possible unless that the developers use some sort of hack, again this is what I don't know.
Don't confuse with the web gdata info API and the embed API, this is not what I want, what I want is to handle the video transfer.
As far as I know, there is no official API for that. However, you could use libquvi to look up the URLs of the real video data, or you could have a look at how they do it and reimplement it yourself (see here).
Does anyone know how technically to send videos (i.e. Youtube Videos) to a Roku player? There is a "Twonky Beam" app that allows streaming and what it appears to do is to send .mp4 files to Roku for playback. See the demo here: http://gigaom.com/video/youtube-on-roku-twonky-airplay/
This is done without a "Twonky Beam" Roku app. Looks like something that Roku supports natively, although I cannot find anything documented.
I want to know how they were able to accomplish this without Roku being a UPNP or DLNA device.
Any insights here would be great!
There are discussions on how to extract the mp4 URL from YouTube here and here
In terms of how to do airplay style video playback on Roku, you would use the External Control Protocol to launch a channel with the URLs of the video you wish to play back, or once your channel is launched, us the ECP in combination with the roInput component to send the URL's to your channel. Your channel would then send the URLs to a video playback compoenent which would initiate playback from Youtube or whatever source you send it. If you want to play URL's from your device (android/IOS) you would need to run a web server on the device to serve videos to the device.
here is an Open Source YouTube project referenced in that second thread.
Any unofficial project that plays video's from YouTube is subject to DMCA takedown by YouTube should they decide your project does not fit with their goals.
roInput is not really well documented, here is an example that demonstrates both roInput and launch parameters (launch parameters are keywords you include in an http POST):
function main(params as object)
if params.parameter <> invalid then
print "This channnel was launched with Launch Parameters!"
print params
else
print "launched without input parameters"
end if
port=CreateObject("roMessagePort")
input=createobject("roInput")
input.setmessageport(port)
while true
msg=wait(100,port)
if type(msg)="roInputEvent" then
params=msg.getinfo()
print params
end if
end while
end function
so your parameters might be "vidurl=http://myserver.com/video300k.mp4&vidurl=http://myserver.com/video600k.mp4" if you wanted to send multiple bit rate videos.
there are plenty of examples of how to play video on a Roku in the RokuSDK, the simplest being the simplevideoplayer exmaple.
As to the last part of the question re UPNP, you can find a roku on your lan either via brute force telnet on port 8060 to every ip or by using SSDP, also documented in the ECP guide linked above