Lievstreaming a webcam: can I push to a plattform or is pull the only way (Internet without publich IP)

tschloss

New Member
Hi,
I want to stream a webcam (Golf course; AXIS PTZ) to be consumed on our homepage. I learned that I need a streaming platform and most likely a local software between the webcam (offering .264 and .265 streams) and the streaming platform. The platform is not yet decided on. It is all low volume (one source, 10's of parallel viewers more than 100's).

My very basic question:
I have to use an LTE/5G service into the Internet. This service does not offer a public IP (not in IPv4, but also not in IPv6).
So I would be very interested, if it would be possible to actively send the stream to the service (push) vs. a pull mechanic by the platform (which is dificult because I can not offer an IP to pull from).

Thank you in advance!
Thomas
 

AaronD

Member
Could you stream to YouTube or similar, and then embed the YouTube video window into your webpage? I know YT has some code that you can copy/paste into your website to do that; maybe others do too?
 

tschloss

New Member
Could you stream to YouTube or similar, and then embed the YouTube video window into your webpage? I know YT has some code that you can copy/paste into your website to do that; maybe others do too?
Thank you. The selection of a streaming service is not made. The integration into the website I consider as not an issue currently (either the streaming service offers a player or we use VideoJS). The question I am dealing with is how to get the stream out of my local network. If the streaming service wants to pull the source stream, I have a problem because I have no IP. A setup with the encoder pushing the stream to the service would be easier. I haven‘t dealt with this topic so I am asking here.

But for the case the streaming service needs an IP to pull from, I have a possible solution: Cloudfare offers some service acting as a reverse proxy while maintaining a tunnel to the LAN which is initiated from the LAN outbound.
 

AaronD

Member
Thank you. The selection of a streaming service is not made. The integration into the website I consider as not an issue currently (either the streaming service offers a player or we use VideoJS). The question I am dealing with is how to get the stream out of my local network. If the streaming service wants to pull the source stream, I have a problem because I have no IP. A setup with the encoder pushing the stream to the service would be easier. I haven‘t dealt with this topic so I am asking here.

But for the case the streaming service needs an IP to pull from, I have a possible solution: Cloudfare offers some service acting as a reverse proxy while maintaining a tunnel to the LAN which is initiated from the LAN outbound.
You're overthinking this. Lots of people stream to YouTube and other platforms without a static IP. The platforms are intended to work exactly like that.

Follow the standard instructions to stream to your favorite platform, and watch it "just work", with no need to you to understand any of it. Again, this is exactly how they're *designed* to work. Likewise to get that feed from the platform to your website.

(Actually, your website doesn't see the video at all. It's all through the platform, and the copy/paste code that they give you tells the viewers to go get it directly from the platform and display it in a rectangle that your site leaves empty, which is also handled by the copypasta. But that's already getting into some details that aren't strictly necessary to "just make it work".)
 

tschloss

New Member
I try to rephrase: I have a source in my LAN, let‘s say 192.168.0.99:1234 serves an http livestream.
I chose xyz to be my streaming platform.
What‘s next:
Is it: I configure xyz to consume my source in order to „broadcast“ it into players?
Or do I need an additional component in my LAN to read from source and send it out to xyz? Would obs this component for a 24/7 livestream?

(I was not talking about a static WAN IP gir my network, but a public IP where at least for a while the router can be reached)
 

AaronD

Member
If the webcam can be configured to go directly to YT or some other platform, I'd look at doing that first. Sounds like you really don't need OBS.

If not, then you'd use OBS as a "translator". Browser or Media source in OBS to look at the camera - that's all on the local LAN - and then OBS goes to the platform like usual. Configure either the router or the camera so that the camera always has the same local IP.
 

tschloss

New Member
If the webcam can be configured to go directly to YT or some other platform, I'd look at doing that first. Sounds like you really don't need OBS.

If not, then you'd use OBS as a "translator". Browser or Media source in OBS to look at the camera - that's all on the local LAN - and then OBS goes to the platform like usual. Configure either the router or the camera so that the camera always has the same local IP.
Thank you. No, the cam just offers a stream on a certain port.

Can you elaborate on „OBS goes to the platform“? I haven‘t done it. So my Q: do you configure OBS to send to platform xyz using my credentials on this platform and an id for the stream? This exactly is the key question for me because in this case the transmission would be initiated from LAN to plattform and thus traverses CGNAT.
 

AaronD

Member
Thank you. No, the cam just offers a stream on a certain port.

Can you elaborate on „OBS goes to the platform“? I haven‘t done it. So my Q: do you configure OBS to send to platform xyz using my credentials on this platform and an id for the stream? This exactly is the key question for me because in this case the transmission would be initiated from LAN to plattform and thus traverses CGNAT.
1671727729408.png

