photocon

Rating: 
5
Your rating: None Average: 5 (3 votes)

Console tool for SFOS to take a picture with front or back camera. Compiled with 2.2.1.18 tested with 3.0.0.8 on Jolla C. Get help with --help or -h.

 

Example to take a picture with the front camera:

photocon cam=2

Pictures get saved as:

/home/nemo/Pictures/IMG_xxxxxxxx.jpg

Take a focused picture with back(primary) camera, Version 0.0.2 (3.1.0.12):

photocon cam=1 --focus

Application versions: 
AttachmentSizeDate
File photocon-0.0.1-1.armv7hl.rpm14.49 KB21/10/2019 - 23:55
File photocon-0.0.2-1.armv7hl.rpm14.16 KB22/10/2019 - 23:05
File photocon-0.0.3-1.armv7hl.rpm17.09 KB27/10/2019 - 22:00
Changelog: 

* Sun Oct 27 2019 Halftux 0.0.3-1
- added info mode
- added flash option
- added Focus:Failed to std out
- compiled with 3.1.0.12

* Tue Oct 22 2019 Halftux 0.0.2-1
- changed to primary and secondary
- manual focus switch
- compiled with 3.1.0.12

* Mon Oct 21 2019 Halftux 0.0.1-1
- Initial release
- compiled with 2.2.1.18

Comments

ezameht's picture

Is there a way to automatically take a picture every x seconds?
And are there any plans for a videocon-app?
Thanks again for photocon!

szopin's picture

You could use 'watch -n (seconds) photocon' for this and just run the photocon repeatedly this way, or does it expect user input?

halftux's picture

There is no user input. This should work you could only run into problems below one second, when the delay is not long enough to take a picture.

Or something like focusing once and then take many pictures as fast as possible would not work.

halftux's picture

At the moment this option is not available, will think about it for next release.

A videocon app is not planned, when I am bored and have time I could give a try, but don't count on it.

You are welcome and thx for feedback.

ezameht's picture

The console shows an error, but the picture is taken:

,---
| Sailfish OS 3.1.0.11 (Seitseminen)
'---
[nemo@Sailfish ~]$ photocon flash=off --focus
[W] unknown:0 - Starting camera without viewfinder available

(photocon:17007): GStreamer-CRITICAL **: 19:30:21.116: Registering meta implementation 'NemoGstBufferOrientationMeta' without init function
[D] unknown:0 - Focusing...
Captured:/home/nemo/Pictures/IMG_00000003.jpg

halftux's picture

Yes the error is normal. I am guessing it is because the camera is started without a viewfinder and the application has no orientation gestreamer throws an error. I think qcamera was not to be meant to be used in a none gui application. I wanted to make a dummy viewfinder which is not shown, but for SFOS there are no multimedawidgets.

ezameht's picture

thanks! Works great.

halftux's picture

Thats nice btw on which device and which OS version?

ezameht's picture

XA2 Plus on 3.1.0.11

ezameht's picture

How to disable flash?

halftux's picture

It looks like you don't have the latest version installed :p.

Please download the new uploaded version 0.0.3 and there you could disable the flash by setting the option "flash=off".

Mick's picture

Getting same results with this update.
Maybe it's because I'm using Sony Xperia X. I'll give it a go with my Jolla 1 sometime.

halftux's picture

Yeah would be nice to know if front camera is working. For me Jolla 1 on 3.1.0.11 only back camera is working, but also stock camera software can't open front camera (maybe hardware fault).

And Jolla C on 3.0.0.8 everything is working as it should.

Mick's picture

Gave it a test on 3.1.0.11, but getting varied results and terminal displays:-

[nemo@Sailfish ~]$ photocon cam=1
[W] unknown:0 - Starting camera without viewfinder av
ailable

(photocon:18722): GStreamer-CRITICAL **: 23:20:30.218
: Registering meta implementation 'NemoGstBufferOrien
tationMeta' without init function
[D] unknown:0 - Focusing...
[nemo@Sailfish ~]$.

halftux's picture

Thanks for report. Tried with Jolla on 3.0.3.10 compiled with newer sdk and it is also not working. Don't know which version will break/change qcamera and atm I have no fix.

halftux's picture

Released a new version at least the primary camera should work for SF>3.