Steve Evans
Members-
Content Count
23 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Everything posted by Steve Evans
-
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
-
My app is the java applet from the web page with an application wrapped around it to provide the buttons etc. It's not based on Video Server E, and it is entirely possible that Video Server E has broader support. That makes sense as the applet on which my application is based would normally only be run for my specific machine, and so should only be expected to support it, whereas Video Server E would need broader compatibility. Steve
-
I wasn't aware that there was a new model. Is there a firmware upgrade or is it new hardware? Steve
-
Cheers Mike. I've not tried Vista. It really ought to work; I'll take a look when I get the chance. Steve
-
See http://www.megaupload.com/?d=YSR3GWPS for jar file containing source. I've tested it with 4 and 16 channels. For those who want a Mac app, the icon is in the Jar, so use the Jar bundler as described elsewhere in this thread. The app no longer prompts for login details - you need to enter those on the command line. Steve
-
Having looked at the HTML source I browsed to http://:/application.jar on my DVR to download the applet. I then used the jad java decompiler, which is, I must say, very impressive. See http://www.kpdus.com/jad.html. I then needed to convert the applet to a java application, and this required writing the code to handle the button presses that would normally be handled by the browser. I didn't encounter any ActiveX nastiness, which is as well as I use a Mac!!!! Any suggestions as to the best way to get a cut of the source to those who might want a copy to play with? Steve
-
The source code I have based my app on is the applet downloaded from my DVR760. This code contains support for a number of machines of two different basic types: The initial login looks like the following: Get /Login.cgi?Username=admin&Password=admin&Applet=1 HTTP/1.1 Accept: */* Accept-Language: zh-tw Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Host: 10.50.0.46 Connection: Keep-Alive HTTP/1.0 200 OK Content-Length: 122 Content-type: application/AV-TECH Video Server Server: AV-TECH AV787 Video Web Server Connection: close Session-ID=CA91911DE6534538C142E33EFA00D9;Firmware-Version=2020;Product-ID=783E;MAC-Address=000e53XXXXXX;Host-Name=AV732E; The client thus gets passed back a ProductID which is one of: 732E 783E 785E 787E 775W 777W 940C 940W I'm not sure what machines these actually correspond to, but the DVR760 reports itself as a 783E and proceeds on that basis. There seem to then be two basic second stage login processes, one for the 78x machines, and one for the others. I've not looked too much at the detail of the HTTP login process, but I'd not be at all surprised if the 780 has a different protocol again. Just grabbing the applet for the 780 machine, decompiling it, and then calling it from a Java app should work I'd have thought. I'm more than happy for folks to have the source for my port of my application. To be honest the whole thing is a bit untidy; the applet on which it is based mixed up processing and GUI threads horribly, so there are more threads trying to update the display than the main dispatch thread. This is why you may have noticed that the control buttons can sometimes take a while to appear when the application is first launched, and there could be other side effects. It would have been nice to just be able to download the applet from any given machine, and just put a wrapper around it to provide an application GUI framework, but it's not quite so clean. Steve
-
PM me your email address and I'll send you something. Steve
-
Sorry, Tim, I appreciate that unless you're a software engineer, or at least a hacker!, my last reply won't be very helpful. I've just taken a look at the web interface that my DVR spits out, and clearly the missing codes are there to see, but I don't know if they are necessarily correct for an 8 or 16 channel machine. If you have a 16 channel machine I can talk to over the net, I'll happily try these additional codes for you, and let you have the result. Steve
-
Hi Tim, I have no way to test any DVR other than mine, but the basic operation of the app is to have the motion JPEG feed from the device displayed on the left, with buttons on the right, each of which is configured to send a specific code to the DVR when clicked. For example the following line of code causes the code 23 to be sent when '1' is clicked. cctvButtons.add(new CctvButton(cctvLayout, c, "1", 23)); It would be trivial to add additional codes, if known, but, like I say, I'm not able to do this without hardware to test against. I'm happy to let you have the source code, which you should find easy enough to modify according to your needs. Steve
-
LOL! How's about that for timing!
-
See the instructions for modifying the CCTV.app/Contents/Info.plist file to include an Arguments clause on page 1 of this post if you want to avoid running the Jar Bundler yourself. As I've already run it to create the CCTV.app, it's probably easier for you to click on the CCTV application, select Show Package Contents, and then perform the above edit to automatically connect to a given machine. You can even have multiple copies of the app (yeah, I know that doesn't scale well) to access more than one machine. Steve
-
Option 1 is effectively there as the java application takes hostname, port, username and password from the command line. Using the Jar Bundler application from Apple's X-Code (under Developer/Applications/Utilities) you can create applications that will automatically invoke using your parameters of choice. This is how I run mine - a single click on the dock and I'm in. I can see the benefit of option 2, but to be honest, it's not something I really needed. If I revisit the app, I'll certainly look at revamping the control panel aspect of it. Steve
-
.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/learn/midp/lifecycle/#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
-
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
-
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
-
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
-
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
-
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: $ 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: <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
-
I did, but I found that I had to enter the IP address of the SMTP server as the hostname was not being resolved. Steve
-
Hi, I've been using an AVTECH DVR accessed using Firefox running under OS X. Recently Firefox has been updated, and the OS upgraded to 10.5.3. Somewhere along the line the java applet has stopped working; the buttons etc are all shown, but the video fails to display. I downloaded the application.jar from the DVR and decompiled it to find the following start routine for the applet. public void start() { try { File file = new File("abc"); fout = new FileOutputStream(file, true); fout.close(); file.delete(); file = null; t_master = new Thread(this); t_master.start(); Thread thread = new Thread(F_Decode); thread.setPriority(8); thread.start(); t_Picture = new Thread(F_Picture); t_Picture.setPriority(8); t_Picture.start(); } catch(FileNotFoundException filenotfoundexception) { System.out.println(filenotfoundexception); } catch(SecurityException securityexception) { System.out.println("No signed"); } catch(IOException ioexception) { System.out.println(ioexception); } } Unfortunately the "abc" test file is being created without an absolute path, and the current Java implementation is failing this as a security exception, reporting it in the java console. Had a full path been given I don' think this would have been a problem. I've not been able to determine where the default directory being used by Firefox to store such temporary files is, and thus have been unable to check the directory permissions. Everything works fine from a PC running Firefox. Oddly the applet works the first time Firefox is run after it is installed under OS X, but thereafter it fails. Has anybody else seen this? How can such bugs/issues be fed back to AVTECH for consideration? Cheers, Steve
-
AVTECH Java Applet problem under OS X Firefox
Steve Evans replied to Steve Evans's topic in Digital Video Recorders
The resolution is exactly what you get with the web access from a PC to an avtech DVR. Steve -
AVTECH Java Applet problem under OS X Firefox
Steve Evans replied to Steve Evans's topic in Digital Video Recorders
OK Perhaps this is more of a DVR than a software question. Could a moderator please move this to the appropriate forums? Thanks, Steve