axis_camera icon indicating copy to clipboard operation
axis_camera copied to clipboard

Add parameter for choosing camera

Open tompe17 opened this issue 11 years ago • 3 comments

Would it be possible to add a parameter for choosing camera or maybe a parameter for a string to append to the URL parameters?

Now I did in axis.py:

def formURL(self):
    self.url = 'http://%s/mjpg/video.mjpg' % self.axis.hostname
    self.url += "?fps=0&resolultion=%dx%d" % (self.axis.width, 
                                                        self.axis.height)
    self.url += "&camera=2"
    rospy.logdebug('opening ' + str(self.axis))

tompe17 avatar Aug 19 '13 14:08 tompe17

Is it typical to have more than one camera on a single IP? We haven't come across any Axis cams like this.

mikepurvis avatar Aug 19 '13 14:08 mikepurvis

I think the simplest way would be to add the opportunity for an additional string in the parameters.

For instance, I just found out mine was doing too much compression, and that it could be requested at connection time, so I added "&compression=%d" % self.axis.compression to my URL.

Regards

On Mon, Aug 19, 2013 at 4:31 PM, mikepurvis [email protected]:

Is it typical to have more than one camera on a single IP? We haven't come across any Axis cams like this.

— Reply to this email directly or view it on GitHubhttps://github.com/clearpathrobotics/axis_camera/issues/24#issuecomment-22875930 .

Cedric Pradalier

cedricpradalier avatar Aug 19 '13 14:08 cedricpradalier

The use case we have is an AXIS P7214 media controller with four video inputs (we have one colour camera and on IR camera) and the images is sent on the same IP. To be able to add an additional string is probably the best thing to do.

tompe17 avatar Aug 19 '13 15:08 tompe17