Overlay Tempest Data on Livestream

Hello everyone,

My goal is to overlay live data recorded from my tempest on to a livestream of a weather cam. I have an IP camera whose feed I’ll be importing into a PC on the same network as the weather station, and using a basic software like OBS to stream it to youtube (an end goal is a self-built website with very basic html that shows weather stats and has the video feed embedded)

I wanted to know how exactly I can extract data from the tempest to do this.

I have done prior research and have read other forum posts but I’m unsure if the methods provided in those threads can apply to my situation. I hear terms being thrown around like WeeWx, weather display, weather bridge (and how tempest isn’t compatible?), etc. but I’m not all to sure what I need for this use-case.

I have no experience with Raspberry Pi, no previous weather stations, can’t code my own scripts. I have a strong background in computers nonetheless so if you suggest a specific software, hardware, api, or something of the sort and tell me the gist of what to accomplish, I can attempt to figure it out through further research and probably the help of ChatGPT.

I appreciate your time in advance and hope to discuss this with you all soon!

Hi @harjassingh02 and welcome,
My approach with similar goals has been to learn python and access the data using the API.
Many people have discussed their methods and problems that they encountered within our developer category of this forum.

Many have shared their projects on github for anyone to use and usually posted links to their github from this forum.

If you think about the purpose of your project I wonder what your goal is. I mean are there people who need the information that you wish to provide?
I guess you know that everyone can access your weather from a browser, and you can publish your live camera. And both can be provided from a web site such as using weewx.
My suggestion is to study if weewx will meet your needs.

In my situation I decided I wanted a different display to weewx or weatherflow so I created my own using a raspberry pi and python. There are lots of learning resources available and lots of examples and solutions already built which can be combined to make a raspberry pi do amazing displays and even be your web server.

I do recall a person on this forum has 2 live cameras with weather data displayed on them at a beach. If you can find his post then he describes what device he uses. I may find it for you later.
edit: This is the site I was thinking about, which now that I checked it does not overlay the weather onto the video. It does however demonstrate a very nice way to include something like what you are thinking.
http://pacificaview.net/livecam/sharp_triptych_nowx.php
Cheers Ian :slight_smile:

Overlaying data on a static image is very easy to do with ImageMagick but I haven’t done so with a video (although I seem to recall it’s possible)

What I do is write a json file out via weewx and then process that data…

# https://stackoverflow.com/questions/40880237/how-to-add-bottom-box-and-text-to-a-picture-in-linux

MSG=`cat /mnt/ramdisk/current.html`
convert /mnt/ramdisk/motion/image.jpg -alpha on                                    \
  \( +clone -scale x5% -threshold 101% -channel A -fx "0.5" \) \
  -gravity north -composite                                     \
  -fill white -pointsize 18 -annotate 0,0 "${MSG}" /mnt/ramdisk/motion/image-overlaid.jpg

And the input file looks like the header in the image.

Screenshot 2023-07-31 at 2.08.49 PM

Hello Ian,

I saw your reply to many others as I have been reading through other posts and am very happy to see your reply and thank you for your time. The goal of my project is for people in my community to click 1 simple link and be directed to a livestream (on youtube or on my own proprietary website) and see a 24/7 live feed of my IP camera. The live feed that they view ideally would have a small overlay in the corner that displays the live weather statistics from my tempest.

Whichever way I can get that done, is great. It seems as though WeeWx is the way and I’m going to try to explore it some more. I would love to learn some python and bring about my own customization but its hard for me to just go out and do something without a fixed goal that I am kind of aiming to recreate.

Focusing on the link you shared (thank you for taking the time to find that), it looks great! I’d honestly even love to have a website just like that and put the weather information straight onto the site, meaning it doesn’t HAVE to be overlayed into the video.

Based off of your suggestion, I will try to read up on WeeWx and go from there.

Thanks a lot!

1 Like

Very cool! It seems as though weewx is the way to go so I will definitely try to learn how to use it and set it up.

