TrendNet TV-IP301

Post here to ask any questions about hardware suitability, configuration in ZoneMinder, or experiences. If you just want to know if something works with ZoneMinder or not, please check the Hardware Compatibility sections in the forum, and the Wiki first. Also search this topic as well.
z84976
Posts: 3
Joined: Tue Nov 28, 2006 3:03 am
Location: ATL

TrendNet TV-IP301

Post by z84976 »

Greetings all. Of all the IP cameras out there, it seems I have chosen the one (TrendNet TV-IP301) that wants you to always use a java or activex applet to access the images, and doesn't want to let you pull a .jpg via an http command. Lovely.

I've searched all over the place and tried a zillion different URLs to try to get a .jpg out of the thing (really, a zillion). Trendnet is pretty useless as far as technical info on the things, but after a little packet sniffing I found that A) it definitely sending .jpg images to that java app and B) it's using technology by some company called Cellvision, who I found after a wee bit of googling makes a clone of my Trendnet device that they call a CAS-861. I'm really new to the IP cam/ZoneMinder world, and I'm by no means a programmer, but I did find an SDK on Cellvision's website (http://cellvision.net) that claims to show the way to interact with the camera. Apparently it's a client/server app system that is used to get the data, not regular http post/get commands.

Anybody think it would be possible to create a small proxy program to get the .jpg images and serve them up via http or local file to ZM? Anybody want to give it a shot? I swear I'll buy you some ice cream, beer, or whatever... like I said, I'm NOT a programmer, but I AM stubborn, and one way or another I'm going to get this to work. The cameras work really well and have a great picture both during the day and in darkness with their built-in IR.

matt
sway
Posts: 1
Joined: Sat Sep 08, 2007 2:00 pm
Location: RO

Post by sway »

same problem here with Trendnet TV-IP301 and TV-IP301W, pls help :mrgreen:


The reason I want to switch software is because IPView realy sucks and stops recording after 1-2houres, and ofcourse because of linux.

10x in advance, sway
garbonzo
Posts: 3
Joined: Fri Sep 07, 2007 12:32 am

Post by garbonzo »

I've tried several higher end IP cameras.

Axis are the best in terms of support and documentation of features.

The Arecont cameras and cheaper, but their embedded interface sucks and their support is not as good.

We also use a lot of CCTV cameras connected via Video servers to IP. These work pretty well. We use the Axis video servers, but you are still stuck with crappy quality images.
apoullion
Posts: 3
Joined: Thu Dec 14, 2006 4:50 pm

Post by apoullion »

We ask our Purchases Department for a Trendnet TV-IP300 but local reseller says it doesn't made anymore so they sell us a TV-IP301 as replacement.
This camera is totally different of IP300 since its input voltage is 12V in place of 5V that IP300 uses.
We discover too late that it was not the olnly difference but the way of pull jpgs.
After several days of work we only could do this device work using the following script:

*****************************************************
<?php

$host=$_GET['host'];
$path=$_GET['path'];

if ($host!="")
{
#$x = file_get_contents("http://".$host."/goform/video");
$x = file_get_contents("http://".$host.$path);
header("Content-type: image/jpeg");
header("Content-Length: ".strlen($x));
echo $x;
}

?>
*****************************************************

This stuff has to be located in the same place where other pages of zm are. (ej /var/www/html/parcheJpg.php)

And you have to fill the origin camera's tab with
http:localhost/parcheJpg.php?host=cam-ip301.someplace.com&path=/goform/video

The problem is this way only works (for us) about one day. After that we have to restart the camera. We haven't idea why.

pardon by my English

Marcelo Poullion
¿Lo conocés a Marcelo?
dwgranth
Posts: 2
Joined: Thu Oct 04, 2007 5:40 am

maybe this will help?

Post by dwgranth »

I have a CAS-861 in hand and have been trying to get it to work as well... I did notice I can get a single image from this url:

http://cameraip/goform/video2

but for some reason when I put it as the source, it doesn't show up correctly... but i can go to it with my browser and download the file itself and it will be the image
apoullion
Posts: 3
Joined: Thu Dec 14, 2006 4:50 pm

Post by apoullion »

