How to find out what my live stream URL is? - url

I am trying to stream from obs or similar to maybe restream, but I also want to send the feed to a custom RTMP player on my site, it's asking for the Live Streaming URL. How can I find that?

I believe obs asks you to connect to a streaming platform (I think this is what you meant by "restream"). Depending on the platform you are streaming to (Twitch, Youtube, etc), then you would need to get the URL from that site. Connect to one of these first and it should give you a URL. I think YouTube requires 24 hours to enable live streaming.
If you can stream directly to your website I am not aware of it. Reason being, in most cases you have a dynamic IP or port that is not open for your website to view the original stream from your Obs software/computer.

Related

ONVIF / RTSP / RTMP protocol URLs in the web

Is there any this (look above) certain types URLs in the Internet? I need this urls for testing purpose.
I've found couple working RTSP urls:
rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov
rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov
Also I've seen this topic, but it doesn't have working links for now, at least I haven't found.
Does anyone can help me?
Use Spydroid application which will record from your mobile camera and provides RTSP livestream.
You can use RTSP url provided by Spydroid to stream on your application.
Here is the link
https://github.com/fyhertz/spydroid-ipcamera
I had exact same problem searching for live rtmp streams, unfortunately someone closed first popular question found by google that you mentioned, hope this topic will live.
Urls I was able to find:
//cartoon
rtmp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov
//car ad
rtmp://s3b78u0kbtx79q.cloudfront.net/cfx/st/honda_accord

How to create an ONVIF compliant interface using PiCam without third party codes?

I was looking through a lot of questions and answers about ONVIF compliant solutions for raspberry pi, but most of them provide incomplete solutions to my problem. I am looking for a way to make the Raspberry Pi Camera (Not an USB camera) into an ONVIF compliant camera which streams out in RTSP when needed.
Here is a similar question on how to implement ONVIF compliant interface that I've already tried to answer, but since in this case I guess you just want the video stream and using gSoap or anything would violate the third party software limitation, here is what I would do:
1) For an ONVIF client to be able to retrieve your stream URL, you need to implement a response to the GetStreamUri ONVIF request - through that you can return the actual RTSP link and if you have some sort of RTSP server running (I guess live555 is the most common choice these days) then the client will continue connecting to the RTSP server and will get the stream. I assume there are some out-of-the-box RTSP streaming solutions for Raspberry Pi so I won't talk about how to setup live555.
2) For the GetStreamUri to work, the client needs to know a profile token for this specific stream. This is why you need to implement the GetProfiles request. I assume since you are writing a solution for an exact use case, just predefine the xml response to this request and with a single profile and a hardcoded token. The GetProfiles request itself does not depend on any input parameters so you should be safe here. The ONVIF client may as well send some authorization headers, but you might for start just as well ignore them and implement authorization when the actual streaming is running. The ONVIF client may as well send a lot of other requests like capabilities etc., but you could ignore those for now. One important request is GetSystemDateAndTime - ONVIF clients query this since the timestamp is used in the authorization token.
What I would do is create a simple C/C++ web server with predefined xml answers for these 3 requests, take a general ONVIF client like ODM (Onvif Device Manager) and try to connect to the camera from it and see what happens, if any other requests are issued that block the flow or not. My guess is that it could actually work with these three in the following order: GetSystemDateAndTime -> GetProfiles -> GetStreamUri. I could be wrong and the client might query something else and not receiving an answer could make it stop from taking any further actions, but I am not sure about this.

Bandwidth Data implications of embedding Youtube videos in my website

