camerahacking Forum Index  
 FAQ  •  Search  •  Memberlist  •  Usergroups   •   fChat   •  Register  •  Profile  •  Log in to check your private messages  •  Log in
 mediadownload (for pv2s and saturns on linux) View next topic
View previous topic
Post new topicReply to topic
Author Message
enigma-



Joined: 30 Aug 2005
Posts: 1256
Location: Kokiri Forest, Hyrule

PostPosted: Sat Dec 08, 2007 9:24 pm Reply with quoteBack to top

collaboration from anewguy, saturnnights and myself have created a new app for both pv2s and saturn camcorders. Works very similar to avidownload for the camcorders and for the pv2s it records the pictures to a pv2_pics folder in your /home folder. requires all of the normals (libusb) as well as imagemagick in order for the raw files to be converted to .jpgs
http://jeff.crowell.googlepages.com/mediadownload.tar.gz

_________________
Image
View user's profileSend private messageVisit poster's websiteAIM AddressMSN Messenger
enigma-



Joined: 30 Aug 2005
Posts: 1256
Location: Kokiri Forest, Hyrule

PostPosted: Fri Feb 01, 2008 2:29 pm Reply with quoteBack to top

well, just got to testing it on PPC, works fine with the saturn, but I had errors with a PV2
Code:
ibook:/home/jeff/mediadownload/src# ./mediadownload
INFO: Closing any opened devices...
INFO: Open devices closed.
INFO: Scanning USB bus 0 ...
INFO: USB device with VID: 0x0dca, PID: 0x0027 on bus 0
INFO: Device found: SMaL BAD VID: 0x0DCA, PID: 0x0027
INFO:  Device is a camera
INFO: USB device configured and interface claimed
INFO: Loading .saturnkeys from home directory...
INFO: Sending bulk-only mass storage reset
INFO: Requesting challenge from camera
INFO: Closing any opened devices...
INFO: Open devices closed.
INFO: Closing any opened devices...
INFO: Open devices closed.
INFO: Scanning USB bus 0 ...
INFO: USB device with VID: 0x0dca, PID: 0x0027 on bus 0
INFO: Device found: SMaL BAD VID: 0x0DCA, PID: 0x0027
INFO:  Device is a camera
INFO: USB device configured and interface claimed
INFO: Sending bulk-only mass storage reset
INFO: Received challenge from camera
INFO: Comparing CronusKe key to challenge
INFO: Comparing CronusKey key to challenge
INFO: Comparing CronusKe key to challenge
INFO: Comparing tux<><><RED><>< key to challenge
INFO: Challenge matches tux<><><RED><>< key
INFO: Sending response
INFO: Succeeded at unlocking camera.
***This key has not been reused before!! Please report this to camerahacking.com!!

