chdkptp - alternative ptp client - page 71 - General Discussion and Assistance - CHDK Forum

chdkptp - alternative ptp client

  • 1106 Replies
  • 517697 Views
Re: alternative ptp client
« Reply #700 on: 07 / August / 2014, 13:20:32 »
Advertisements
In practice, in its simplest form, an mjpeg is just a concatenation of jpeg files, one after the other in the same file. So almost the same way chdkptp outputs netbpm. Sometimes the single frames of mjepg are separated with a line of ascii code - usually just

Code: [Select]
...
<binary jpg data>
--7b3cc56e5f51db803f790dad720ed50a
<binary jpg data>
--7b3cc56e5f51db803f790dad720ed50a
<binary jpg data>
...

not a big deal, so i will just use ffmpeg / avconv or encodedv and see what produces the best / fastes results. I will report back when i found something more useful. You already mentioned the reason why i want to produce mjpeg: so i stay compatible with Canons native Live View streams which are mjpegs and i can use both as input for further processing and play them in webbrowsers. right now i am just doing a little testing. I look for a replacement of the Logitech HD C920 Webcam. Some years ago Sony DV Camcorders could have been used as DirectX "webcams" or as /dev/video0 on linux. Current camcorders only offer analog output or HDMI-Out but HDMI-In isnt that common on computers. Current webcams are just unsatisfying in comparison to 6 to 7 years old camcorders and i still believe there is something out there with a much better still image quality than a webcam, acceptable live view quality (for preview) and - if possible - halfway cheaper than DSLRs.

Like i said... i will report back later on.

Btw.: Thank you again for adding the continous ppm stream, it's really helpful! :)
« Last Edit: 07 / August / 2014, 13:26:10 by ladiko »

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #701 on: 09 / August / 2014, 23:45:15 »
Thinking about this http://chdk.setepontos.com/index.php?topic=11527.0 I realized that rsint could work the same way.

I've added this in chdkptp r652. By default, rsint now uses the new method, but continuous mode + shoot hooks can be selected by passing -cont

The new mode has several advantages:
* It doesn't require continuous mode. This is nice because remoteshoot in continuous mode has problems on some cams. Also some cams do not save the continuous setting between reboots.
* It doesn't require CHDK 1.3 shoot hooks.
* You can quit without taking a shot (use q at the rsint prompt)
* Exposure changes should affect the next shot, rather than the following shot.

Based on the testing in the linked thread, the max speed shouldn't be much different. The latency between issuing and s command and the shot being taken should be better in continuous mode.
Don't forget what the H stands for.

*

Offline ahull

  • *****
  • 634
Re: alternative ptp client
« Reply #702 on: 10 / August / 2014, 09:05:04 »
For what its worth, changing the <ALT> key on the Ixus 100 /SD780IS from [Playback] to [Display] results in the camera crashing when I connect it to CHDK-PTP.

I updated the SD780IS Wikia entry to point this out.

I'm not sure if its a bug worth fixing, but it did cause me a bit of head scratching.

Also some of the camera modes look to be incorrect in CHDK-PTP for this particular camera.
Any developer, PM me if you want more details, to save cluttering up this thread.

Re: alternative ptp client
« Reply #703 on: 10 / August / 2014, 10:23:28 »
I'm not a developer, but tell me about the camera modes and I will check if it's the same with the a2500.


*

Offline ahull

  • *****
  • 634
Re: alternative ptp client
« Reply #704 on: 10 / August / 2014, 11:19:26 »
nafraf contacted me and we are working through the modes to fix this. This problem will be camera specific. 

I've sent him a revised list of the modes on the Ixus 100, based on what I see in Propcase 49, and he will send me a test version of CHDK with these revised modes when he gets a chance.

If you want to confirm the modes are correct on your A2500, connect the camera and select each mode from the drop down list in the CHDK-PTP UI. The camera should change to the correct mode each time.

In the case of the Ixus 100, it was selecting some modes incorrectly and a couple were missing.

I had a similar issue while we were porting the Ixus Wireless a while back, so I had a pretty good idea what was required of us to fix it.

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #705 on: 10 / August / 2014, 14:58:20 »
For what its worth, changing the <ALT> key on the Ixus 100 /SD780IS from [Playback] to [Display] results in the camera crashing when I connect it to CHDK-PTP.
It's very hard to see how the alt key assignment could cause this, mode switching doesn't have anything to do with the alt key. I guess maybe if the key masks were messed up...
Don't forget what the H stands for.

*

Offline ahull

  • *****
  • 634
Re: alternative ptp client
« Reply #706 on: 10 / August / 2014, 15:19:21 »
I'll test again with the latest build when I get a chance, perhaps tomorrow.

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #707 on: 10 / August / 2014, 15:24:54 »
I'll test again with the latest build when I get a chance, perhaps tomorrow.
A romlog from the crash might provide some clues.
Don't forget what the H stands for.


Re: alternative ptp client
« Reply #708 on: 12 / August / 2014, 03:36:57 »
I tried installing and starting chdkptp on Ubuntu 14.04 32bit this way:

Code: [Select]
#!/bin/bash

# variables
IUP_FILE=iup-3.11_Linux32_lib.tar.gz
CD_FILE=cd-5.8_Linux32_lib.tar.gz
CHDKPTP_DIR=${HOME}/chdkptp/trunk

# install iup
if [ ! -e ${HOME}/iup/${IUP_FILE} ] ; then
        mkdir -p ${HOME}/iup
        cd ${HOME}/iup
        wget -N --trust-server-names 'http://downloads.sourceforge.net/project/iup/3.11/Linux%20Libraries/iup-3.11_Linux32_lib.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fiup%2Ffiles%2F3.11%2FLinux%2520Libraries%2F&ts=1407825526&$
        tar xpvzf ${IUP_FILE}
        sudo bash ${HOME}/iup/install
        cd ${HOME}
fi

# install cd
if [ ! -e ${HOME}/cd/${CD_FILE} ] ; then
        mkdir -p ${HOME}/cd
        cd ${HOME}/cd
        wget -N --trust-server-names 'http://downloads.sourceforge.net/project/canvasdraw/5.8/Linux%20Libraries/cd-5.8_Linux32_lib.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fcanvasdraw%2Ffiles%2F5.8%2FLinux%2520Libraries%2F&ts=1$
        tar xpvzf ${CD_FILE}
        sudo bash ${HOME}/cd/install
        cd ${HOME}
fi

sudo aptitude install -q=2 -y liblua5.2-dev libusb-dev

if [ -e ${CHDKPTP_DIR} ] ; then
        cd ${CHDKPTP_DIR}
        svn update
else
        svn checkout http://subversion.assembla.com/svn/chdkptp/
        cd ${CHDKPTP_DIR}
fi

cp ${CHDKPTP_DIR}/config-sample-linux.mk ${CHDKPTP_DIR}/config.mk
make all

# only need if you have compiled IUP support and have NOT installed the libraries to system directories
export LD_LIBRARY_PATH=${HOME}/iup:${HOME}/cd
export LUA_PATH="${CHDKPTP_DIR}/lua/?.lua"
./chdkptp "$@"
echo -e "\n$?"

if i start the script with ${HOME}/chdkptp.sh -g i get:
Code: [Select]
Updating '.':
At revision 652.
make[1]: Entering directory `/home/ladiko/chdkptp/trunk/lfs'
make[1]: Leaving directory `/home/ladiko/chdkptp/trunk/lfs'
starting gui...
gui not supported
1
« Last Edit: 13 / August / 2014, 00:01:57 by ladiko »

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #709 on: 12 / August / 2014, 18:04:03 »
I tried installing and starting chdkptp on Ubuntu 14.04 32bit this way:
You need to edit config.mk to enable IUP and CD support, and set the include and library paths. These are fairly well commented in in the -sample file. After you change config.mk, you should rebuild with
make clean all

In general, I would not suggest having your chdkptp script try to download and build everything.
Don't forget what the H stands for.

 

Related Topics