he himself problem happens with trendnet TV-IP301 and zoneminder, using this script works, prove this.
dwgranth
Posts: 2
Joined: Thu Oct 04, 2007 5:40 am

can get script to work in browser...

Post by dwgranth »

I can get it to work in the browser... what do i put in host and path?
apoullion
Posts: 3
Joined: Thu Dec 14, 2006 4:50 pm

Post by apoullion »

using the script to fix JPG:
host:server1
port:80
path:/fix.php?host=cameraip&path=/goform/video

without using script prove:
host:cameraip
port:80
path:/goform/video

luck good.
batnator
Posts: 10
Joined: Thu Jan 31, 2008 10:17 am
Location: Berlin / Germany

Post by batnator »

The php script produced unnecessary load on the server when using more than 1 cameras from the same type. Here is a little patch so you can request the images directly from camera via path: /goform/video

Code: Select all

--- src/zm_remote_camera.cpp.orig       2008-01-31 12:40:17.134369426 +0100
+++ src/zm_remote_camera.cpp    2008-01-31 12:40:26.084504429 +0100
@@ -356,6 +356,14 @@
                                                        format = JPEG;
                                                        state = CONTENT;
                                                }
+                                               else if ( !strcasecmp( content_type, "image/mpeg" ) )
+                                               {
+                                                       // Single image
+                                                       mode = SINGLE_IMAGE;
+                                                       format = JPEG;
+                                                       state = CONTENT;
+
+                                               }
                                                else if ( !strcasecmp( content_type, "image/x-rgb" ) )
                                                {
                                                        // Single image
@@ -453,6 +461,10 @@
                                        {
                                                format = JPEG;
                                        }
+                                       else if ( !strcasecmp( content_type, "image/mpeg" ) )
+                                       {
+                                               format = JPEG;
+                                       }
                                        else if ( !strcasecmp( content_type, "image/x-rgb" ) )
                                        {
                                                format = X_RGB;
@@ -783,6 +795,13 @@
                                                        format = JPEG;
                                                        state = CONTENT;
                                                }
+                                               else if ( !strcasecmp( content_type, "image/mpeg" ) )
+                                               {
+                                                       // Single image
+                                                       mode = SINGLE_IMAGE;
+                                                       format = JPEG;
+                                                       state = CONTENT;
+                                               }
                                                else if ( !strcasecmp( content_type, "image/x-rgb" ) )
                                                {
                                                        // Single image
@@ -947,6 +966,10 @@
                                        {
                                                format = JPEG;
                                        }
+                                       else if ( !strcasecmp( content_type, "image/mpeg" ) )
+                                       {
+                                               format = JPEG;
+                                       }
                                        else if ( !strcasecmp( content_type, "image/x-rgb" ) )
                                        {
                                                format = X_RGB;
The patch work for Sparklan CAS-861, Sparklan CAS-861W, Trendnet TV-IP301 and Trendnet TV-IP301W which all have the buggy firmware with the wrong mimetype.

greets Frank
barkeep8
Posts: 15
Joined: Fri Mar 31, 2006 2:55 am

trendnet ip-tv301

Post by barkeep8 »

batnator wrote:The php script produced unnecessary load on the server when using more than 1 cameras from the same type. Here is a little patch so you can request the images directly from camera via path: /goform/video

Code: Select all

--- src/zm_remote_camera.cpp.orig       2008-01-31 12:40:17.134369426 +0100
+++ src/zm_remote_camera.cpp    2008-01-31 12:40:26.084504429 +0100
@@ -356,6 +356,14 @@
                                                        format = JPEG;
                                                        state = CONTENT;
                                                }
+                                               else if ( !strcasecmp( content_type, "image/mpeg" ) )
+                                               {
+                                                       // Single image
+                                                       mode = SINGLE_IMAGE;
+                                                       format = JPEG;
+                                                       state = CONTENT;
+
+                                               }
                                                else if ( !strcasecmp( content_type, "image/x-rgb" ) )
                                                {
                                                        // Single image
@@ -453,6 +461,10 @@
                                        {
                                                format = JPEG;
                                        }
+                                       else if ( !strcasecmp( content_type, "image/mpeg" ) )
+                                       {
+                                               format = JPEG;
+                                       }
                                        else if ( !strcasecmp( content_type, "image/x-rgb" ) )
                                        {
                                                format = X_RGB;
@@ -783,6 +795,13 @@
                                                        format = JPEG;
                                                        state = CONTENT;
                                                }
+                                               else if ( !strcasecmp( content_type, "image/mpeg" ) )
+                                               {
+                                                       // Single image
+                                                       mode = SINGLE_IMAGE;
+                                                       format = JPEG;
+                                                       state = CONTENT;
+                                               }
                                                else if ( !strcasecmp( content_type, "image/x-rgb" ) )
                                                {
                                                        // Single image
@@ -947,6 +966,10 @@
                                        {
                                                format = JPEG;
                                        }
+                                       else if ( !strcasecmp( content_type, "image/mpeg" ) )
+                                       {
+                                               format = JPEG;
+                                       }
                                        else if ( !strcasecmp( content_type, "image/x-rgb" ) )
                                        {
                                                format = X_RGB;
The patch work for Sparklan CAS-861, Sparklan CAS-861W, Trendnet TV-IP301 and Trendnet TV-IP301W which all have the buggy firmware with the wrong mimetype.

greets Frank
Frank and everyone else:

Thanks for posting these patches and helpful hints. I'm not able to implement them in my ZM 1.22.3 server using a Trendnet ip-tv301 Cam.

I've been using ZM for 3 years, and have connected it to several IP cams, but this is the first time I've had a cam that only outputs MPEG4 or MJPEG.

I don't understand the posts above. Do I need to include the php script as well as recompile from source with the code that frank provides above?

Also, is the code that Frank has submitted syntax correct? I don't know ANYTHING about source code.

I've been trying to take a more generalized approach to just getting ZM to look at MJPEG stream, but I'm not finding any more info there than for Trendnet.

Thanks for any help you can offer.
batnator
Posts: 10
Joined: Thu Jan 31, 2008 10:17 am
Location: Berlin / Germany

Post by batnator »

My little patch also work with ZoneMinder 1.22.3, and when you work with a recompile version from sources with these applied patch the php script from apoullion are obsolete. The patch is only a dirty workaround for the buggy cam firmware's which send a wrong mimetype while fetching a image from http://camip/goform/video

here is the patch for direct download from gentoos bug database: http://bugs.gentoo.org/attachment.cgi?id=142775
barkeep8
Posts: 15
Joined: Fri Mar 31, 2006 2:55 am

Post by barkeep8 »

batnator wrote:My little patch also work with ZoneMinder 1.22.3, and when you work with a recompile version from sources with these applied patch the php script from apoullion are obsolete. The patch is only a dirty workaround for the buggy cam firmware's which send a wrong mimetype while fetching a image from http://camip/goform/video

here is the patch for direct download from gentoos bug database: http://bugs.gentoo.org/attachment.cgi?id=142775
Thanks for your help! I will give this a try as soon as I have time to rebuild from source...
barkeep8
Posts: 15
Joined: Fri Mar 31, 2006 2:55 am

inclusion in distro source?

Post by barkeep8 »

batnator wrote:My little patch also work with ZoneMinder 1.22.3, and when you work with a recompile version from sources with these applied patch the php script from apoullion are obsolete. The patch is only a dirty workaround for the buggy cam firmware's which send a wrong mimetype while fetching a image from http://camip/goform/video

here is the patch for direct download from gentoos bug database: http://bugs.gentoo.org/attachment.cgi?id=142775
How do I send this to the author of Zoneminder to get it included as a permanent fix for the ZM source? Is that even appropriate?

Thanks!
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

We are already watching, but this is not a bug in ZM, this is a problem with the camera sending the wrong mime type, and should be corrected in the firmware for the camera and not in ZM, for now you will have to patch ZM to make this camera work.
I'm not sure if it would be proper to set the incorrect mime type in ZM code.
Some one will have to look into it.
batnator
Posts: 10
Joined: Thu Jan 31, 2008 10:17 am
Location: Berlin / Germany

Post by batnator »

cordel wrote:I'm not sure if it would be proper to set the incorrect mime type in ZM code.
it's only a quick and dirty fix for some setups but not for the mainstream sources of zm, I have contacted the vendors Trendnet and Sparklan for a fix in firmware, but no response yet.
Post Reply