liveview in EOS cameras

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

liveview in EOS cameras

Cake
Is it possible to put EOS cameras in live view mode and take a preview picture? In canon SDK, the live view can be set by setting the output property to PC. I used gphoto2 to listed the EOS property and noticed that there is a property to redirect the output to PC. I set that property to PC but the camera still not be in live view mode. Do I miss some steps?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: liveview in EOS cameras

Marcus Meissner
On Wed, Jul 04, 2012 at 07:31:13AM -0700, Cake wrote:
>
> Is it possible to put EOS cameras in live view mode and take a preview
> picture? In canon SDK, the live view can be set by setting the output
> property to PC. I used gphoto2 to listed the EOS property and noticed that
> there is a property to redirect the output to PC. I set that property to PC
> but the camera still not be in live view mode. Do I miss some steps?

gphoto2 --capture-preview    will bring it to live view mode and
download an image.

The options should also work, but wont transfer the image.

Ciao, Marcus

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gphoto-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: liveview in EOS cameras

vincent
Hello,
I'm using a Canon EOS 600D on UBUNTU and MAC OSX.
I'm trying to get the liveview into a browser.
So I use "gphoto2 --capture-preview" there is a "movie.mjpg" created and update along the capture.
But this file is unreadable by my browser (Chrome, FF, ...) Only first image is displayed. I also try to read this with VLC and GStreamer, both of them display video but not in live.

If anyone has an idea to help me, it would be really great.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: liveview in EOS cameras

vincent
Sorry I user "--capture-movie" and not "--capture-preview"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: liveview in EOS cameras

Marcus Meissner-4
In reply to this post by vincent
On Thu, May 30, 2013 at 01:39:13AM -0700, vincent wrote:

> Hello,
> I'm using a Canon EOS 600D on UBUNTU and MAC OSX.
> I'm trying to get the liveview into a browser.
> So I use "gphoto2 --capture-preview" there is a "movie.mjpg" created and
> update along the capture.
> But this file is unreadable by my browser (Chrome, FF, ...) Only first image
> is displayed. I also try to read this with VLC and GStreamer, both of them
> display video but not in live.
>
> If anyone has an idea to help me, it would be really great.

You will probably need to hook your CGI engine differently into
gphoto2.

Streaming jpeg will be hard to display.

Use some kind of client side JPEG displayer and fetcher that does
the fetching in a loop, and let your server side to feed out the current
preview image.

(Cannot really help with webstuff, sorry.)

Ciao, Marcus

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Gphoto-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: liveview in EOS cameras

jcupitt
In reply to this post by vincent
I wrote a gphoto GUI:


It does live preview and lets you browse and set any camera options. 

It's in Python (with a little c to decode the preview stream), so it should be easy to adapt for other things. 

John

On Thursday, 30 May 2013, vincent wrote:
Hello,
I'm using a Canon EOS 600D on UBUNTU and MAC OSX.
I'm trying to get the liveview into a browser.
So I use "gphoto2 --capture-preview" there is a "movie.mjpg" created and
update along the capture.
But this file is unreadable by my browser (Chrome, FF, ...) Only first image
is displayed. I also try to read this with VLC and GStreamer, both of them
display video but not in live.

If anyone has an idea to help me, it would be really great.



--
View this message in context: http://gphoto.10949.n7.nabble.com/liveview-in-EOS-cameras-tp4238p13291.html
Sent from the gphoto-user mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Gphoto-user mailing list
<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;Gphoto-user@lists.sourceforge.net&#39;)">Gphoto-user@...
https://lists.sourceforge.net/lists/listinfo/gphoto-user

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Gphoto-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: liveview in EOS cameras

Rupin
I am itching to try it, but what libraries and modules are required for this to run.

Also, will it allow me to pipe the live view output, so that I could stream it?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: liveview in EOS cameras

jcupitt
On 2 June 2013 14:48, Rupin <[hidden email]> wrote:
> I am itching to try it, but what libraries and modules are required for this
> to run.
>
> Also, will it allow me to pipe the live view output, so that I could stream
> it?

It uses pygtk for the GUI and libjpeg to decompress the live preview.
It calls into libgphoto2 directly with ctype. I don't remember any
other modules or libraries. It has some stuff in there to do
reflectance transform imaging, but that'd be easy to remove.

You'd need to hack the code about quite a bit to be able to stream to
a browser. I guess you'd need to recode as h.264 or similar.

John

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Gphoto-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: liveview in EOS cameras

Rupin

I did give it a shot. Install failed.
Have asked what could be a problem here
https://forum.openwrt.org/viewtopic.php?id=44503

If you do happen to check the above link, let me know if you have any pointers.

Rupin

On Jun 3, 2013 3:40 AM, <[hidden email]> wrote:
On 2 June 2013 14:48, Rupin <[hidden email]> wrote:
> I am itching to try it, but what libraries and modules are required for this
> to run.
>
> Also, will it allow me to pipe the live view output, so that I could stream
> it?

It uses pygtk for the GUI and libjpeg to decompress the live preview.
It calls into libgphoto2 directly with ctype. I don't remember any
other modules or libraries. It has some stuff in there to do
reflectance transform imaging, but that'd be easy to remove.

You'd need to hack the code about quite a bit to be able to stream to
a browser. I guess you'd need to recode as h.264 or similar.

John

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Gphoto-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: liveview in EOS cameras

Rupin
In reply to this post by jcupitt

Which command specifically available in gphoto2 did you use to get the live stream?

On Jun 3, 2013 3:40 AM, <[hidden email]> wrote:
On 2 June 2013 14:48, Rupin <[hidden email]> wrote:
> I am itching to try it, but what libraries and modules are required for this
> to run.
>
> Also, will it allow me to pipe the live view output, so that I could stream
> it?

It uses pygtk for the GUI and libjpeg to decompress the live preview.
It calls into libgphoto2 directly with ctype. I don't remember any
other modules or libraries. It has some stuff in there to do
reflectance transform imaging, but that'd be easy to remove.

You'd need to hack the code about quite a bit to be able to stream to
a browser. I guess you'd need to recode as h.264 or similar.

John

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Gphoto-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: liveview in EOS cameras

jcupitt
On 8 June 2013 04:33, Rupin Chheda <[hidden email]> wrote:
> Which command specifically available in gphoto2 did you use to get the live
> stream?

Have a look at the .preview() method in the Camera class. It calls
gp.gp_camera_capture_preview() to get the next frame of the preview
stream, then uses libjpeg to decompress that into a RGB buffer to be
painted to the screen. A timeout runs the preview at 20 fps.

I could get about 50 fps on my laptop, but I throttled the framerate
back a bit so as not to load the system too heavily.

John

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Gphoto-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: liveview in EOS cameras

Rupin

Does capture preview lead to a shutter click or does it just grab whatever the camera sensor sees? Does the camera need to be in live view for this to happen, because the mirror is blocking the path to the sensor.

On Jun 8, 2013 3:04 PM, <[hidden email]> wrote:
On 8 June 2013 04:33, Rupin Chheda <[hidden email]> wrote:
> Which command specifically available in gphoto2 did you use to get the live
> stream?

Have a look at the .preview() method in the Camera class. It calls
gp.gp_camera_capture_preview() to get the next frame of the preview
stream, then uses libjpeg to decompress that into a RGB buffer to be
painted to the screen. A timeout runs the preview at 20 fps.

I could get about 50 fps on my laptop, but I throttled the framerate
back a bit so as not to load the system too heavily.

John

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Gphoto-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: liveview in EOS cameras

jcupitt
It flips the mirror up for you when it starts live preview mode, there's no need for the operator to do anything. 

On Saturday, 8 June 2013, Rupin Chheda wrote:

Does capture preview lead to a shutter click or does it just grab whatever the camera sensor sees? Does the camera need to be in live view for this to happen, because the mirror is blocking the path to the sensor.

On Jun 8, 2013 3:04 PM, <<a href="javascript:_e({}, &#39;cvml&#39;, &#39;jcupitt@gmail.com&#39;);" target="_blank">jcupitt@...> wrote:
On 8 June 2013 04:33, Rupin Chheda <<a href="javascript:_e({}, &#39;cvml&#39;, &#39;rupin.chheda@gmail.com&#39;);" target="_blank">rupin.chheda@...> wrote:
> Which command specifically available in gphoto2 did you use to get the live
> stream?

Have a look at the .preview() method in the Camera class. It calls
gp.gp_camera_capture_preview() to get the next frame of the preview
stream, then uses libjpeg to decompress that into a RGB buffer to be
painted to the screen. A timeout runs the preview at 20 fps.

I could get about 50 fps on my laptop, but I throttled the framerate
back a bit so as not to load the system too heavily.

John

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Gphoto-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: liveview in EOS cameras

vincent
In reply to this post by Marcus Meissner-4
Hello,

After some research I found another solution to stream live view from CANON EOS 600D to web browser.
This solution is an update of this.
It's compose by 3 parts : GPhoto2 ffserver and avconv (previously ffmpeg) .

To test this solution follow this 3 steps :

FIRST

  launch ffserver
ffserver -d -f /etc/ffserver.conf

/etc/ffserver.conf contains this cleaned configuration inspired from here

Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -
NoDaemon

<Feed feed1.ffm>
        File /tmp/feed1.ffm
        FileMaxSize 200M
        ACL allow 127.0.0.1
</Feed>

<Stream test1.mpeg>
        Feed feed1.ffm
        Format mpeg
       
        AudioBitRate 32
        AudioChannels 1
        AudioSampleRate 44100
       
        VideoBitRate 64
        VideoBufferSize 40
        VideoFrameRate 20
        VideoSize 1056x704
        VideoGopSize 12
       
        NoAudio
</Stream>

<Stream stat.html>
        Format status
        ACL allow localhost
        ACL allow 192.168.0.0 192.168.255.255
</Stream>

<Redirect index.html>
        URL http://www.ffmpeg.org/
</Redirect>

SECOND

launch this command
gphoto2 --capture-movie --stdout | avconv -f mjpeg -i pipe:0 -r 20 http://localhost:8090/feed1.ffm

THIRD

Go to http://localhost:8090/stat.html
click on test1.mpeg

PROBLEM

As you can see, video is displayed but with a delay approximately 2 seconds and especially it's lowres and glitched.

I guess the problem comes from ffserver/avconv. I have certainly to fix configuration of VideoBitRate, VideoBufferSize, VideoFrameRate, VideoSize, VideoGopSize also codec used maybe other param ...
If someone has an idea a configuration to test it could be nice to share it  

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: liveview in EOS cameras

krizentherm
This post was updated on .
Thanks you Vincent, it works very good !

and you can use the command :

gphoto2 --capture-movie --stdout | avconv -f mjpeg -i pipe:0 -r 20 -b 20000k http://localhost:8090/feed1.ffm

for a best image quality, this is not affect the lag between reality and the movie, always 2 seconds ...

Anyone have found a solution to correct the lag ?

Thanks.

Martin.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: liveview in EOS cameras

maddin
In reply to this post by vincent
Hi everybody!

I really need your help!

I'm building a photo booth with a Raspberry Pi and a Canon EOS 600D.
The raspberry controls the DSLR (USB) and displays the pictures via HDMI.
Taking the pictures is working well.
I've got problems with live view and displaying the pictures in kinda a slide show.
What I want to do is a C/C++ script that opens the live view in fullscreen (if possible) or opens the taken pictures (also in fullscreen). Switching between those modes should happen by pushing a button.

There is not much information about live view with EOS but it seems you guys found a solution.

What do you think? What's the best solution to get a live view in fullscreen?
And for displaying the pictures quickly? SDL?

I really hope you guys may help me!!!!

Thank you so much!!

Maddin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: liveview in EOS cameras

shining2014
In reply to this post by vincent
But , how can you enter the second command
when i run ffserver , then it is not possible to enter the gphoto2 command...
could you help please?
Loading...