Page 1 of 1

Live video feed?

Posted: Wednesday 24th April 2024 4:06am
by Got2BeFree
I've been away from Gambas for way too long and my search hasn't turned up anything of value.

Is it possible to view live video in Gambas, such as an rtsp feed? I'm currently using VLC to live view my security cameras but I have to either open multiple instances of VLC or change URL's to view each one. I would like to bring all feeds together into one app. I don't need to record, that's already taken care of.

I've loaded both gb.media and gb.media.form but only see a mediaview and that didn't seem to allow an URL for anything other than a video file stored in a directory. Maybe I've missed how it's done?

Re: Live video feed?

Posted: Monday 29th April 2024 9:30pm
by Got2BeFree
I'm guessing a live RTSP feed is not doable?

Re: Live video feed?

Posted: Tuesday 30th April 2024 1:02am
by BruceSteers
gb.media is basically a gstreamer interface so can do what gst can do.

I not the one who can answer though i have little experience with MediaPlayer and none with live feeds.

Others may be able to help though.

Re: Live video feed?

Posted: Tuesday 30th April 2024 12:28pm
by thatbruce
There is/was a farm project that played the usb camera video in live mode. I cant remember who wrote it or what it was called. If you could find it, it might provide some clues. I used it in a similar situation some years ago when I had a local idiot who kept stealing the wheely bins from the footpath for some unknown reason. It was quite good for that as he made a lot of noise at 3am so I was able to set the app going on bin night and when he woke me up I just hit "record" on the laptop beside the bed, rolled over, went back to sleep and reviewed the recording in the morning. I forwarded a couple of good ones to the local police and soon there were no more occurences. Hee hee.
Wish I could help more but I have had no more use for it since then.
b

Re: Live video feed?

Posted: Tuesday 30th April 2024 4:55pm
by Got2BeFree
Thanks, guys! That was just enough info to get me going in the right direction. I found an example in the farm that can play an RTSP stream and I'll base my project on that one. That project is in another language so it's going to take a bit to sort that out.

I have a neighbor who would "borrow" my water twice a year to top up her swimming pool. Twice a year my water usage for the month would double. I ended up putting on a faucet lock on that side of the house and the water usage spikes stopped. That resulted in her calling code enforcement on her neighbors just for harassment. Her husband is cool and didn't know she was calling code enforcement on everyone. Once he found out, it stopped. I think she's mentally unstable so I avoid her as much as possible.

Re: Live video feed?

Posted: Wednesday 1st May 2024 6:47pm
by vuott
Got2BeFree wrote: Tuesday 30th April 2024 4:55pm I found an example in the farm that can play an RTSP stream
Well, what's the name of this program that you found ?

Re: Live video feed?

Posted: Wednesday 1st May 2024 9:40pm
by Got2BeFree
vuott wrote: Wednesday 1st May 2024 6:47pm
Got2BeFree wrote: Tuesday 30th April 2024 4:55pm I found an example in the farm that can play an RTSP stream
Well, what's the name of this program that you found ?
IPTV by WebOss.

Once I saw how it's done, I realized just how simple it is. Just need a MediaView and feed it an RTSP url like this:

Code: Select all

MediaView1.Stop
MediaView1.URL = "rtsp://192.168.xxx.xxx:554/h264?username=yourUserName&password=somePassword"
MediaView1.Play
(The above rtsp line is for my brand of camera. May work for other brands.)

My project is showing 4 feeds and is able to expand to more feeds very easily. Currently the url's are hard coded in, but I'll eventually have the rtsp url's reside in a sqlite db to make it easier to add and delete cameras. It's been about 4 years since my last project and I'm realizing just how much I've forgotten in that time. :(