View unanswered posts | View active topics


Reply to topic  [ 65 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
  
 Post subject: Java client for AvTech DVRs
PostPosted: Sat Jun 21, 2008 7:29 pm 
Registered User

Joined: Jun 2008
Posts: 22

Offline
Hi All,

Recently a combination of Mac OS X and firefox updates broke my ability to see my AvTech DVR760 remotely from Apple machines. I tracked this to a Java applet bug causing a security exception as it tried to create a local file.

Undaunted I downloaded the application.jar file from the DVR and decompiled it using the jad Java decompiler. I bit of hackery later and I now have a pure Java application which I can run on a PC or Mac (or indeed anywhere else should I choose to) which basically provides the same functions as the web interface but also nicely supports scaling of the displayed image to fit the window size, unlike in the web app.

Is there a call for such an application from those wanting to use DVR760s from Mac/Linux platforms as well as Windows?

Steve


Top
 Profile  
 

  
 Post subject:
PostPosted: Thu Jun 26, 2008 8:47 pm 
User avatar
Registered User

Joined: Mar 2007
Posts: 4449
Location: Melbourne Florida

Offline
I would be interested in putting this on my website as I am sure there is a need out there.

_________________
Scorpion
QUESTION: Why is there always enough time to go back and fix it right a second time??


Top
 Profile  
 

  
 Post subject:
PostPosted: Sat Jun 28, 2008 6:15 pm 
User avatar
Registered User

Joined: Mar 2007
Posts: 4449
Location: Melbourne Florida

Offline
The application CCTV_1.0.dmg , and the CCTV.JAR file has been posted at

http://scorpiontheater.com/javaapp.aspx


A mac user would download the .dmg file which is a disk image. When they open it they'll see an application with a CCTV icon which they then copy to their Application folder. To run it they then double click the program under Applications.


Thanks to Steve Evans for his work, and his research.

_________________
Scorpion
QUESTION: Why is there always enough time to go back and fix it right a second time??


Last edited by scorpion on Sun Jun 29, 2008 9:38 pm, edited 1 time in total.

Top
 Profile  
 

  
 Post subject:
PostPosted: Sat Jun 28, 2008 7:01 pm 
Registered User

Joined: Sep 2007
Posts: 299
Location: New Zealand

Offline
Sweet! Works great on my PC, even a little snappier than the original. I'll have to try it on my linux-based web tablet.

Good work!

----
I have a shortcut in the same folder as .JAR file which contains the arguments.

C:\WINDOWS\system32\javaw.exe -jar CCTV_JAR.jar 10.1.1.33 80 username password

That folder can be located anywhere. Once placed, then created a shortcut on the desktop from that first shortcut to point to it (right-click, send to desktop.)


Last edited by Kiwi on Sun Jun 29, 2008 2:28 am, edited 1 time in total.

Top
 Profile  
 

  
 Post subject:
PostPosted: Sat Jun 28, 2008 7:47 pm 
User avatar
Registered User

Joined: Mar 2007
Posts: 4449
Location: Melbourne Florida

Offline
I need your help in editing that webpage.

Any advice?


I am not familiar with Apple/Mac OS.

Has anyone tried it on Linux yet?

Thanks!

_________________
Scorpion
QUESTION: Why is there always enough time to go back and fix it right a second time??


Top
 Profile  
 

  
 Post subject:
PostPosted: Tue Jul 01, 2008 7:03 am 
Registered User

Joined: Sep 2007
Posts: 299
Location: New Zealand

Offline
This app is super-handy for quickly checking live cameras without keeping the old Video Server-E running in the task bar. On a LAN it comes up with working video in less than a second or two of being started.

On a PC the aspect ratio comes out slightly wrong. Video Server E gives 1.400 or 641 x 458 while CCTV_JAR shows 1.157 or 641 x 554. Is there a way to correct this?

Also, the video quality level appears to be on "medium." Again, can this be easily changed?

TIA


Top
 Profile  
 

  
 Post subject:
PostPosted: Wed Jul 02, 2008 2:55 am 
Registered User

Joined: Jun 2008
Posts: 22

Offline
As there seem to be some issues with the formatting of the webpage, here are the instructions, properly formatted, for users who want to set a default host/login on startup.

If the application is run as supplied it will present you with a dialog box requesting login information, the default port being 80 and the username/password being admin/admin. It is also possible to supply these on the command line thus:
Code:
   $ java -jar CCTV.jar myhost 80 admin admin

which is rather handy for Window shortcuts for specific machines.

These arguments can also be passed to the Mac application by modifying the CCTV.app/Contents/Info.plist file to include an Arguments clause thus:
Code:
   <dict>
       <key>MainClass</key>
       <string>Cctv</string>
       <key>JVMVersion</key>
       <string>1.5*</string>
       <key>Arguments</key>
       <string>myhost 80 admin admin</string>
       <key>ClassPath</key>
           <string>$JAVAROOT/CCTV.jar</string>
   </dict>

I hope that's clearer.

Steve


Top
 Profile  
 

  
 Post subject:
PostPosted: Wed Jul 02, 2008 3:55 am 
Registered User

Joined: Jun 2008
Posts: 22

Offline
Kiwi wrote:
This app is super-handy for quickly checking live cameras without keeping the old Video Server-E running in the task bar. On a LAN it comes up with working video in less than a second or two of being started.

On a PC the aspect ratio comes out slightly wrong. Video Server E gives 1.400 or 641 x 458 while CCTV_JAR shows 1.157 or 641 x 554. Is there a way to correct this?

Also, the video quality level appears to be on "medium." Again, can this be easily changed?

TIA


The code wasn't setting the quality so I guess I've been lucky to be getting high, so I've made a change to force this to High, and I'll get this change released soon.

As for the aspect ratio I've been very care to use the same 640x552 panel size as in the java applet. I just tried an aspect ratio of 1.4 and it looked like somebody had trodden on my car!!!!!

Thanks for the feedback.

Steve


Top
 Profile  
 

  
 Post subject:
PostPosted: Wed Jul 02, 2008 11:08 pm 
Registered User

Joined: Sep 2007
Posts: 299
Location: New Zealand

Offline
Thanks for checking on that, Steve!

Also, I used "javaw.exe" instead of "java.exe" as the JRE to eliminate the pop-up text window on a PC.

Image
Image


Top
 Profile  
 

  
 Post subject:
PostPosted: Thu Jul 03, 2008 2:41 pm 
Registered User

Joined: Jun 2008
Posts: 22

Offline
From the shape of the green "live" dot, I can see that the aspect ratio should be wider with your system. This is most odd as with an AVC761 I get round green dots with my application, not horizontally squished ones.

The 782 is a model 1 with MPEG4 at frame resolution, whereas the 761 is a model 4 and MJPEG at frame.

From the manual:

Frame: 720 × 480 pixels〈NTSC〉/ 720 × 576 pixels PAL〉
CIF: 352 × 240 pixels〈NTSC〉/ 352 × 288 pixels〈PAL〉

I'm using a PAL system with a pixel ratio of 1.25:1
Kiwi is, I guess, using NeverTwicetheSameColor with a pixel ratio of 1.5:1

Now, of course I don't expect these pixels to necessarily be square, but this could go some way to explain the differences seen.

I'll look into this further.

Steve


Top
 Profile  
 

  
 Post subject:
PostPosted: Thu Jul 03, 2008 3:31 pm 
Registered User

Joined: Jun 2008
Posts: 22

Offline
Hi Kiwi,

Looking at the problem of aspect ratio I've had to dig deeper into the applet code on which this application is based. I've modified it so that the image aspect ratio is determined by that of the received images rather than by the fixed 642x554 ratio previously in use. The images returned by my ACV761 are 640x276 - so much for frame resolution of 720x576. No, the 276 isn't a mistake! This is clearly crude de-interlacing by requiring upscaling to 640x552!

PM me with your email address and I'll send you a version to try that will hopefully preserve the aspect ratio. If it works for you I'll post it back for wider use.

Cheers,

Steve


Top
 Profile  
 

  
 Post subject:
PostPosted: Mon Jul 07, 2008 3:50 am 
Registered User

Joined: Jun 2008
Posts: 22

Offline
The Mac OS X 10.5.4 update I've just installed appears to have fixed the issue with opening the directory browser interface using Firefox which is good news. I shall keep refining this application though, as it has certain advantages, including the potential to add network backup which I'll turn my attention to when I get time.

Steve


Top
 Profile  
 

  
 Post subject: to see avtech on my pocketpc
PostPosted: Tue Jul 29, 2008 12:04 pm 
Registered User

Joined: Jul 2008
Posts: 3

Offline
hi, thanks for your interest.
I have an avtech avc781 with 4 channels and the program java cctv.jar it dearly works on my pc.
I would like to know if the same program is able' to turn on my pocket pc eten glofiish x800 with mobile windows 6. when I have tried, not and' is possible to compile it because it misses some relative file. jad
Would you be prepared to point out me where to withdraw the file or which software can I take for visualizing my avtech on the pocket pc?
thanks endless.


Top
 Profile  
 

  
 Post subject:
PostPosted: Tue Jul 29, 2008 5:37 pm 
Registered User

Joined: Sep 2007
Posts: 299
Location: New Zealand

Offline
I'll try to help as I'm sure Steve is very busy.

Presumably you have a suitable Java runtime engine installed and can go to java.com and past the test?

If not try here:

http://www.superwaba.com.br/en/default.asp

As far as I know .jad is a decompiler extension, not really applicable.


Top
 Profile  
 

  
 Post subject:
PostPosted: Wed Jul 30, 2008 3:37 pm 
Registered User

Joined: Jun 2008
Posts: 22

Offline
.jad files are associated with mobile applications and are used to package up MIDlets. I have no experience of working with these, although I suspect that it would be possible to re-package the CCTV application. I'm not sure how much effort would be involved.

See http://developers.sun.com/mobility/lear ... #jadsnjars for details. It looks as if the MIDlet simply uses requires the definition of a subclass of MIDlet to implement the main entry point interface. I'm afraid this isn't something I have time to look at in any depth at the moment (the wife thinks that fitting the new oak flooring in the lounge is more important!), but I can let you have a copy of the source to play around with yourself if you like.

Steve


Top
 Profile  
 

Display posts from previous:  Sort by  
Reply to topic  [ 65 posts ]  Go to page 1, 2, 3, 4, 5  Next


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

It is currently Thu Aug 21, 2014 3:12 am

The contents of this webpage are copyright © 2003-2014 CCTVForum.com. All Rights Reserved.