Streaming video from uv4l to Blynk using nodered

Correct, it is just the App picking up what the phone can access via it’s network connection.

Yes, there will be variable lag… Blynk is not a dedicated video viewing App, so much other stuff happening in background.

I only use the cloud server, but the lag should be the same as the data isn’t going via the server.
My lag was around 1 second, but I’d guess it depends on your network, device RSSI, video resolution, RPI processor speed and available memory, Android/iOS device speed/RSSI, and whether you made a sacrifice to the Blynk gods today :zap:

Pete.

@Gunner, @PeteKnight, no good for my application. Is there at least a way to get a video/screen capture on Blynk or another way to stream video on global Internet?

I’m not really clear what you’re asking here.

Yes, there are lots of ways to stream video to the internet. I’ve never tried any, as it’s not a requirement that I’ve ever had. Products like iSpy have all sorts of bells and whistles, but I’d suspect that something which creates an RTSP video steam and a viewer on the other end - with the appropriate ports opened in any firewall you may encounter along the way - should do it. Obviously this will be outside of Blynk - or at best in a Blynk Webpage Button widget.

I’m not sure that you’ll eliminate lag that way though. If anything, once you start pushing data across the internet speeds are likely to slow dramatically compared to viewing the same data across your home network.

Maybe if you explain a bit more about what it is you’re trying to achieve we might come up with an ‘outside of the box’ idea.

Pete.

@PeteKnight, thanks. I will take a snapshot from camera and will try to send it as a picture. My goal is to be able to access remotely from anywhere in the world things in my garden (monitoring and control) and the short real time video would be nice, but for now I will stay with a snapshot (hopefully it will work).
Cheers
Jan

Look at using the Image Widget as referenced in this recent topic.

I’m struggling as well for now. I am able to take a snapshot from Raspicam and have a file snapshot.jpeg. How to send it to Blynk server?

Okay, I think I was a bit confused by the fact that I said:

and you replied:

I thought you were looking for zero lag, but I think now you’re saying that it’s the implied fact that this only works when your RPI and phone are attached to the same network that won’t work for you.
In that case, have you tried port forwarding and a DDNS service?

You’d probably need to create you mjpeg stream on a different port to 8080 - maybe 8081 - then sert up a rule in your router where request for data on port 8081 are re-directed to http://192.168.0.20:8081

Pointing your video widget to [your public IP address]:8081/stream/video.mjpeg should then work when you use 3G data on your phone rather than connecting to your Wi-Fi network.
If it does, then go ahead and set-up a DDNS service such as NoIP.com (assuming you don’t have a static public IP address) and change your video widget so you replace your public IP with the DDNS IP (and set-up an update client to keep the DDNS service updated when your public IP changes).

Pete.

@PeteKnight, thanks for your comprehensive explanation. Currently I’m investigating different possible option. After spending some time, I realized that sending a snapshot with Blynk doesn’t seem to be easy. I can take a snapshot on my RPi, but have no idea how to send it to Blynk server. Has anyone done it?

The image widget is very new and was in beta for a while. Some forum users have been pushing it to the limites, with mixed success, and there have been some improvements to the functionality along the way.

The widget is primarily used for ‘doing what it says on the tin’ and displaying images. These might be a series of animations that show the state of a garage door being raised or lowered, or a simple on/off indicator.

You can programmatically specify the image url and keep updating this, so you can display differently named snapshot images to show the latest image from your series of snapshots.

There are a couple of threads about the experimentation that users have been doing, but be aware that the widget functionality changed several times during these discussions, based on issues identified and ideas that were suggested.

Personally, I don’t think it’s the best soloutuon for your particular situation, but if you search out the image widget threads and read them, then think it sounds like something you’d like to try then by all means give it a go.

Bear in mind that if you’re using the cloud servers then the server needs to be able to ‘see’ the image, so it will have to be in a public ally accessible location.

Pete.

@PeteKnight, can the image url be it’s location on RPi filesystem or should it be a network resource (html server)?

It can be. I use this program on my RPi to “serve” the images, which are stored in their own folder in my Blynk folder on my RPi, just to keep it all together for backup purposes.

https://docs.python.org/2/library/simplehttpserver.html

If you want it accessible outside of your network then that is simple port forwarding in your router.

@Gunner, thanks. I did it with nodered following the instruction from here https://cookbook.nodered.org/http/serve-a-local-file .I see the snapshot in Blynk, but it doesn’t refresh. When I make another snapshot the image URL shows it, but the one in Blynk stays not updated, even if I stop and restart Blynk on my iPhone.

Even if log out or terminate blynk it remembers the old image, even if I delete it and enter URL again. How to fix it?

Reread that last topic I referenced, that user alternated between two image placeholders.

@Gunner, sorry i didn’t get it. Can you repeat, please?

OK…

:stuck_out_tongue_winking_eye:

AKA read that link I showed at around post #10 of this topic.

I don’t know if that would be an option or solution for you or not… depends on what you want accomplish and what you try I guess.

@Gunner, do you mean Image Gallery ?
I don’t see the solution there

Was just going off your comment…

If it will not be a solution for you then no problem for me :slight_smile:

@Gunner, trying to change the Properties, but nothing works, still not refreshing the image and not changing any properties like scaling, rotating, etc. :sob: