nivi
Posts: 4
Joined: Wed May 15, 2019 6:59 am

IP Camera interfaced with rpi consuming internet data on large extent

Wed May 15, 2019 7:19 am

I have interfaced pi camera module with raspberry pi. It is used for video live streaming on web and storing those video clips on cloud. I am using picamera library for that.
Though its seems it is consuming around 4GB per hour. And thats huge :| . Also, this problem is slowing down my network speed.

Can anybody suggest any solution about that ?

pi camera module : https://thepihut.com/collections/raspbe ... era-module

thanks.

B.Goode
Posts: 7678
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: IP Camera interfaced with rpi consuming internet data on large extent

Wed May 15, 2019 9:15 am

Welcome to the Raspberry Pi forums.

nivi wrote:
Wed May 15, 2019 7:19 am
I have interfaced pi camera module with raspberry pi. It is used for video live streaming on web and storing those video clips on cloud. I am using picamera library for that.
Though its seems it is consuming around 4GB per hour. And thats huge :| . Also, this problem is slowing down my network speed.

Can anybody suggest any solution about that ?

pi camera module : https://thepihut.com/collections/raspbe ... era-module

thanks.

The standard Raspberry Pi Foundation camera module you have linked to is not an "IP camera."

As supplied, it can communicate only with an RPi board: it has no built-in IP networking capabilities.

Your problem lies elsewhere, not with the camera module.

It is used for video live streaming on web and storing those video clips on cloud.
It seems likely that your choice of tools for live streaming and data storage, both over the internet, that are responsible for the issues that concern you.


it is consuming around 4GB per hour. And thats huge
So the equivalent of about 1MBytes a second? That doesn't seem 'huge' for a live video streaming service? Maybe you need to reduce the resolution or refresh rate of the data you are streaming? Or restrict the number of clients.

BespokeTech
Posts: 40
Joined: Thu Apr 04, 2019 8:14 pm

Re: IP Camera interfaced with rpi consuming internet data on large extent

Wed May 15, 2019 10:12 am

I agree with what B.goode has said, streaming video at decent resolution and framerate requires a lot of bandwidth.

Every scenario is different but roughly speaking for video streaming it breaks down as follows....


  • Low quality video is very low-quality. think 240p or 320p. Low-quality settings will use about 0.3GB (300MB) per hour.

    SD quality video is standard 480p video. SD-quality video uses about 0.7GB (700MB) per hour.

    HD quality video is between 720p and 2K (remember, the app adjusts the stream). HD-quality video uses about 0.9GB (720p), 1.5GB (1080p) and 3GB (2K) per hour.

    UHD quality video uses a lot of data. A 4K stream uses about 7.2GB per hour.


Sounds like you are streaming at 1080p 30fps?

nivi
Posts: 4
Joined: Wed May 15, 2019 6:59 am

Re: IP Camera interfaced with rpi consuming internet data on large extent

Tue May 21, 2019 5:25 am

Thanks B.Goode.
The standard Raspberry Pi Foundation camera module you have linked to is not an "IP camera."

As supplied, it can communicate only with an RPi board: it has no built-in IP networking capabilities.

Your problem lies elsewhere, not with the camera module.
Oh. Thank you B.Goode for correcting me.

It seems likely that your choice of tools for live streaming and data storage, both over the internet, that are responsible for the issues that concern you.
Yes sir. I am using internet for both of them.
So the equivalent of about 1MBytes a second? That doesn't seem 'huge' for a live video streaming service? Maybe you need to reduce the resolution or refresh rate of the data you are streaming? Or restrict the number of clients.

Agreed. But with that speed, running continuously, it will consume in TBs for a month. Isn't it more than expected ?
About the resolution, its already 480p.


Apologies for late response !

nivi
Posts: 4
Joined: Wed May 15, 2019 6:59 am

Re: IP Camera interfaced with rpi consuming internet data on large extent

Tue May 21, 2019 5:27 am

Thanks BespokeTech.

No the resolution is 480p and fps is 25 right now.


Actually in a program, images are getting captured using function and sent for live streaming.

Code: Select all

 camera.capture_continuous(stream, 'jpeg', use_video_port=True) 
Also for uploading video files on cloud, there's another function to record, store in pi and then send them to cloud.

Code: Select all

camera.start_recording(video_path+Camera.itern+'v1.h264',format='h264',quality=30) 

cmd2 = 'gsutil cp /home/pi/DC/Ver101/Videos/*.h264 gs://decrpi3cam' 
os.system(cmd2)
Can you suggest better way to do this ?

Apologies for late response.

BespokeTech
Posts: 40
Joined: Thu Apr 04, 2019 8:14 pm

Re: IP Camera interfaced with rpi consuming internet data on large extent

Fri May 24, 2019 8:58 pm

nivi wrote:
Tue May 21, 2019 5:27 am
Thanks BespokeTech.

No the resolution is 480p and fps is 25 right now.


Actually in a program, images are getting captured using function and sent for live streaming.

Code: Select all

 camera.capture_continuous(stream, 'jpeg', use_video_port=True) 
Also for uploading video files on cloud, there's another function to record, store in pi and then send them to cloud.

Code: Select all

camera.start_recording(video_path+Camera.itern+'v1.h264',format='h264',quality=30) 

cmd2 = 'gsutil cp /home/pi/DC/Ver101/Videos/*.h264 gs://decrpi3cam' 
os.system(cmd2)
Can you suggest better way to do this ?

Apologies for late response.
Hi,

I think you need to change your stream from jpeg to h.264 if you use this calculator http://www.stardot.com/bandwidth-and-storage-calculator you will see the difference is dramatic.

Take a look here https://raspberrypi.stackexchange.com/q ... pberry-cam if you scroll down the discussion you will see someone has posted 7 different ways to stream. Suggest you have a play with some of those.

nivi
Posts: 4
Joined: Wed May 15, 2019 6:59 am

Re: IP Camera interfaced with rpi consuming internet data on large extent

Tue May 28, 2019 10:15 am

Thank you BespokeTech.
Take a look here https://raspberrypi.stackexchange.com/q ... pberry-cam if you scroll down the discussion you will see someone has posted 7 different ways to stream. Suggest you have a play with some of those.
I'll try these things real soon !!

Return to “General discussion”