Hi @harjassingh02
While my goal would be to display video I would want it in 4k resolution to see who is paragliding. With my several cameras that is a lot of bandwidth. So I have chosen to display 4k resolution stills that refresh every minute. And provide time lapse for the previous couple of hours and sun rise and set. I have several different view options from their web pages which I can have as full screen display on my monitor, or view from any browser.
My weather graphs are too cluttered for normal people to view but they can use different views if they want. Weewx is ideal for most people.
But my main comment is to consider displaying good quality still photos from your future weewx display and let your video live display be your next step once you get your weewx looking good.
My suggestion is to consider purchasing a raspberry pi to run it. Personally I found running a pc 24h per day to run my weather station wasted lots of electricity. Now instead I use lots of raspberry pis which I am happy to leave running.
My cameras and weather stations require continuous maintenance and modifications so expect errors amongst these web pages. And this web site runs from a free server which allows me 200Mb of space, which restricts how many time lapse videos I can display.
http://home.exetel.com.au/flyfree/window/dudley.html
Cheers Ian :slight_smile:

Thanks a lot for the reply once again Ian. I’m looking to get a Raspberry Pi at this point….Do you have suggestions of a good one to invest in/the minimum specs I’d need in one? I was looking online and am unsure of the cheapest I can buy to meet my needs

There are many options and everyone will have their opinion. And it depends what more you may like to do with it once you begin. My suggestion is to buy a raspberry pi 4 and it could be the cheapest 1Gb RAM version, or larger if you wish to do more with it but you do not need more RAM than 1GB.

I also like the pi400 but it does not have a slot to plug the ribbon cable in for a camera. My guess is that once you begin playing with it that you might like to plug a camera directly into it to include into your weather pages, which is what I do. You can do that on a pi 4 but not the pi 400.
You might buy a kit which includes extras like the power supply which is important to use a good power supply. A low quality power supply can have insufficient voltage during power up so make sure you use a good one that can supply sufficient power.
I would not buy a plastic case because overheating can be an issue in my hot climate. I would buy an aluminium case with the option to run the fans but you should not need the fans unless you start doing more with it. Fans can make a noise and malfunction so aluminium cases can conduct the heat away from the processor without the need for a fan. I like these design either with the fan or similar without the fan:

A year or more ago when I experimented with the new 64bit operating system on a pi zero I ran into problems so I still only run the 32 bit operating system on all my pies.
I prefer a wired mouse and keyboard because there is less to fail. They do not need to be special for the pi so any keyboard and mouse with a usb plug might work.
All your other help should be available online.

http://www.weewx.com/docs/latest/usersguide.htm
Have fun
cheers Ian :slight_smile:

1 Like

Thanks again Ian. The camera that I have is an IP security camera. The feed is typically accessed remotely using many different possible protocols like RTSP/RTMP/ONVIF. I think my biggest roadblock would to somehow integrate this camera feed into my Raspberry Pi, combine it with my live weather data, and some how host a stream that can be embedded into a website. Im unsure if Raspberry Pi’s have that video rendering power?

Nonetheless, thank you so much and I am going to look into all of these further

I might add that pi4 seem to be becoming available again in the US, so hopefully the ArsTechnica interview article today is true. I’d highly recommend a FLIRC case to remove the need for any fan (or sound). FWIW, I run the ‘lite’ raspbian on all of my pi and none have a keyboard/mouse/monitor attached. They’re just little servers for me.

2 Likes

If you are certain that you wish to overlay the weather onto your stream then you could follow some of the links returned from this search.
https://www.google.com/search?q=ffmpg+insert+image+onto+video+live+stream&rlz=1C5CHFA_enAU973AU974&oq=ffmpg+insert+image+onto+video+live+stream&aqs=chrome..69i57j33i10i160.18956j0j7&sourceid=chrome&ie=UTF-8
And from my experience it is possible to create an image with whatever you wish written into the image using PIL

cheers Ian:-)

If you are using obs then you could just overlay a webpage on one corner and make it transparent - it works quite well and would fit in with your current system…

Just a thought,

Andy

3 Likes

This topic was automatically closed 540 days after the last reply. New replies are no longer allowed.