Using GStreamer for highly scalable, network streaming project.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Using GStreamer for highly scalable, network streaming project.

yusuf.husainy
Hello all,


I have a project which involves video streaming and recording. Can anyone help guide me whether the following is possible using GStreamer:

1) Video comes in from IP camera. The protocol & formats could be: h264 (i am thinking uvch264src).
2) We have to record this video to hard disk continuously, 24x7. At the same time, also have to stream out this video as rtsp/h264 and rtmp/h264 and http/mjpeg
3) Scalability: should be able to support up to 500 different IP cameras and up to 1000 clients (viewers who will receive rtsp or rtmp).
4) Server hardware: Intel Xeon or Intel i7 with lots of RAM and hard disk.:)

Questions:
a) Is it possible to create such a streaming and recording server using gstreamer? The target deployment will be on Amazon EC2.

Regards,
Yusuf Husainy.
Reply | Threaded
Open this post in threaded view
|

Re: Using GStreamer for highly scalable, network streaming project.

Peter Maersk-Moller-2
Hi Yusuf.

You may mean 500 individual cameras rather than 500 different cameras.

Setting it up is rather trivial and scalability is rather linear ... that is until you hit some bandwidth barriers. You write server and not servers, so you will hit bandwidth barriers, but it depends on your target stream bandwidth. So to clear it, i have a few questions:

  1) What is your target video resolution?
  2) What is your target frame rate?
  3) What is your target streaming bandwidth per video feed into the system?
  4) What is the maximum number of concurrent streams you want to be able to save?
  5) What is the maximum number of concurrent unique streams you want to be able to stream?
  6) Is 1000 the maximum number of concurrent not unique streams you must be able to support?
  7) Does the system have to be able to support VoD streams also or just Live streams?
  8) If it needs to support VoD, what is the maximum number of concurrent streams it needs to support?
  9) Can you mix/merge some video feeds to lower the storage and bandwidth required or do you need to have them all in full size available?
  10) What will you do with saved video (VoD) as it gets older?

Best regards
Peter Maersk-Moller





On Sat, Jul 20, 2013 at 1:18 PM, yusuf.husainy <[hidden email]> wrote:
Hello all,


I have a project which involves video streaming and recording. Can anyone
help guide me whether the following is possible using GStreamer:

1) Video comes in from IP camera. The protocol & formats could be: h264 (i
am thinking uvch264src).
2) We have to record this video to hard disk continuously, 24x7. At the same
time, also have to stream out this video as rtsp/h264 and rtmp/h264 and
http/mjpeg
3) Scalability: should be able to support up to 500 different IP cameras and
up to 1000 clients (viewers who will receive rtsp or rtmp).
4) Server hardware: Intel Xeon or Intel i7 with lots of RAM and hard disk.:)

Questions:
a) Is it possible to create such a streaming and recording server using
gstreamer? The target deployment will be on Amazon EC2.

Regards,
Yusuf Husainy.




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Using-GStreamer-for-highly-scalable-network-streaming-project-tp4661146.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Using GStreamer for highly scalable, network streaming project.

yusuf.husainy
Hi Peter,

Thank You for your timely reply, I appreciate it.

Yes, I did mean 500 individual IP cameras, sorry about that.

For your other questions, I will have an internal discussion with my client, as this is not decided as yet. I will keep this thread updated.


Regards,
Yusuf Husainy.
Reply | Threaded
Open this post in threaded view
|

Re: Using GStreamer for highly scalable, network streaming project.

yusuf.husainy
Hi,

We had an internal discussion with our client and this is what I got:

You may mean 500 individual cameras rather than 500 different cameras.
<Yusuf>Yes, 200 to 500 individual cameras to act as source of inbound feed. These cameras could be of different types, some may be D-Link surveillance cameras, some may be Dropcam camera etc. But assume that all the cameras support H.264 video (with/without audio) over RTSP.



  1) What is your target video resolution?
VGA
  2) What is your target frame rate?
15-20 fps
  3) What is your target streaming bandwidth per video feed into the system?
Did not understand the question. Each video stream into the system will be VGA resolution H.264+AAC over RTSP, 15~20fps. The feeds come in from devices in the field; network conditions at feed source (devices) may not be constant and reliable. The system should be resilient to handle frame loss/packet loss.
  4) What is the maximum number of concurrent streams you want to be able to save?
Per server (EC2 m1.large instance), up to 200 inbound individual concurrent streams.
  5) What is the maximum number of concurrent unique streams you want to be able to stream?
See the above answer. Inbound 200 unique concurrent streams.
  6) Is 1000 the maximum number of concurrent not unique streams you must be able to support?
1000 outbound concurrent streams. So if there are 1000 viewers, and total 200 inbound streams, on average there will be 5 outbound streams per inbound stream.
  7) Does the system have to be able to support VoD streams also or just Live streams?
Yes, the 200 inbound streams must be recorded to storage as well as streamed out live. The 1000 outbound streams is total of live as well as VoD outbound streams, so for example, 800 Live outbound and 200 VoD outbound. The VoD must be from the content recorded from the inbound streams at a previous time. Think DVR in the cloud.
  8) If it needs to support VoD, what is the maximum number of concurrent streams it needs to support?
