Going forward I would like to improve the OpenCV tracking system, as CV and AI has come along way in the time since I first wrote it.
Also I would like to improve the playlist manager web app such that a schedule can be printed out to give residents some idea of what is on at what time.
In the final revision to our system I relocated all the equipment to our comms room and replaced the 4 channel modulator with individual modulators per channel. As we had one of the cards in the 4 channel mod go bad and take years to get sent back to china for repairs due to covid, its also cheaper to use individual mods rather than a 4 in 1 and if one channel goes bad you can replace just that channel rather than the whole unit. We got a great deal on 8 used single channel HD modulators, so switched over to them. With the extra modulators we got to add 3 extra channels, and for now, connect them to 3 cable tv boxes (foxtel) set on resident chosen channels, similar to how hotels operate. The system is much easier to work on now and runs cooler with less dust, as the comms room is climate controlled cool, compared with the dusty cupboard in the reception. One modulator and DVD player is still connected in the reception cupboard.
satisfaction: on the left white wall my system, on the right wall the original MATV headend, which takes 1 TV antenna and distributes its signal to all TV's the rack where every thing used to be installed in the reception, but now just one modulator and dvd player
So after some time it was realised it would be good to put some extra content on the "Live Events" channel when there were no live events being streamed (which is most of the time).
So i had to make a playlist system to play the media we wanted at set times, as well as the lounge camera stream when a scheduled event was there.
Only problem was that now the lounge stream camera only came on at set times (rather than being on 24/7) we had to have a way to manually activate that stream playback for 1-3 hours when needed and interrupt any media playback that might be happening.
I made it so you can pause the schedule for a chosen time if you want to show a youtube video, as you can also remote desktop into the computer with anydesk and what ever content you open people will see, such as youtube website.
So I made a web interface for remote controlling this: (note while we do have provision in the copyright legislation for using media transcoded from dvds we own for accessibility reasons, i have blurred to avoid confusion)
So covid happened, and it really impacted us, not so much the disease itself but all the precautions and increased workload which we are still dealing with today in 2023.
For a long time we could not hold our weekly happy hour event, so I made a way to use off the shelf tablet and rtsp streaming app to stream an entertainer from a room other than the main lounge to all our residents rooms who where now all stuck in their rooms !
I wrote a python script to via cron check the ip of the tablet for an active stream, and play it via vlc. and when not active close vlc.
This is still a useful feature for if we have events not in the main lounge.
For the first couple of years we used the existing 2 channel standard definition rf modulator, one channel for live stream and one channel for dvd playback.
Then we got a good deal on a professional used 4 channel HD modulator, so we could now see the full quality of our camera footage as well as add 2 more channels !
Our (now retired) 4 channel modulatorWhere the 4 channel modulator and all equipment used to be housed. This is where DVDs are played back from.examples of the 3x tiny pc's we bought to run/output each channel (apart from dvd)
my simple web based playlist editor to manage what is played on the 2 new channels: "TV Shows & Relaxation"
The next stage was to develop the software and hardware solution required to automate the use of the cameras PAN/TILT & 20x Optical ZOOM features via its IP control API/Interface
It was decided to use a dedicated second camera that could always see the full scene, rather than running CV/Image recognition on the main camera, because if the main camera was zoomed in on a performer it would not see some action outside of its vision to zoom out to capture.
I set up a raspberry pi 3 and camera running openCV software and a simple python change/movement detect loop to watch a chosen section of the pi camera (excluding audience at bottom of screen) . This then calculated a target and zoom level to command the PTZ camera to focus on.
There was also a time sequence to for example every 5 minutes zoom right at and do a slow pan left and right to 'look around' before resuming focus on the main action.
The Pi had a calibrated conversion table to convert its pixel coordinates into corresponding tracking commands and zoom levels for the PTZ camera.
Ive since switched the pi and camera combo for a ip camera, and made it that the opencv script is run by the "Live Streams" computer that receives the PTZ stream.
test of pi and pi cameravnc into pi to monitor itprev image zoomed in, showing bottom right screen of vision from opencv camera and movement detect, vision from ptz camera top left
after successful test, pi put in roof, and camera mounted on stand
After the successful proof of concept streams, and manually broadcasting several key events for the residents it was approved to fund and permanently disconnect one of the (less used) DVD players and plug a spare computer into this modulator input permanently and have it just constantly play a live stream from a new PTZ camera and mic mounted on the roof in the lounge room.
Testing the newly purchase HD PTZ camera, Microphone and PreampThe camera only has RJ45 network, so an old router running DD-WRT acted as a wifi bridge for the camera. The microphone also required a pre-amp with phantom power to convert the audio into 3.5mm jack line level for the camera.
The microphone was quickly swapped for a long range shotgun mic. Pre-Amp and Router stored in roof cavity, accessed by added door.
As a proof of concept and by spending as least amount of money as possible, I lugged my home computer, DSLR, and microphone to one of our weekly work performances. The computer ran CasparCG playout software, and had a decklink HDMI capture card, for video input from the camera. This computer streamed the video via UDP over the facility wifi to another office computer that had a cheap ATI graphics card added to it to give S-Video output which fed into the existing SD modulator instead one of the DVD players, and from there into the buildings tv network and every TV.
LAN party style
CasparCG, very neat but overkill The output / end result, featuring our Christmas party event.