INFO: Downloading media to /root/pv2_pics/2008.02.01_09.33.53AM/
INFO: Download from camera.....
convert: unable to open image `*.ppm': No such file or directory.
INFO: Checking directory location..
INFO: Checking picture count..
ERROR: Read FAT failed.
WARNING:  No pictures to download..
INFO: Downloads completed.
INFO: Closing any opened devices...
INFO: Open devices closed.
 
*******************************************************************
*                                                                 *
*                Picture Downloads Completed                      *
*                                                                 *
* Press Any Key To Close This Window.........                     *
*                                                                 *
*******************************************************************


maybe it is just the one camera, so i will try it with others

_________________
Image
View user's profileSend private messageVisit poster's websiteAIM AddressMSN Messenger
SaturnNiGHTS



Joined: 24 May 2006
Posts: 984
Location: Nightopia

PostPosted: Fri Feb 01, 2008 9:24 pm Reply with quoteBack to top

well, i put some work into avidownload making sure everything was endian-neutral, so all would work sound. i never looked at the pv2's code, and it wasn't developed with anything but intel x86 in mind, so i think that might be the problem.

the only people that would know for sure would be the original devs of pv2tool.

_________________
amount of hardware hacked:

enough to be forum administrator

http://www.dynarec.net/blog/

author of avidownload
co-author of mediadownload
current maintainer of ops-win32
half-ass developer of the new all-platform ops
View user's profileSend private messageVisit poster's websiteAIM Address
enigma-



Joined: 30 Aug 2005
Posts: 1256
Location: Kokiri Forest, Hyrule

PostPosted: Fri Feb 01, 2008 10:12 pm Reply with quoteBack to top

tried it with a bunch of other pv2s, no joy.
is ygfperson the orig. developer?

_________________
Image
View user's profileSend private messageVisit poster's websiteAIM AddressMSN Messenger
SaturnNiGHTS



Joined: 24 May 2006
Posts: 984
Location: Nightopia

PostPosted: Sat Feb 02, 2008 8:23 am Reply with quoteBack to top

enigma- wrote:
tried it with a bunch of other pv2s, no joy.
is ygfperson the orig. developer?


well, it would be the devs of pv2tool and pv2fetch for windows. so my guess is billw, morcheeba, forkboy, etc. the founders, if you will.

_________________
amount of hardware hacked:

enough to be forum administrator

http://www.dynarec.net/blog/

author of avidownload
co-author of mediadownload
current maintainer of ops-win32
half-ass developer of the new all-platform ops
View user's profileSend private messageVisit poster's websiteAIM Address
anewguy



Joined: 09 Sep 2007
Posts: 231

PostPosted: Sat Feb 23, 2008 9:39 pm Reply with quoteBack to top

Where is the ".ppm" file suffix being introduced? It seems to me, when I was working on the non-JPG version of all of this, that the file type was ".raw". If the ".ppm" was introduced as part of the JPEG conversion stuff, I would suggest looking there. As far as I can remember, from the people who did test the version I had out last prior to the addition of JPEG conversion, the program was working well. That's why I would think you should look there - I suspect the file name is being corrupted from .raw to .ppm, but it's been a while and I haven't paid any attention since the non-JPEG version I developed from pv2tool and SaturnNights' avidownload has been working great for me in Ubuntu.

EDIT: just download your tar and have been looking in the source. In camera_download.c you have added a system call to convert all .ppm to .jpg, yet you haven't let the code actually download any pictures yet. I think you will need to check the functions in this section of code to see what you've hacked.

Also, IF I remember correctly (beleieve me, a mind is a terrible thing to waste and I "wasted" mine when I was younger so my memory isn't the best!), I think I took avidownload and pv2tools for Linux to make the meld, looking at the windows version of pv2tools when needed for some clarification. Don't know if that helps or not.

EDIT-EDIT: I think it would be best to also offer the original that just outputs the .raw images and let people be able to work with that. The code is much smaller, and many of the image processors can load in a raw image. In this manner, until you fix your JPEG conversion stuff, there will be a working version available. Also, try your "failed" cameras on the pre-JPEG conversion program and see if they work there or not, then post the results back here. Should help you troubleshoot where the error is being introduced. Remember the camera must have at least 1 picture on it or the run is probably either going to say no pictures found or abort on some silly error - I never checked that yet.

EDIT-EDIT-EDIT: Look at the terminal output you posted - it appears the process ran as it was supposed to. You apparently had no .ppm image in the date/time folder, so your external "convert" process is letting you know there is nothing to convert. The rest of the code is telling you 2 things:

1. The key it used to unlock has no been found before. I left the code in that says to post it since originally that's what was happening - posting working codes. I'm not sure if that is allowed now or not.

2. There are no images on the camera to download.

I would make the following suggestion to you:

wait until the pictures download, then, and only then, if the count if pictures is greater than zero, do your call to "convert". Otherwise you are accomplishing nothing.
View user's profileSend private message
SaturnNiGHTS



Joined: 24 May 2006
Posts: 984
Location: Nightopia

PostPosted: Sun Feb 24, 2008 12:34 am Reply with quoteBack to top

i would really rather it if you allowed straight output to .raws with a command line switch. i do a lot of preprocessing in gimp before exportation, so i'd like the images before jpeg artifaction.

_________________
amount of hardware hacked:

enough to be forum administrator

http://www.dynarec.net/blog/

author of avidownload
co-author of mediadownload
current maintainer of ops-win32
half-ass developer of the new all-platform ops
View user's profileSend private messageVisit poster's websiteAIM Address
anewguy



Joined: 09 Sep 2007
Posts: 231

PostPosted: Sun Feb 24, 2008 4:36 am Reply with quoteBack to top

SaturnNiGHTS wrote:
i would really rather it if you allowed straight output to .raws with a command line switch. i do a lot of preprocessing in gimp before exportation, so i'd like the images before jpeg artifaction.


Couldn't agree more! In fact, I'd rather it just didn't do any other processing at all. It help keeps the code all internal (no system calls for external conversion programs) and really keeps the code considerably smaller. If JPEG conversion was to be done via a command switch, I would rather that it be a 2-step process -> first the download program, then a separate program to do the conversion. The download program should only process and create raw image files, nothing else.

If someone has a site available, I could give you the code I have that works but without the added jpeg stuff from enigma. It does handle BOTH the camcorders and the digital cameras fine for me. I just don't have a site to post it to, plus you would probably want to change the name as the source, etc., is just as avidownload - only the executable has a different name. I really didn't want to get involved in posting, etc., of the code - I just wanted something that worked. If needed, I can look at creating a program to convert the raw images separately - I just don't think any conversion is needed.
View user's profileSend private message
anewguy



Joined: 09 Sep 2007
Posts: 231

PostPosted: Wed Feb 27, 2008 10:46 pm Reply with quoteBack to top

Enigma:

If you're working with an Apple PPC, let me know. I know the code the got melded together, especially that of pvtools, did look at endian vs none. The thing I'm not sure of, and a quick review of the code by you would note it, is whether I took out the "#ifdef" in the headers, etc., where it was checking for Windows versus Linux. If so, you could probably add that back in and try to compile again on the ppc to see if it would work. I have the source here for what I did and will check it later. I know the LSB/MSB stuff gets confusing to some.
View user's profileSend private message
enigma-



Joined: 30 Aug 2005
Posts: 1256
Location: Kokiri Forest, Hyrule

PostPosted: Wed Mar 12, 2008 8:06 pm Reply with quoteBack to top

saturnnights/anewguy:
sorry, I haven't had much time to check around here as of late.

1.) I will add a switch to allow jpg conversion.
(eta: this weekend, tomorrow is my birthday, and fridays I usually dont do any coding)

2.) IIRC I made two calls to convert to PPM, the first always fails, becauase I put it in too early, When I made the second call for PPM, I left the first one in. Lazyness rears its ugly head. My iBook has been under my ever growing pile of homework that I fail to complete (2 thesis papers due really soon Sad)
The problem is reading the FAT.
I'll check for any issues, I'll try a different distro, because my dist-upgrade did give me some weird errors.

anything else?

_________________
Image
View user's profileSend private messageVisit poster's websiteAIM AddressMSN Messenger
crazymonkey



Joined: 15 Sep 2008
Posts: 7

PostPosted: Tue Sep 16, 2008 3:35 am Reply with quoteBack to top

Any chance there's a newer version?

I'm stuck trying to compile this on an intel mac (10.5):

cam_unlock.c: In function ‘camera_Unlock’:
cam_unlock.c:304: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
cam_unlock.c:305: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
camera_download.c: In function ‘pv2_download_pictures’:
camera_download.c:123: warning: pointer targets in passing argument 1 of ‘pv2_savetofile’ differ in signedness
camera_download.c: In function ‘pv2_getpiclist’:
camera_download.c:354: warning: comparison is always false due to limited range of data type
camera_download.c: In function ‘pv2_savetofile’:
camera_download.c:425: warning: pointer targets in passing argument 1 of ‘fopen’ differ in signedness
camera_download.c:429: warning: pointer targets in passing argument 1 of ‘strrchr’ differ in signedness
camera_download.c:429: warning: pointer targets in assignment differ in signedness
camera_download.c:436: warning: pointer targets in passing argument 1 of ‘snprintf’ differ in signedness
camera_download.c:437: warning: pointer targets in passing argument 1 of ‘fopen’ differ in signedness
camera_download.c:442: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness
camera_download.c:442: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness
camera_download.c:444: warning: pointer targets in passing argument 1 of ‘fopen’ differ in signedness
dcraw.c:45:21: error: jpeglib.h: No such file or directory
dcraw.c:48:18: error: lcms.h: No such file or directory
dcraw.c:1943: error: syntax error before ‘fill_input_buffer’
dcraw.c:1943: error: syntax error before ‘cinfo’
dcraw.c: In function ‘fill_input_buffer’:
dcraw.c:1950: error: ‘cinfo’ undeclared (first use in this function)
dcraw.c:1950: error: (Each undeclared identifier is reported only once
dcraw.c:1950: error: for each function it appears in.)
dcraw.c:1952: error: ‘TRUE’ undeclared (first use in this function)
dcraw.c: In function ‘kodak_jpeg_load_raw’:
dcraw.c:1957: error: storage size of ‘cinfo’ isn’t known
dcraw.c:1958: error: storage size of ‘jerr’ isn’t known
dcraw.c:1959: error: ‘JSAMPARRAY’ undeclared (first use in this function)
dcraw.c:1959: error: syntax error before ‘buf’
dcraw.c:1960: error: ‘pixel’ undeclared (first use in this function)
dcraw.c:1960: error: subscripted value is neither array nor pointer
dcraw.c:1967: error: ‘TRUE’ undeclared (first use in this function)
dcraw.c:1976: error: ‘buf’ undeclared (first use in this function)
dcraw.c:1977: error: ‘j_common_ptr’ undeclared (first use in this function)
dcraw.c:1977: error: ‘JPOOL_IMAGE’ undeclared (first use in this function)
dcraw.c:1982: error: syntax error before ‘)’ token
dcraw.c:1982: error: syntax error before ‘)’ token
dcraw.c: In function ‘apply_profile’:
dcraw.c:6765: error: ‘cmsHPROFILE’ undeclared (first use in this function)
dcraw.c:6765: error: syntax error before ‘hInProfile’
dcraw.c:6766: error: ‘cmsHTRANSFORM’ undeclared (first use in this function)
dcraw.c:6770: error: ‘LCMS_ERROR_SHOW’ undeclared (first use in this function)
dcraw.c:6772: error: ‘hInProfile’ undeclared (first use in this function)
dcraw.c:6784: error: ‘hOutProfile’ undeclared (first use in this function)
dcraw.c:6801: error: ‘hTransform’ undeclared (first use in this function)
dcraw.c:6801: error: ‘TYPE_RGBA_16’ undeclared (first use in this function)
dcraw.c:6802: error: ‘INTENT_PERCEPTUAL’ undeclared (first use in this function)
View user's profileSend private message
anewguy



Joined: 09 Sep 2007
Posts: 231

PostPosted: Tue Sep 16, 2008 5:59 am Reply with quoteBack to top

I'd try getting the version without ANY conversions in it - just the basic download and output of either the video or of raw images. As SaturnNights and myself have said, in the long run it is far better to leave any image processing external to the downloading process. We prefer the raw downloads and using another program to process the raw images afterwards.

If you need a copy of source for just downloading and outputting raw images without the conversions let me know and I'll see if I still have the source. I did convert it all to be windowed using GTK in Linux if you want to try that source as well (requires GTK development libraries).

Dave
View user's profileSend private message
SaturnNiGHTS



Joined: 24 May 2006
Posts: 984
Location: Nightopia

PostPosted: Tue Sep 16, 2008 2:03 pm Reply with quoteBack to top

--waves to anewguy-- hey, i'm alive! i've got a couple of projects running at same time, but i haven't forgotten you. i'm sorry about the ball drop on my side.

_________________
amount of hardware hacked:

enough to be forum administrator

http://www.dynarec.net/blog/

author of avidownload
co-author of mediadownload
current maintainer of ops-win32
half-ass developer of the new all-platform ops
View user's profileSend private messageVisit poster's websiteAIM Address
anewguy



Joined: 09 Sep 2007
Posts: 231

PostPosted: Wed Sep 17, 2008 5:52 pm Reply with quoteBack to top

SaturnNiGHTS wrote:
--waves to anewguy-- hey, i'm alive! i've got a couple of projects running at same time, but i haven't forgotten you. i'm sorry about the ball drop on my side.


Hi!!!! --waves back energetically-- I've been busy myself on a couple of other projects (a simple web site for a friends' business and a larger project I decided to tackle that I'm still working through the design of the database for). I haven't even been around the forums for quite a while until I got a notice yesterday that someone had posted to this thread. Hope everything's great with you!
View user's profileSend private message
SaturnNiGHTS



Joined: 24 May 2006
Posts: 984
Location: Nightopia

PostPosted: Thu Sep 18, 2008 5:48 am Reply with quoteBack to top

anewguy wrote:
SaturnNiGHTS wrote:
--waves to anewguy-- hey, i'm alive! i've got a couple of projects running at same time, but i haven't forgotten you. i'm sorry about the ball drop on my side.


Hi!!!! --waves back energetically-- I've been busy myself on a couple of other projects (a simple web site for a friends' business and a larger project I decided to tackle that I'm still working through the design of the database for). I haven't even been around the forums for quite a while until I got a notice yesterday that someone had posted to this thread. Hope everything's great with you!


things are going pretty well, thanks. back in college, still working like a nut at my primary job [jobs?]. reverse engineering a couple of things, doing a couple of ambitious projects, but i've made a reappearance on here.

_________________
amount of hardware hacked:

enough to be forum administrator

http://www.dynarec.net/blog/

author of avidownload
co-author of mediadownload
current maintainer of ops-win32
half-ass developer of the new all-platform ops
View user's profileSend private messageVisit poster's websiteAIM Address
stevetamis0



Joined: 30 Oct 2009
Posts: 2

PostPosted: Fri Oct 30, 2009 7:20 am Reply with quoteBack to top

Hi...
Thanks for sharing the information also the link which you share is really good...

_________________
ds r4
View user's profileSend private messageSend e-mail
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic
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 vote in polls in this forum