Change the Service to your chosen platform, and figure it out from there. For YouTube, I use the Stream Key (advanced) instead of Connect Account (recommended), just because it was the only option not too long ago and I know how it works. YT's livestreaming dashboard still offers an auto-generated stream key that you can copy/paste into OBS here. Then the Start Streaming button works. Or you can use the now-recommended option, to directly use the account that you have there.
Another reason I like the stream key is because I can tell YT to generate a new one. That invalidates the old one, so I have to update OBS's setting when I do that, but it also kicks someone off that I might have allowed temporary access. And I never have to give them my password.

At any rate, there are lots of tutorials for how to connect OBS to your chosen platform, and I'll bet you can find a way to get the camera into OBS. Those are two completely separate things, neither of which knows or cares about the other. No connection between the camera and the platform, because OBS handles both separately.
 

AaronD

Member
I referred to OBS as a translator, but that's just a (very) specialized use. It's more like PowerPoint for live video, and your question is a lot like, "How do I show a graphic on a projector, when the projector doesn't directly support that graphic?"

The answer, of course, is to load that graphic into PPT, and then PPT drives the projector. Exactly as designed. Just do it; it works.

Likewise for you: get the camera into OBS, and then OBS drives the streaming platform. Exactly as designed. Just do it; it works.
 

Lawrence_SoCal

Active Member
Yes to what Aaron said, but more basically
OBS allows you to edit (composite) sources (a video stream from a webcam in your use) and add other sources (other audio/video) or overlays, crop the video, or any number of other things to modify the 'source(s)'. DO you want to do any of that (ie the PPTx example above... lots of options to re-size and re-arrange the graphic)
Or do you simply want the video to viewable as is? if the latter, then OBS possibly/probably overkill (unless other requirements, like local recording or ??)

I recommend considering data storage implications and user viewing data patterns. You do NOT want numerous folks trying to connected to your web site (if that web site on-location, connected via cellular signal). On the other hand, if web server is remote, then you have the option. there is traffic monitoring and control when you do it yourself, but also potential bandwidth charges if using public cloud server. In which case, hosting the video on a Content Delivery Network (CDN) like YouTube, Facebook, Twitch, etc means users go to that platform, user the CDN servers, bandwidth, etc. so more things to consider (ie the entire data and viewing path)

As noted above, if you go the CDN route, you can get a static URL that will point to you videos, and that video link can be posted on your website. So person can go to your website (or not), click link and watch video (and that video is NOT routed via your web server) ... and that may or may not be desired... depends...
 

tschloss

New Member
View attachment 89936
Change the Service to your chosen platform, and figure it out from there. For YouTube, I use the Stream Key (advanced) instead of Connect Account (recommended), just because it was the only option not too long ago and I know how it works. YT's livestreaming dashboard still offers an auto-generated stream key that you can copy/paste into OBS here. Then the Start Streaming button works. Or you can use the now-recommended option, to directly use the account that you have there.
Another reason I like the stream key is because I can tell YT to generate a new one. That invalidates the old one, so I have to update OBS's setting when I do that, but it also kicks someone off that I might have allowed temporary access. And I never have to give them my password.

At any rate, there are lots of tutorials for how to connect OBS to your chosen platform, and I'll bet you can find a way to get the camera into OBS. Those are two completely separate things, neither of which knows or cares about the other. No connection between the camera and the platform, because OBS handles both separately.
Thank you for sharing your knowledge. With that in mind and more research in the meanwhile I came to the conclusion that „sending“ (pushing) from the place near the source is the common pattern. Plattforms seem to offer endpoints where I can push with a given stream key. This would help me a lot because then I can initiate the IP connection out of the LAN and do not have to provide an IP address to my source or some middleware.
(This is about the networking layer, the video layer is not yet touched: codecs, transports, protocols….)
 

AaronD

Member
Thank you for sharing your knowledge. With that in mind and more research in the meanwhile I came to the conclusion that „sending“ (pushing) from the place near the source is the common pattern. Plattforms seem to offer endpoints where I can push with a given stream key. This would help me a lot because then I can initiate the IP connection out of the LAN and do not have to provide an IP address to my source or some middleware.
(This is about the networking layer, the video layer is not yet touched: codecs, transports, protocols….)
You're getting there, but you're still overthinking it. If you want to understand all the details, that's perfectly fine, and maybe you can do something decidedly non-standard with that knowledge, but you appear to me like you want to know all about how to build a car from scratch before you drive one. It's just not necessary.
 
Top