Link to home
Start Free TrialLog in
Avatar of Robert Granlund
Robert GranlundFlag for United States of America

asked on

Add streaming video to a WordPress site

I am working with a WordPress site that would like to include streaming video.  Basically they have a farm that grows plants.  They have a LIVE video that shows the fields / gardens where plants are being grown.  From here they would like to place that live stream onto their site.  I have no idea on how to get a camera feed into a format that can be then shared on a WP site.  Any guidance will be greatly apricated.
Avatar of David Favor
David Favor
Flag of United States of America image

There are a few pieces to get this working.

1) Enough disk space to host your videos.

2) Enough savvy to use ffmpeg to transcode videos suitable for streaming.

3) Enough savvy to setup streaming on your server.

4) For live video, additional considerations are involved.

Likely you'll have cameras with local IP addresses, so you'll have to expose/connect these for public accessibility.

The way I generally do this with an local IP (this would include cameras) is to expose these via ssh tunnels directly to your WordPress machine.

Then run ffmpeg to capture video + transcode it locally (to compress stream), then pump the stream for each camera over a separate ssh connection, as an HLS stream.

Then on your WordPress site, you'll arrange for a player to work.

Note: I'd search https://GitHub.com for an embedded player to passthrough HLS to visitors.

There are many moving parts to this type project. Do each one at a time, incrementally + you'll likely get this working fairly easily.

And... this type system will be complex to setup, so time/money/will will be required to in great amounts.
Note: Be sure to get this working outside WordPress first, only then, integrate this into WordPress.
Personally, I'd look into one of  the various streaming providers, as they'll handle all the complicated setup. You would then just install and configure a WordPress plugin - so much easier :)
Avatar of Robert Granlund

ASKER

" various streaming providers"  can you briefly elaborate?  I have no idea where to start.
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

A fields & gardens grown very very slowly so I don't see the reason why they want to display live video for that?
Is it for security monitoring ?
Maybe they should elaborate the needs for this so we can recommand more appropriate options.

They have a LIVE video that shows the fields / gardens where plants are being grown Why? Watching plants grow is something that I do after I watch paint dry.  In a hurry I watch water start to boil.

One would normally use a DVR for this  with a live view and a motion capture view. you can then incorporate the dvr into the website.
Considerations...

1) I'm guessing you're looking for a free approach, as... monetizing the watching of plants growing... as David Johnson mentioned, this is like watching paint dry, which is why I provided a free approach.

2) As Chris Stanyon, if you can afford to use a paid service, likely best to use a paid service.

3) Another approach, since watching plants grow will likely get pass the Cancel Police, then you might just use a cheap GoPro live streaming to YouTube or Facebook.

Using a GoPro, you can set very high frame rates, like 1x frame/minute or each hour or day.

Using very long frame rates is handled by GoPros by default for just such applications.

Likely long frame rate periods will be a useful feature set item for the camera(s) you use.
If I were tasked with this type of data capture, I'd treat it like Solar Farm data capture.

Very few events. Makes no difference if there are days of lag between data generation + data analysis.

Because Solar Farming or Garden Farming, it's not like you can somehow effect the data captured.

I'd likely us a GoPro to sample 1/hour or 1/day, then every month transcode the footage + upload it to some provider like YouTube or Facebook.

In other words, for slow changing data, it's unlikely anyone will really sit for hours hoping for the change of height in a tomato plant.
There is no need to store your videos on your server. Unless you have enough money for hosting to make it rain.

Look into YouTube Live Streaming and OBS. You'll probably have to upgrade to a paid account on Youtube. Vimeo offers live streaming as well (There is a plugin called Vimeography that handles Vimeo behind a paywall, not sure if it has live streaming configurations). Then you can embed the video into your site.

This combo of YouTube/OBS is working well for Festivals, live streaming in Virtual Reality, Zoom seminars.

There's a learning curve for OBS, but in these times it's a good skill to pick up.

https://www.dacast.com/blog/how-to-broadcast-live-stream-using-ffmpeg provides one easy way to accomplish this running on OSX + Linux.

Careful about OSX/Macs at this point.

Newer M1 chips... are barely supported, so stick with per-2021 Intel hardware + you'll be fine.
Looks like hanging onto an old mac after upgrading is a good idea!!

Those new chips are due in the Spring.