As stated above. Expected server performance is 200 inbound streams (record and stream out simultaneously) and 1000 outbound streams (total of live and VoD).
  9) Can you mix/merge some video feeds to lower the storage and bandwidth required or do you need to have them all in full size available?
Cannot mix/merge. Each stream must be stored individually.
  10) What will you do with saved video (VoD) as it gets older?
If configured to do so, the server should delete files older than [configured] days, e.g. delete files older than 60 days.


I appreciate the help :)

Regards,
Yusuf Husainy.
Best regards
Peter Maersk-Moller

Reply | Threaded
Open this post in threaded view
|

Re: Using GStreamer for highly scalable, network streaming project.

Peter Maersk-Moller-2
Hi Yusuf.

One of the VGA resolutions is 640x480 with 16 colours. We assume 640x480 with full colour though probably converted to some YUV format and encoded on either PCs or in cameras directly. With the moderate framerate, though that sometimes means less for the required bandwidth with a given level of quality, you should be able to get an okay quality with less than 500kbps per stream. 200 input streams of 500 kbps is 100Mbps. It ought to be trivial to write 100Mbps onto disk. Linux has a tool for checking write speeds for disks and you should check the server you want to use. Likewise you have 1000 streams, which in worst case are 1000 individual reads on disk unless you impose some limitations and are using an ok quality stream server. Worst case is then 500Mbps read on same disk as you write to, unless you load balance over more than one server. This is not completely trivial, but absolutely doable, if you know what you are doing.

GStreamer can easily be used to running all the reception and saving of video streams. No doubt about that. However for the server side using RTSP, I have my doubts. That is to say I have not checked the state of the RTSP server support for GStreamer, sorry for that, but over time I have come across so many less optimal implementations of RTSP based servers that I can have my doubts. RTSP servers seems hard for many to implement for some unknown reason. But perhaps some here on the list can assure to use GStreamer for that. I might seek for other RTSP servers that may offer the needs you quite likely will have for access control, media inspection, traffic overview etc and then combine the total setup with GStreamer.

Alternatively I can devise a solution for you, though that require some charging, which you probably is not looking for.

Best regard and good luck with the project.
Peter Maersk-Moller



On Wed, Jul 24, 2013 at 5:06 PM, yusuf.husainy <[hidden email]> wrote:
Hi,

We had an internal discussion with our client and this is what I got:

You may mean 500 individual cameras rather than 500 different cameras.
<Yusuf>Yes, 200 to 500 individual cameras to act as source of inbound feed.
These cameras could be of different types, some may be D-Link surveillance
cameras, some may be Dropcam camera etc. But assume that all the cameras
support H.264 video (with/without audio) over RTSP.



  1) What is your target video resolution?
VGA
  2) What is your target frame rate?
15-20 fps
  3) What is your target streaming bandwidth per video feed into the system?
Did not understand the question. Each video stream into the system will be
VGA resolution H.264+AAC over RTSP, 15~20fps. The feeds come in from devices
in the field; network conditions at feed source (devices) may not be
constant and reliable. The system should be resilient to handle frame
loss/packet loss.
  4) What is the maximum number of concurrent streams you want to be able to
save?
Per server (EC2 m1.large instance), up to 200 inbound individual concurrent
streams.
  5) What is the maximum number of concurrent unique streams you want to be
able to stream?
See the above answer. Inbound 200 unique concurrent streams.
  6) Is 1000 the maximum number of concurrent not unique streams you must be
able to support?
1000 outbound concurrent streams. So if there are 1000 viewers, and total
200 inbound streams, on average there will be 5 outbound streams per inbound
stream.
  7) Does the system have to be able to support VoD streams also or just
Live streams?
Yes, the 200 inbound streams must be recorded to storage as well as streamed
out live. The 1000 outbound streams is total of live as well as VoD outbound
streams, so for example, 800 Live outbound and 200 VoD outbound. The VoD
must be from the content recorded from the inbound streams at a previous
time. Think DVR in the cloud.
  8) If it needs to support VoD, what is the maximum number of concurrent
streams it needs to support?
As stated above. Expected server performance is 200 inbound streams (record
and stream out simultaneously) and 1000 outbound streams (total of live and
VoD).
  9) Can you mix/merge some video feeds to lower the storage and bandwidth
required or do you need to have them all in full size available?
Cannot mix/merge. Each stream must be stored individually.
  10) What will you do with saved video (VoD) as it gets older?
If configured to do so, the server should delete files older than
[configured] days, e.g. delete files older than 60 days.


I appreciate the help :)

Regards,
Yusuf Husainy.
Best regards
Peter Maersk-Moller





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Using-GStreamer-for-highly-scalable-network-streaming-project-tp4661146p4661234.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Using GStreamer for highly scalable, network streaming project.

yusuf.husainy
Hi Peter,

Thank You very much for your help!!

I appreciate it.

Regards,
Yusuf Husainy.