AI hardware for camera stream processing

I think I have tweaked it so it should work (actually saving the action command to a parent flow variable to re-use when restarting if needed, seems to work)

But I do not have any rtsp cameras to test with, just setting up those samples in HSS for IPCAM's but they are just m3u8 playlists. Like the RedBull

Seems -stimeout is not supported for such http streams, at least ffmpeg does not like it as parameter

So basically, I have this ffmpeg command with params that is working fine:

ffmpeg -i http://rbmn-live.akamaized.net/hls/live/590964/BoRB-AT/master_1660.m3u8 -c:v h264_omx -bsf:a aac_adtstoasc -f mp4 -movflags +frag_every_frame+empty_moov+default_base_moof -min_frag_duration 500000 pipe:1

I wonder if -timeout would give the expected result. I mean, I want ffmpeg just to close, not to reconnect by itself? The command below works but I do not know if this would cause ffmpeg to close if it loses the source.

I also saw the params -reconnect_on_network_error and -reconnect_streamed but I guess those would just make ffmpeg doing the reconnection

Or if it would better to set params on the output using -shortest -fflags shortest -max_interleave_delta 100M or similiar?

ffmpeg -timeout 10 -i http://rbmn-live.akamaized.net/hls/live/590964/BoRB-AT/master_1660.m3u8 -c:v h264_omx -c:a aac -f mp4 -movflags +frag_every_frame+empty_moov+default_base_moof -min_frag_duration 500000 pipe:1
1 Like

I found a useful rtsp source from some older topics that works ok

rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4

I think I will add another IP CAM example (in HSS) using this. For the stimeout, what is a recommended value when using rtsp? I 'm using 1000000 microseconds (1s). Is that "a good value" or should it be longer or shorter?

It restarts after it has finished (takes around 12 min) so the recovery seems to work as expected

1 Like

hi all,
you may save time ? -> looking into frigate.

in the issues there are lots of solved problems for ffmpeg options and how to get reliabel rtsp-streams from lots of different brands of (surveillance)-cams.

node-red can process the mqtt-events perfectly,
and frigate can run AI-hardware and AI-models mostly stable.
may an option to let specialized systems do separate work?

image

also double-take can process faces coming from frigate on its own,
and deliver matches via mqtt to node-red. lots of options for processing with node-red

may you want to consider the model-discussion on frigate for a takeover here?

and the brand-new discussion about the apple mini M1 with 16x corals?

regards.
toz

Hi @ozett,
Thanks for joining. Indeed there are some options using third party tools (like Motion...) that can be connected to Node-RED to have results in a short time.

But my goal is to build a video surveillance system solely with Node-RED and ffmpeg. Indeed not the most time-saving option, but the most rewarding one for developers like us :wink:

Thanks to a.o. people like @kevinGodell we are making a lot of progress. Still a lot of nodes that need to be developed to setup a full blown video surveillance system, but I am pretty convinced that we will get there in the near future.

Coral hardware support in Tensorflow.js is one of the things we need, which is why I started this discussion...

Your setup will most probably be very useful for a lot of people. But not for me, as I described above. However most probably I will have a look at it one day, to feed my creativity :slight_smile:. So thanks anyway!!

Not sure what you mean about that?

i think in frigate and wb666greene Person-Detektor (on Github) these are the key-points:

  • ffmpeg rtsp decrypting and load-balancing (on hardware and on threads)
  • make use of cheap AI-Hardware (coral), running stable 24/7 on all sorts of Hardware
  • choose the right model for hardware and needs (high detection safety, fast, modern).

there has gone a lot of effort and time into ffmepg options on frigate, and @wb666greene on the multi-threading, i guess. to optimize and precision and speed. Now you start doing this again with node-red. i will keep an eye on this :slightly_smiling_face:

these surveillance system are based an AI-Detection. Motion-only is a thing from the past, mostly all actual cams can do this on their own.

but all projects are missing the same effort and investigation in a general pipeline for an re-trained AI-models. it seems to me that in the discussion here is a need to produce individual ai-models for own coco-sets, but ist not that easy for the everage user. further above @wb666greene explained some AI-details for getting there, but that would be a great new aspect and starting point for the same thing, but now making a new start from node-red.

:wink:

That might indeed be a useful discussion. Perhaps better if you start a new discussion about that, since this one is dedicated to choose hardware that can be integrated easily with Node-RED...
There are already nodes available for tensorflow, where you can upload custom models. So perhaps you can list them in your new discussion, and hopefully some folks with knowledge jump in there...

1 Like

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