Thank God youtube suggested me a useful channel, this is getting harder every day. I am impressed with the quality(content) of your videos. And what about your Node-red library, if one needs examples and explanations to really learn; automation, node-red and JS, just follow him. Thank you for making your knowledge and time available, I wish you success and health.
The next step is what I was trying, google vision. It has facial and object recognition... So far I've got it giving back results, next is to open the jpg, and draw the rectangle returned, and write the objects detected as text vertically or something like that. perhaps text to speech for faces recognized. So your door bell could trigger saying who is at the front door, or what, if no faces are detected.
Great job and well explained.. for the self refreshing image, probably adding a cache burst to the image source will do the trick (like src="/grab.jpg?t=, again epoch can be used, so that the source will be different each time and browser will reload it)
Very nice and detailed video. One step up would be motion detection, if motion is detected then trigger a frame grab, email etc. essentially instead of having a refresh graphic element or the time stamp to start the flow, some type of motion input.
I don't have a motion detector, but you can replace any of the inject with a line from the motion detector. My flow accepts any message, the content is not important.
Dear Csongor Varga, nice instruction. Would have liked to import the flow w/o databases etc. but failed. Is there an hint how to import only the basics w/o monitoring / DBs... THX in advance M
Dear Csongor Varga, Amazing video. Today I managed to get it working in my environment. The only thing that is not working for me are the reports of all the images/videos created. Somehow it makes sense, because only modification I made compared to your initial configuration, is that I am using remote SQL server instead of local SQLLite. I am now a bit confused, becaude I can not find the configuration of report (table created) from the records in the databases. Where (in which node) you are connecting to the database to get list of all files and filter them. Thank you in advance!
Uh 🤣 My mistake....I didn't scroll down. Today I realized there are additional nodes bellow, which are triggering report. I modified them to my SQL server and they are working. Thank you very much!
Hi - Another great video - I don't know if you found the issue with the Tweet yet - but just in case the answer is simple your Read Image node is set to output as a single UTF string and it needs to be a single Buffer object to satisfy Twitter. Change that and it works fine
Also re the issue you had Refresh Image not updating until you did a page refresh. I found that by replacing grab.jpg with a random name generated by using the timestamp I could get the image to update when you hit refresh. By putting this randomly named file in a subfolder I could run rm * on the older while the image collection was taking place thus preventing files building up. You do need to ensure the static image is not updated till the image collection was complete but otherwise works without a problem
Thanks, I suspected that the browser is causing this. I am guessing it assumes that the image is still the same (since the name is the same) and only using the cached image on the screen instead of downloading it every time from the server. Nice catch!
@@csongorvarga i am very new to this tech and currently searching for ways for ip camera to capture frames of faces for my research. I only found this tutorial wherein it uses PIR sensor for capturing. www.instructables.com/id/Face-Detection-Security-System-Using-Pi-Node-red-I/
One last note, do not use that ispy camera software. I had a data breach immediately after installing it. Someone was accessing my camera remotely. I had to reformat a windows machine after I realized it had some sort of malware payload.
Hello, Very Nice done, but since the Raspberry pi with microSD Card is not very suitable for storing lots of data and have many writing actions i was wondering if it was possible to store the images/video on NAS(Synology) accessing it via NFS. The database can also be stored on the NAS if you install MariaDB . Regards Dirk
You are right. I also have a NAS, but I have not set it up in my raspberry yet. Google "mount synology nas raspberry pi" and you find some resources how to mount a NFS partition in raspberry pi. Once you have done this the Synology share will appear in the RPi filesystem and you can just save the images there. If this does not work you can always upload the images via FTP using another exec node.
What do you mean? Lately I moved away from this sketch. I prefer to use Reolink cameras nowadays and those all have still image URLs. That makes getting a single clip much easier. And I can email, Telegram message that. I do have an integrating Reolink cameras to Node-Red video where I go through some scenarios.
@@csongorvarga I Just attached my first ESp32Cam to node red. I get the Picture with the IP.capture. The Picture is saved in a Buffer witch I can attach to my Telegram Message and send it. For My Hardware it would be nice to rotate te Picture 90° but the Camera do not support this. So Im loking for away to rotate the picture before i send it to my telegram bot.
This is interesting, when I did this I was not able to install ffmpeg only avconv. But most of the examples I found was for ffmpeg, like this: stackoverflow.com/questions/34904548/how-to-grab-a-single-image-from-rtsp-stream-using-ffmpeg. Give it a try.
@@csongorvargathat was also where i ended and got it working with this in the grab a frame node ffmpeg -y -i rtsp://user:password@ip:554/11 -frames 1 -f image2 every thing else as your code but you have to have ffmpeg installed
Hello, very nice and innovative tutorial and thanks a lot for sharing. Like to ask how to make correct time zone, because from the report log, the time shown 8 hours behind my country time? Please help to solve this for me ya...
@@csongorvarga yes the report timestamp is not match my file time. My video or jpg file date is correct but the display report UI timestamp not correct as shown below time-lapse 14:03:09 but my actual time is 22:07:03 (file jpg time OK) time-lapse 2019-07-03 14:03:09 frame_20190703-220703.jpg
OK, so I checked it again, and I am a bit puzzled to be honest. I was a bit lazy here on the database side. I created the table with two date fields. One (epoch) holds the Linux date as a number that I use when querying the data. When the date is written onto the screen, I am actually using the other fields (timestamp), which is auto populated by sqlite with the current date and time when the record was created (which will be a few seconds off to when the picture was taken). So I am not specifying any timezone anywhere. I am assuming sqlite should be picking up the same timezone and the linux system. When I created the table, I just specified "current date and time" and when printing the time I am only specifying the field name in Node Red nothing else. I have not come across any timezone settings in Node Red either. Sorry, I have no clue why it is different for you.
From you video, I observe over 33:13 / 39:57, your "Timestamp" column's time differ by 2 hours behind time zone comparing with your "File" column's time. Hope you get what I meant... ya.. :) Whereby my Timestamp's time compare to File's time is 8 hours behind. I believe there must be some area of correction to match both Timestamp and File time correctly else it is quite confusing when try to view back the historical time. I wish I know how to correct it but I do not manage to do so... Maybe you can solve this issue easily... hehe...
Hello Csongor, that is great, I'm trying to adapt your flow to my ipcamera and somehow it's working, I wonder if could be some way to start capturing video from node red at some node trigger and stop with another trigger instead of recording a fixed amount of time, do you have some clue how can I do it using your flow? I tried to find your discussion on node-red forum but was not able to find it about this example. Thanks in advnace
Just to make it clear the target was to start recording when door it's opened and stop as soon as door it's closed or after a max amount of time (whatever comes first) and then save this file as you were doing so I can handle it afterward to forward the video to one email or telegram, now the challenge is how to be able to get a start & stop of the recording from node red and keep saving the file with same kind of formatting you were doing.
Yeah, that is a good question. Probably something like this: 1) change the avconv command, so it does not limit the length of the video - or something ridiculously long, like 1 hour. 2) Change the exec to spawn mode, so the message will come out of the exec node as soon as capture starts. And to stop the capture you can use another exec node which kills the avconv process. Brutal. There are a few possible issues with this option: by killing the avconv process the mp4 file may be corrupt and unplayable. I have no idea how to kill a process and most importantly get the process id. But that is a basic Linux question and somebody might have an idea.
As during the process this is making a conversion will not work killing the process as with not create the output file, I wonder is is any chance to start & stop the avconv by commmands, this will be the clue, I will investigate a bit but could be something very nice
This is great! I've been looking for a way to do just this. I have tried to import your flow but I get errors in the debug logs "failed to open /home/pi/sqlite/nodered". Can you please tell us what prerequisites are required in order to import your flow? Thanks!
If there is the only error that means you are missing the SQL database. I am assuming you have SQLite node installed otherwise you get different errors. For SQLite I assume you have installed e.g. phpLiteAdmin. That is the same database administration tool you have seen in my video. In that you had/have to create a new database and a new table. Once that is done, you can change the SQLite nodes to point to your database (which is a file stored in the filesystem).
Hi and thanks for the reply. Your assumptions are correct that I have the SQLite node installed and phpLiteAdmin. I even created the nvr file you showed in this video but I have no idea what directory it lives in. How would I find that info? Also, which video were you referring to? There are several that have SQLite in the title. :-)
This is the video, I was referring to (ruclips.net/video/ccKspiI8FRw/видео.html), but I noticed that I have not recorded these details, and to be honest I also forgot what I did 6 months ago. But when you go into the phpLiteAdmin and select the database you can see the "Path to database" on the Structure tab. That is what you need to put into the node. Also have a look at Pete's blog who mentions setting up the correct access for the DB files: tech.scargill.net/sqlite-on-the-pi/. I hope this helps.
Hello I used this video to create a project for taking pictures every hour: working ok. Now I am using another sd card with raspbian last version and node-red v1.2.9. Old sd card uses node-red v0.20.5. The problem I have now is dashboard Chart node does not accept data from data base, message is "Bad data inject". Please advise
Uhh, this is a very old flow. I think there is a checkbox on the properies page of the charts saying "use depreciated format" or something similar. Please give it a go.
@@csongorvarga I have a tab Reporting, maybe from another of your videos. I get data (temperature, humidity,etc), from database and show them in chart. I imported again but still have Bad Data Inject
I copy data object from the flow that is working and copied to a inject node and new chart node (in the new flow): same Bad Data Inject. But if I do the inverse: take data from the new flow to the old flow, it works
Hi do you know if it is possible to capture ip-camera frames in node-red and do obeject detection on them with yolo8 or tensorflow? Or another option that works very good and reliable. Thx.
GGGreat job! I was wondering how long does it generally take to capture a image from RSTP stream? I want to realize that capturing two images per second and then sending them out immediately.
HI,sir your node project was so amazing. I hope you can allow us to used your flows to our thesis project, it would be a big help for us.. I have a question sir, can we used any kind of camera for this flow, thus raspberry pi camera can be used in image and video capturing?
Hi, no problem. You can use this flow for your work. I never worked with a PI camera. I am sure that can be used as well. You just need to find a program (some phyton sample or shell) and replace the command in the "Grab a frame" and "Capture video" exec nodes. So instead of calling avconv you call your script to generate a jpg or mp4 file on the pi. Rest of the logic can be used unchanged.
OK sir I get your point.. Thank you very much, sir also i have a question is it possible or way to automate the capture of image and videos depends on the time been set by the user?
Thank you very much for your time sir. I hope you can do more work in node red with different sensors specially dht22..Your video tutorial about node red help us beginner.. =D
Hi sir, its me again I try to used mya pi camera and replace to exec command but it seem that the datbase didnt recognize my python script in image and video capturing. I hope you can help me
Csongor, are you able to tell me what the command is for me to automate a task in Windows to capture the still image from the Reolink Windows client at timed intervals and store it on my local drive? I know it's not what you are doing in this video but if you can assist, I would appreciate it!
I have no idea. Maybe you can download some sort of macro tools and record a macro of pressing the snapshot button in the Reolink client app. That will save the image for you. And you need the macro tool to run this macro whenever you want.
Any thoughts on how to get this working with FFMPEG? What I tried didn't work (error 127): ffmpeg -rtsp_transport tcp -i "rtsp://user:password@IP:port/live1.264" -y -f image2 grab.jpg
Please check in the command line, you will get more error messages there than in Node-Red. Also you can try the examples in this post: stackoverflow.com/questions/25360470/ffmpeg-capture-current-frame-and-overwrite-the-image-output-file
Was wondering if I could plug a USB webcam into my PI3 and then use a similar setup. Is there anything native to node-red that will allow to simply read the camera info from the pi?
This works quite well for me, although I'm using ffmpeg directly, instead of avconv. One problem, I have mine writing to the file ~/.node-red/public/image.jpg, however when I run it again, it doesn't overwrite the file. If I delete the file manually, it will work. Any idea?
I must have been reading a different forum thread, as I was told that ffmpeg is called avconv in Linux. Regardless, it should work for both. Check ffmpeg parameters, I am pretty sure there is an overwrite option.
Folyamatos webcam stream-re miért kell neked megoldás. Ha a webcam tudja a RTSP-t akkor azt VLC-ben minden gond nélkül nézheted. Nem kell hozzá semmi, csak nyisd ki a RTSP portot a routeren. Szenzoradatot, változókat kiíratni használhatsz Node-Red-et, gondolom ezt az utóbbi kérdés nem pont erre a specifikus videóra vonatkozott.
még nagyon új vagyok ebben a webes dolgokban szóval ... semmit se értek hozzá kb. a Node-Red-hez se. De egy robotot szerenék építeni ahogy a kommentemből sejthető volt. Ezt be tudom implementálni így ahogy leírtad egy képernyőre? tehát hogy Node-red meg a vlc pluginnel?
Szerintem meg. Viszont akkor már értem hogy miért Webcam-et írtál és nem IP Cam-et. Szóval arra valamit kell keresned, egy Webcam-ek általában nem csinálnak RTSP stream-et. De egy webcam-et szerintem még egyszerűbb is integrálni, de valami plugint kell keresni hozzá.
when checking the history of the files the timestamp column ( as formated date) in my case is showing always 2 hours less than actual, any idea how can i correct this?
I just uncommented the default line and changes the user and password: "httpNodeAuth: {user:"xxx",pass:"yyy"}," This is all in that line between the double quotes. Did you check your log? Was there any error message on startup? Also note that if you enter your pass on the admin page and open the dashboard in a second tab in Chrome, it will not ask for the password again. So check on a new computer or phone opening the dashboard first.
Where are you getting this error? Does your rstp link work? Can you watch the feed if you put the URL into VLC? Add a debug node so you see the entire command line that gets passed to the exec node. And execute the same command on your PI and see what happens.
@@antonioascione6589 As I just said about. Put in a debug node to see the full command that is passed to the Exec node and test that in a command line in the PI. I have no idea what error 127 is. Maybe there is something wrong with the path, or avconv is not properly installed.
this would be much hilarious if we can find a way to let a user configure his smtp credentials from the UI adress, and lock the diagram interface,what do you think ?
There was a thread on Node Red Group how to make changes UI parameters during runtime (which are normally not editable from the input message). It was not a straight forward process, but somebody mentioned a way to do it.
I am not sure. I know VLC has an ActiveX plugin to view RTSP streams, but that only works in IE. I never done this before and this solution is not designed for that.
I did not use SQL to store binary data, but probably there is a blob type field which accept larger binary data. Otherwise you can base64 encode it and store it in a large text field.
i installed that on a docker image and its already running avconv and opencv, i dont have that runnning as a functional thing but its here if someone want to use it and improve it, should be able to get the rstp images and passtrough th opencv algorithm. hub.docker.com/r/jcsandoval/noderedcv
Another great informative video from you! Maybe it helps you. I send this command to capture single frame of ip camera. ffmpeg -rtsp_transport tcp -i rtsp://192.168.1.89/unicast -f image2 -vframes 1 -y /home/pi/node-red-static/grab.jpg it always works. i forced ffmpeg to use tcp protocol to grab an image. maybe you can do the same with avconv?
Thanks, interesting idea. So forcing to use TCP makes is quicker, or more reliable? To be honest I am not using this flow a lot. I set up a timelapse flow to take a picture every day 12:00. I just reviewed the images, there is a bad frame every 5th-6th days otherwise working great.
Thank God youtube suggested me a useful channel, this is getting harder every day.
I am impressed with the quality(content) of your videos.
And what about your Node-red library, if one needs examples and explanations to really learn; automation, node-red and JS, just follow him.
Thank you for making your knowledge and time available, I wish you success and health.
Thanks a lot for your comments. I am glad you find these useful.
Nice, very clear explained.
You have also used some handy tricks that I can use in other flows.
The next step is what I was trying, google vision. It has facial and object recognition... So far I've got it giving back results, next is to open the jpg, and draw the rectangle returned, and write the objects detected as text vertically or something like that. perhaps text to speech for faces recognized. So your door bell could trigger saying who is at the front door, or what, if no faces are detected.
Great job and well explained.. for the self refreshing image, probably adding a cache burst to the image source will do the trick (like src="/grab.jpg?t=, again epoch can be used, so that the source will be different each time and browser will reload it)
Very nice and detailed video. One step up would be motion detection, if motion is detected then trigger a frame grab, email etc. essentially instead of having a refresh graphic element or the time stamp to start the flow, some type of motion input.
I don't have a motion detector, but you can replace any of the inject with a line from the motion detector. My flow accepts any message, the content is not important.
Dear Csongor Varga, nice instruction. Would have liked to import the flow w/o databases etc. but failed. Is there an hint how to import only the basics w/o monitoring / DBs... THX in advance M
If you don't need the db, those nodes will probably fail. You can just delete those and the rest of the nodes behind them.
Dear Csongor Varga, Amazing video. Today I managed to get it working in my environment. The only thing that is not working for me are the reports of all the images/videos created. Somehow it makes sense, because only modification I made compared to your initial configuration, is that I am using remote SQL server instead of local SQLLite. I am now a bit confused, becaude I can not find the configuration of report (table created) from the records in the databases. Where (in which node) you are connecting to the database to get list of all files and filter them. Thank you in advance!
Uh 🤣 My mistake....I didn't scroll down. Today I realized there are additional nodes bellow, which are triggering report. I modified them to my SQL server and they are working. Thank you very much!
Hi - Another great video - I don't know if you found the issue with the Tweet yet - but just in case the answer is simple your Read Image node is set to output as a single UTF string and it needs to be a single Buffer object to satisfy Twitter. Change that and it works fine
Wow, thanks a lot! It is working for me too :)
Also re the issue you had Refresh Image not updating until you did a page refresh. I found that by replacing grab.jpg with a random name generated by using the timestamp I could get the image to update when you hit refresh. By putting this randomly named file in a subfolder I could run rm * on the older while the image collection was taking place thus preventing files building up. You do need to ensure the static image is not updated till the image collection was complete but otherwise works without a problem
Thanks, I suspected that the browser is causing this. I am guessing it assumes that the image is still the same (since the name is the same) and only using the cached image on the screen instead of downloading it every time from the server. Nice catch!
You could leave the same file name, just add cache buster as file.jpg?cb=
Hello, can you explain how can add cache buster as file?
This a very helpful video. Do you think this is possible for face detection? wherein it would capture frames when a face is detected? Thank you!
That is something I also want to do at some point in the future. I have seen examples of object detection, so face detection could also be possible.
@@csongorvarga i am very new to this tech and currently searching for ways for ip camera to capture frames of faces for my research. I only found this tutorial wherein it uses PIR sensor for capturing. www.instructables.com/id/Face-Detection-Security-System-Using-Pi-Node-red-I/
Hi Csongor, libav-tools is no longer available and has been replaced by ffmeg ??
One last note, do not use that ispy camera software. I had a data breach immediately after installing it. Someone was accessing my camera remotely. I had to reformat a windows machine after I realized it had some sort of malware payload.
Cool, good project. Thank a lot for example. :))
Hello,
Very Nice done, but since the Raspberry pi with microSD Card is not very suitable for storing lots of data and have many writing actions i was wondering if it was possible to store the images/video on NAS(Synology) accessing it via NFS. The database can also be stored on the NAS if you install MariaDB .
Regards
Dirk
You are right. I also have a NAS, but I have not set it up in my raspberry yet. Google "mount synology nas raspberry pi" and you find some resources how to mount a NFS partition in raspberry pi. Once you have done this the Synology share will appear in the RPi filesystem and you can just save the images there. If this does not work you can always upload the images via FTP using another exec node.
Super nice project.
Do you have any experience with roting an image after getting it?
What do you mean? Lately I moved away from this sketch. I prefer to use Reolink cameras nowadays and those all have still image URLs. That makes getting a single clip much easier. And I can email, Telegram message that. I do have an integrating Reolink cameras to Node-Red video where I go through some scenarios.
@@csongorvarga I Just attached my first ESp32Cam to node red. I get the Picture with the IP.capture. The Picture is saved in a Buffer witch I can attach to my Telegram Message and send it. For My Hardware it would be nice to rotate te Picture 90° but the Camera do not support this. So Im loking for away to rotate the picture before i send it to my telegram bot.
i can't install avconv as it seems to be outdated, can it be replaced with ffmpeg? if so how shall the command in the "grab a frame" node be
This is interesting, when I did this I was not able to install ffmpeg only avconv. But most of the examples I found was for ffmpeg, like this: stackoverflow.com/questions/34904548/how-to-grab-a-single-image-from-rtsp-stream-using-ffmpeg. Give it a try.
@@csongorvargathat was also where i ended and got it working with this in the grab a frame node ffmpeg -y -i rtsp://user:password@ip:554/11 -frames 1 -f image2 every thing else as your code but you have to have ffmpeg installed
@@LasseBlomgrenJrgensen Great, thanks for sharing.
@@LasseBlomgrenJrgensen can u share your node red flow ?.I am stuck! Thanks!
Hello, very nice and innovative tutorial and thanks a lot for sharing. Like to ask how to make correct time zone, because from the report log, the time shown 8 hours behind my country time? Please help to solve this for me ya...
Thanks. Report log? In this flow? I am using the linux system time. Is it possible that your linux is not in the correct timezone?
@@csongorvarga yes the report timestamp is not match my file time. My video or jpg file date is correct but the display report UI timestamp not correct as shown below time-lapse 14:03:09 but my actual time is 22:07:03 (file jpg time OK)
time-lapse 2019-07-03 14:03:09 frame_20190703-220703.jpg
OK, so I checked it again, and I am a bit puzzled to be honest. I was a bit lazy here on the database side. I created the table with two date fields. One (epoch) holds the Linux date as a number that I use when querying the data. When the date is written onto the screen, I am actually using the other fields (timestamp), which is auto populated by sqlite with the current date and time when the record was created (which will be a few seconds off to when the picture was taken). So I am not specifying any timezone anywhere. I am assuming sqlite should be picking up the same timezone and the linux system. When I created the table, I just specified "current date and time" and when printing the time I am only specifying the field name in Node Red nothing else. I have not come across any timezone settings in Node Red either. Sorry, I have no clue why it is different for you.
From you video, I observe over 33:13 / 39:57, your "Timestamp" column's time differ by 2 hours behind time zone comparing with your "File" column's time. Hope you get what I meant... ya.. :) Whereby my Timestamp's time compare to File's time is 8 hours behind. I believe there must be some area of correction to match both Timestamp and File time correctly else it is quite confusing when try to view back the historical time. I wish I know how to correct it but I do not manage to do so... Maybe you can solve this issue easily... hehe...
Hello Csongor, that is great, I'm trying to adapt your flow to my ipcamera and somehow it's working, I wonder if could be some way to start capturing video from node red at some node trigger and stop with another trigger instead of recording a fixed amount of time, do you have some clue how can I do it using your flow? I tried to find your discussion on node-red forum but was not able to find it about this example. Thanks in advnace
Just to make it clear the target was to start recording when door it's opened and stop as soon as door it's closed or after a max amount of time (whatever comes first) and then save this file as you were doing so I can handle it afterward to forward the video to one email or telegram, now the challenge is how to be able to get a start & stop of the recording from node red and keep saving the file with same kind of formatting you were doing.
Yeah, that is a good question. Probably something like this: 1) change the avconv command, so it does not limit the length of the video - or something ridiculously long, like 1 hour. 2) Change the exec to spawn mode, so the message will come out of the exec node as soon as capture starts. And to stop the capture you can use another exec node which kills the avconv process. Brutal. There are a few possible issues with this option: by killing the avconv process the mp4 file may be corrupt and unplayable. I have no idea how to kill a process and most importantly get the process id. But that is a basic Linux question and somebody might have an idea.
As during the process this is making a conversion will not work killing the process as with not create the output file, I wonder is is any chance to start & stop the avconv by commmands, this will be the clue, I will investigate a bit but could be something very nice
nice,
do you tell me or show your link that; how I can set or connect IP camera to show vdo on nodered?, thanks.
This is great! I've been looking for a way to do just this. I have tried to import your flow but I get errors in the debug logs "failed to open /home/pi/sqlite/nodered". Can you please tell us what prerequisites are required in order to import your flow?
Thanks!
If there is the only error that means you are missing the SQL database. I am assuming you have SQLite node installed otherwise you get different errors. For SQLite I assume you have installed e.g. phpLiteAdmin. That is the same database administration tool you have seen in my video. In that you had/have to create a new database and a new table. Once that is done, you can change the SQLite nodes to point to your database (which is a file stored in the filesystem).
Hi and thanks for the reply. Your assumptions are correct that I have the SQLite node installed and phpLiteAdmin. I even created the nvr file you showed in this video but I have no idea what directory it lives in. How would I find that info? Also, which video were you referring to? There are several that have SQLite in the title. :-)
This is the video, I was referring to (ruclips.net/video/ccKspiI8FRw/видео.html), but I noticed that I have not recorded these details, and to be honest I also forgot what I did 6 months ago. But when you go into the phpLiteAdmin and select the database you can see the "Path to database" on the Structure tab. That is what you need to put into the node. Also have a look at Pete's blog who mentions setting up the correct access for the DB files: tech.scargill.net/sqlite-on-the-pi/. I hope this helps.
It's working! Thanks for the help.
great video
Hello I used this video to create a project for taking pictures every hour: working ok. Now I am using another sd card with raspbian last version and node-red v1.2.9. Old sd card uses node-red v0.20.5. The problem I have now is dashboard Chart node does not accept data from data base, message is "Bad data inject". Please advise
Uhh, this is a very old flow. I think there is a checkbox on the properies page of the charts saying "use depreciated format" or something similar. Please give it a go.
@@csongorvarga New Chart node doesn't have that option
@@gleonlo I am getting confused. Where do you have a chart on this flow? I don't have any.
@@csongorvarga I have a tab Reporting, maybe from another of your videos. I get data (temperature, humidity,etc), from database and show them in chart. I imported again but still have Bad Data Inject
I copy data object from the flow that is working and copied to a inject node and new chart node (in the new flow): same Bad Data Inject. But if I do the inverse: take data from the new flow to the old flow, it works
Hi do you know if it is possible to capture ip-camera frames in node-red and do obeject detection on them with yolo8 or tensorflow? Or another option that works very good and reliable. Thx.
I have seen some object detection nodes, but never played around with them.
@@csongorvarga do you know how to get ip cam stream in node-red? thx
GGGreat job! I was wondering how long does it generally take to capture a image from RSTP stream? I want to realize that capturing two images per second and then sending them out immediately.
It is quite slow. Probably 2-3 seconds. It works for me, so I did not investigate if it could be made quicker.
Thanks. That's probably because of the RTSP.
please how did u add the authentification for the user interface
HI,sir your node project was so amazing. I hope you can allow us to used your flows to our thesis project, it would be a big help for us.. I have a question sir, can we used any kind of camera for this flow, thus raspberry pi camera can be used in image and video capturing?
Hi, no problem. You can use this flow for your work. I never worked with a PI camera. I am sure that can be used as well. You just need to find a program (some phyton sample or shell) and replace the command in the "Grab a frame" and "Capture video" exec nodes. So instead of calling avconv you call your script to generate a jpg or mp4 file on the pi. Rest of the logic can be used unchanged.
OK sir I get your point.. Thank you very much, sir also i have a question is it possible or way to automate the capture of image and videos depends on the time been set by the user?
Yes it is. There are many different trigger nodes. Take a look at bigtimer. That is quite versatile.
Thank you very much for your time sir. I hope you can do more work in node red with different sensors specially dht22..Your video tutorial about node red help us beginner.. =D
Hi sir, its me again I try to used mya pi camera and replace to exec command but it seem that the datbase didnt recognize my python script in image and video capturing. I hope you can help me
Csongor, are you able to tell me what the command is for me to automate a task in Windows to capture the still image from the Reolink Windows client at timed intervals and store it on my local drive? I know it's not what you are doing in this video but if you can assist, I would appreciate it!
I have no idea. Maybe you can download some sort of macro tools and record a macro of pressing the snapshot button in the Reolink client app. That will save the image for you. And you need the macro tool to run this macro whenever you want.
@@csongorvarga that's a great idea!
Any thoughts on how to get this working with FFMPEG? What I tried didn't work (error 127):
ffmpeg -rtsp_transport tcp -i "rtsp://user:password@IP:port/live1.264" -y -f image2 grab.jpg
Please check in the command line, you will get more error messages there than in Node-Red. Also you can try the examples in this post: stackoverflow.com/questions/25360470/ffmpeg-capture-current-frame-and-overwrite-the-image-output-file
Thank you for the advice, @@csongorvarga !! :)
Can we use the same with MQTT protocol?
What do you mean save? You can send an mqtt message instead of the inject node that will trigger the same flow.
Was wondering if I could plug a USB webcam into my PI3 and then use a similar setup. Is there anything native to node-red that will allow to simply read the camera info from the pi?
I assume it would work. With a bit of google, I could see a webcam node for node red which appears to do image and movie capture. Give it a go.
Hi! Or you can use the same ffmpeg/avconv method for capturing from usb as well (from /dev/video0 or something like that) like Csongor did.
can we use a thermal imaging sensor for this same process? if so can you specify which one
I have no idea, I never worked with thermal imaging sensors.
This works quite well for me, although I'm using ffmpeg directly, instead of avconv. One problem, I have mine writing to the file ~/.node-red/public/image.jpg, however when I run it again, it doesn't overwrite the file. If I delete the file manually, it will work. Any idea?
I must have been reading a different forum thread, as I was told that ffmpeg is called avconv in Linux. Regardless, it should work for both. Check ffmpeg parameters, I am pretty sure there is an overwrite option.
use option "-y /path/filename.jpg" to overwrite
Szia! ezt a megoldást fel tudnám szerinted használni egy folyamatos webcam streamre + néhány senzoradat kiírására és néhány változó külső bekérésére?
Folyamatos webcam stream-re miért kell neked megoldás. Ha a webcam tudja a RTSP-t akkor azt VLC-ben minden gond nélkül nézheted. Nem kell hozzá semmi, csak nyisd ki a RTSP portot a routeren. Szenzoradatot, változókat kiíratni használhatsz Node-Red-et, gondolom ezt az utóbbi kérdés nem pont erre a specifikus videóra vonatkozott.
még nagyon új vagyok ebben a webes dolgokban szóval ... semmit se értek hozzá kb. a Node-Red-hez se. De egy robotot szerenék építeni ahogy a kommentemből sejthető volt. Ezt be tudom implementálni így ahogy leírtad egy képernyőre? tehát hogy Node-red meg a vlc pluginnel?
Szerintem meg. Viszont akkor már értem hogy miért Webcam-et írtál és nem IP Cam-et. Szóval arra valamit kell keresned, egy Webcam-ek általában nem csinálnak RTSP stream-et. De egy webcam-et szerintem még egyszerűbb is integrálni, de valami plugint kell keresni hozzá.
when checking the history of the files the timestamp column ( as formated date) in my case is showing always 2 hours less than actual, any idea how can i correct this?
Most probably your rpi system timezone is not correct. You can run raspi-config and set the correct timezone. It should be OK after that.
4:55 how to do that how to authenticate node-red UI ??
Check you settings.js file. There is a section called httpNodeAuth. That is used to add authentication to dashboard.
I already did but i am not getting login page can you please share your setting.js file.
I just uncommented the default line and changes the user and password: "httpNodeAuth: {user:"xxx",pass:"yyy"}," This is all in that line between the double quotes. Did you check your log? Was there any error message on startup? Also note that if you enter your pass on the admin page and open the dashboard in a second tab in Chrome, it will not ask for the password again. So check on a new computer or phone opening the dashboard first.
i'm trying to get a video from and rstp camera with your flow but i always get error 127. please help me
Where are you getting this error? Does your rstp link work? Can you watch the feed if you put the URL into VLC? Add a debug node so you see the entire command line that gets passed to the exec node. And execute the same command on your PI and see what happens.
@@csongorvarga rstp link works, get error in capture video node. what i want is to capture a video when a door is open for 10 seconds
@@antonioascione6589 As I just said about. Put in a debug node to see the full command that is passed to the Exec node and test that in a command line in the PI. I have no idea what error 127 is. Maybe there is something wrong with the path, or avconv is not properly installed.
this would be much hilarious if we can find a way to let a user configure his smtp credentials from the UI adress, and lock the diagram interface,what do you think ?
There was a thread on Node Red Group how to make changes UI parameters during runtime (which are normally not editable from the input message). It was not a straight forward process, but somebody mentioned a way to do it.
Hi, what camera's type do you use. And can u explain the code in exec node. Thank u so much
Khiêm Lâm Quang I have a Cotier 720p camera. I think it is a discontinued model, I got it cheap on Banggood. Which exec node?
node capture image from camera 8:15 . it capture from webpage or rtsp?
Sorry, i'm newbie
Yes, I always capture from the RTSP stream. I think nowadays it is more common. My camera probably does not have a jpg output any more.
Hi, i just want to display live camera from garden without saving data.
So how i can do it ?
Pls explain for me, thank u so much :D
I am not sure. I know VLC has an ActiveX plugin to view RTSP streams, but that only works in IE. I never done this before and this solution is not designed for that.
can i set a camera ip for a webpage then embed it via template?
Do u think it's possible :D
Oh yes, just put that into an and you are done.
Hi I am use capture DVR please help me mobile apps name Find to online DVR
how to send image to database mysql from node red?
I did not use SQL to store binary data, but probably there is a blob type field which accept larger binary data. Otherwise you can base64 encode it and store it in a large text field.
@@csongorvarga thank you
hi! amazing job!, can you help me to add the user and password for node red dashboard please?
Google "Securing Node Red" from Ben's place. I used that blogpost to set up my Node Red. I will post the link as well if it goes through
www.hardill.me.uk/wordpress/2015/05/11/securing-node-red/
jó lett, köszi szépen!! :D
it would be better with onvif protocol just not to have that exec cmd
i installed that on a docker image and its already running avconv and opencv, i dont have that runnning as a functional thing but its here if someone want to use it and improve it, should be able to get the rstp images and passtrough th opencv algorithm.
hub.docker.com/r/jcsandoval/noderedcv
Another great informative video from you! Maybe it helps you. I send this command to capture single frame of ip camera. ffmpeg -rtsp_transport tcp -i rtsp://192.168.1.89/unicast -f image2 -vframes 1 -y /home/pi/node-red-static/grab.jpg it always works. i forced ffmpeg to use tcp protocol to grab an image. maybe you can do the same with avconv?
Thanks, interesting idea. So forcing to use TCP makes is quicker, or more reliable? To be honest I am not using this flow a lot. I set up a timelapse flow to take a picture every day 12:00. I just reviewed the images, there is a bad frame every 5th-6th days otherwise working great.
avconv was a fork of ffmpeg
i get error rc:1 for video, while for photos all is working fine. can you help me?