Axis Customer Forum
https://custforum.axis.com/

RTSP MJPEG how to send c frames every n frames with set fps
https://custforum.axis.com/viewtopic.php?f=3&t=4807
Page 1 of 1

Author:  Kristo Botha 910010 [ Fri Mar 31, 2017 6:36 am ]
Post subject:  RTSP MJPEG how to send c frames every n frames with set fps

We have 30 Axis IP cameras (P3364-LVE) on a network, streaming at 5 fps (RTSP MJPEG at 800x600)
Only 2 frames are required every +-5 seconds but they must be 200ms seconds apart (velocity calculations)
Currently only 2/25 frames are being used but the network is getting congested with all the unused frames

Is there a way to only send 2 consecutive frames every 25 frames?

Thanks

Author:  Cheng Xin 345535 [ Fri Mar 31, 2017 6:49 am ]
Post subject:  Re: RTSP MJPEG how to send c frames every n frames with set

Will jpeg images do or it must be a rtsp stream for your analytic software?

The challenges will also be sending the 2 consecutive images (also for the images to be exactly 200ms apart) exact 5sec interval as axis product are not precision instrument.

Your units need to be optimised just to concentrate on these task so that the diffences are small and within your analytics acceptable limits.

If you are interested in further discussion, please contact me via Skype @ Cheng.Xin.SG

Author:  Kristo Botha 910010 [ Fri Mar 31, 2017 7:15 am ]
Post subject:  Re: RTSP MJPEG how to send c frames every n frames with set

We get the timestamp of the incoming image so the time between consecutive images should just be in a range.
150ms-250ms will be fine, 400ms is too much. This is why 5fps was chosen.

An RTSP stream would be preferred

Would this be possible?

Author:  Cheng Xin 345535 [ Fri Mar 31, 2017 7:24 am ]
Post subject:  Re: RTSP MJPEG how to send c frames every n frames with set

To have RTSP stream at your requirement, you will need a program that executive the RTSP play and pause command.

That will limit the number MJPEG frames send over (achieving exactly 2 may be difficult).

A lot of scripting.

Author:  Kristo Botha 910010 [ Fri Mar 31, 2017 7:29 am ]
Post subject:  Re: RTSP MJPEG how to send c frames every n frames with set

Would a Recurrence time action event be able to do it?

Author:  Cheng Xin 345535 [ Fri Mar 31, 2017 7:59 am ]
Post subject:  Re: RTSP MJPEG how to send c frames every n frames with set

Yes. For Jpeg images not for video stream.

Author:  Cheng Xin 345535 [ Mon Apr 03, 2017 3:21 am ]
Post subject:  Re: RTSP MJPEG how to send c frames every n frames with set

The best approach to meet your requirement is to come up with ACAP to be loaded into the camera. Images are polled at 1/25s intervals at 5s frequency at 800x600 resolution without the stream leaving the camera.

The ACAP will then sent the results maybe with the results (with the options of images analysis via email or ftp service.

Author:  Cheng Xin 345535 [ Mon Apr 10, 2017 9:43 am ]
Post subject:  Re: RTSP MJPEG how to send c frames every n frames with set

I was thinking of your issue.

It may be possible to achieve your objective at least minimized the bandwidth send by each of P3364 with the use of privacy masks and events)

for each 5 sec.

1. First 2-3 frames. (pictures without privacy mask) about 90ms duration at 1/25 exposure.

2. Remaining (about 122 to 123) frames (total black frame - 1 pixel is send for the privacy mask) for the rest of the 5 seconds.

If you are interested in further discussion, please contact me via Skype @ Cheng.Xin.SG

Author:  Cheng Xin 345535 [ Tue Apr 11, 2017 4:51 am ]
Post subject:  Re: RTSP MJPEG how to send c frames every n frames with set

Tested that the concept works. However you may get 2-4 frames within 119ms (in theory, it should just be 2) also 5 secs intervals is sometime not exact. This is normal as Axis camera is not a precision camera.

The accuracy should be able to improve if you optimised the unit so that the camera can focus on the events and streaming.

So this will not be your solution if your application requires precision.

Bandwidth is saved in MJPEG stream.

One disadvantage of this method is that it will affect all the streams of your camera when it is on.

If you are interested in further discussion, please contact me via Skype @ Cheng.Xin.SG

Author:  Cheng Xin 345535 [ Wed Apr 12, 2017 2:32 am ]
Post subject:  Re: RTSP MJPEG how to send c frames every n frames with set

Forget that your criteria is about 200ms apart between the 2 frames.

1. One way is to have the camera send 1 frames (you may received 2 frames) with the privacy mask off for 79ms
2. Send the stream with privacy mask on for 121 ms.

Repeat step 1 and 2 for 5 times in each sec.

This will send about 1-2 (800x600) Mjpeg images every 200 ms.

This is not precise but should work. It will save a lot of bandwidth if you have 30 cameras.

Thanks this make me think out of the box.

Axis camera is feature rich but its possibility still requires some creative thinking.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/