If I embed a Youtube video on my web page, what are the data usage implications on my server?
I have a shared web hosting plan for my website with a data transfer limit of 5 GB/month. When a user plays video on my site, is my server taxed for data transfer i.e. if the video is of size 1GB, is my data transfer limit decreased by 1GB?
And is my server processor taxed for video streaming?
What other things should I be concerned about?
Is there any link you can point me towards? That will be helpful.
Thanks
Both the youtube player and the video content is streamed from Youtube's server. The only price you pay is the few bytes it takes to add the video player embed code in your HTML pages.
When you embed a YouTube video, it streams directly from YouTube's servers.
Your server is not involved.
When you insert youtube or any embed code in your html page, your server serves the html content to the user's web browser / client (technically means user's web browser). And this html content is processed and translated by the client/ user's web browser. This means that it is served by your server as a link, but when the client translates it, it becomes an action; an action to pull content from the somewhere. So the client (user's web browser pulls the video from the specified url embedded in the iframe. In turn, the bandwith been used are calculated from
In addition to what Etienne Perot said,
There are 3 nodes in play here, namely:
Your server
Youtube Servers
The Client (i.e the user accessing you website)
In simple words: embed is an html tag that allows you include a link to a resource. And since youtube's embed goes in the form of youtu.be/foo or youtube.com/foo. Your browser simply parses (processes the link) and gets the content from that link, thereby visiting youtube website (underground) to fetch the referenced link without going through your server nor anything like that.
Meanwhile when you insert youtube or any embed code in your html page, your server serves the html content to the visitor's web browser / client (technically means visitor's web browser). And this html content is processed and translated by the client / user's web browser.
This means that it is served by your server as a link, but when the client translates it, it becomes an action; an action to pull content from the somewhere. So the client (user's web browser pulls the video from the specified url embedded in the iframe.
In turn, the bandwith been used are calculated from
The client (i.e the bandwidth used to access in the internet and the video's url) - calculated or billed by your ISP from your data active subscription.
Youtube's Server (i.e the bandwidth from the server that serves the content being streamed) - calculated or billed by google cloud service from their inhouse cloud resource allocation.
If you use the google chrome browser, you can check this our by right clicking on the video and clicking inspect element, then switching to the network tab; you might have to hit refresh so that the page tries to get all the content loaded all over again: the purpose of this is to see where the content is loaded from.
See Network Analysis Reference on how to use the network tab in google chrome developer tools. Mozilla firefox and some named browsers also have the inspect element and network monitor feature.
I hope this helps somebody.

How to I access a SoundCloud public stream?

How do I play a track from a SoundCloud URL, which, for example, I got from the xml response from a query
<stream-url>https://api.soundcloud.com/tracks/31164607/stream</stream-url>
I should have thought that it would have been as easy as:
https://api.soundcloud.com/tracks/31164607/stream&client_id=my_client_id
yet I get
<error>401 - Unauthorized</error>
All I want to do is consume it in a Silverlight MediaElement, so all I need is set some url to the MediaElement's Source property.
I've checked an application that I wrote about 2 years ago, and THEN, accessing the stream url was as easy as this for a public track:
http://api.soundcloud.com/tracks/18163056/stream&consumer_key=MY_CONSUMER_KEY
however this no longer seems to work.
For example, all I had to do then in C# was:
MediaElement me = new MediaElement();
me.Source= new Url("http://api.soundcloud.com/tracks/18163056/stream&consumer_key=MY_CONSUMER_KEY");
me.Play();
Any hints would be appreciated.
I had a reply on a Microsoft forum that seems to imply that SoundCloud might not be possible to stream to Windows 8 Metro devices without consuming the whole stream before playback starts - which is quite worrying and would seem to imply that to make authentication possible, it would have to be done entirely in the url querystring insterad of using the header:
(The following reply is the answer to the following question: 'I am able to access an audio stream by http using the MediaElement, however I need to access it via https in which I need to add the oAuth info to the header of the initial request.
How is this done when using a MediaElement, and if it cannot be done, what is the workaround for consuming an audio feed in Metro 8 that requires header authentication to stream?')
"Direct access to the underlying network stream is not currently permitted by the MediaElement. Because of this there is currently no way to modify the header of the HTTP request to include any additional authentication information. That said, you do have control over the URL. You could theoretically setup an HTTP proxy service that translated the HTTP GET request parameters into the necessary oAuth credentials. Keep in mind that this is just a theoretical workaround. You may find different behavior in practice. Another theoretical workaround would be to handle the oAuth yourself via a raw stream socket and pass the retuned media data to the MediaElement via "Set Source" and a "Random Access Stream". Please keep in mind that this method has major limitations. in order to use a "Random Access Stream" with the ME you need to make sure all of the data is available before passing it to the ME."
The proxy service is not scalable for an application that is merely distributed for free as every stream would need to come via the proxy. And the raw stream socket, although getting around this, would mean that playback could not start until the whole file had downloaded - and this goes against all current UX (User Experience) guidelines.
So once again, if anyone has any tips, or info about how the whole authentication thing can be achieved in a querystring instead of using headers, I'd appreciate it!
I'm a little confused about whether you're referring to a public or a private track? If it's a public track, then you shouldn't need to send any authentication information, just your client id.
When I request https://api.soundcloud.com/tracks/31164607/stream?client_id=YOUR_CLIENT_ID then I get a 302 redirect to the proper mp3 stream.
Remember, adding parameters to a URL must start with a ? not &. This could (more than likely) be the reason why you are getting a 401 (SC is not picking up the client_id).
After authentication the link like this
http://api.soundcloud.com/tracks/103229681/stream?consumer_key=d61f17a08f86bfb1dea28539908bc9bf
is working fine. I am using Action Script.
I'm following up on Tom's reply because he calls attention to url character specificity. My HTTP requests randomly started failing today, and I was prefacing my client_Id with a ?. As soon as I changed that single ? to &, it started working. So in my case, SC wasn't picking up my client_Id because I used the wrong character. I think depending on where in the request we're talking about specifically, it's worth noting that differences between ? and & do make a difference.

determining full url from wireshark

i am watching a video stream from a proprietary app and i want to know the URL it's connecting to. note that in this case, i know the URL that it connects to but am curious how i'd determine it using wireshark.
i have wireshark open and i let it scan for a few seconds. i looked at the results, and all i was able to determine was the url and port of the site that's providing the stream. there's a series of URL parameters that are important as well. is there a way with wireshark to see the whole url that the app is connecting to?
A full URL is the concatenation of 'host' and 'path' ('path' is URI in wireshark's jargon).
The concatenation of these strings usually does not pass on wire - you will not see it in wireshark - and it is not required by HTTP.
Therefore, you have to concatenate them on you own, either manually or using some software as the one proposed by the writer of the lua dissector.
Example:
GET /path HTTP/1.1
Host: www.amazon.com
thus, the full URL is: www.amazon.com/path
There is no such thing as a "whole" url. An application may connect to many servers during it's lifetime.There could be different servers for authentication, configuration, logging, data, etc.
Wireshark is a low-level monitoring tool. You can choose to watch the packets of a specific osi-layer and add filters to limit the output. But I don't think it can aggregate all the incoming connections of a specific application.
Please, check out following custom dissector written in Lua, that helps showing full URL in wireshark HTTP captures
Feel free to ask any questions regarding it, upvoting is preferred as well ;)

Resources