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
Take an one minute video:
photocon cam=1 path=/home/nemo/Videos/test.mp4 time=60 --video
To take a series of 10 photos with a delay of 2 seconds
photocon cam=1 delay=2 count=10
Attachment | Size | Date |
---|---|---|
![]() | 14.49 KB | 21/10/2019 - 23:55 |
![]() | 14.16 KB | 22/10/2019 - 23:05 |
![]() | 17.09 KB | 27/10/2019 - 22:00 |
![]() | 23.85 KB | 07/04/2021 - 17:15 |
* Tue Apr 06 2021 Halftux 0.1.0-1
- added video mode
- added photo series (delay/count)
- compiled with 3.4.0.24
* 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
sashikknox
Wed, 2021/04/07 - 19:12
Permalink
Nice tool, not test it.yet, but.good idea!
ezameht
Wed, 2021/04/07 - 17:21
Permalink
Thank you so much for the Update!
halftux
Wed, 2021/04/07 - 17:28
Permalink
You are welcome.
ekari
Sun, 2021/01/10 - 14:04
Permalink
Hey, thanks for this! Seems to be working fine on my XperiaXA2 with SailfishOS 3.4.0.24. It outputs some warnings, but images are captured ok.
halftux
Wed, 2021/04/07 - 17:28
Permalink
No problem, thanks for reporting.
ezameht
Fri, 2019/11/01 - 10:18
Permalink
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
Sat, 2019/11/02 - 14:50
Permalink
You could use 'watch -n (seconds) photocon' for this and just run the photocon repeatedly this way, or does it expect user input?
halftux
Sat, 2019/11/02 - 15:29
Permalink
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
Sat, 2019/11/02 - 14:26
Permalink
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
Mon, 2019/10/28 - 21:37
Permalink
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
Mon, 2019/10/28 - 22:32
Permalink
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
Mon, 2019/10/28 - 10:23
Permalink
thanks! Works great.
halftux
Mon, 2019/10/28 - 14:22
Permalink
Thats nice btw on which device and which OS version?
ezameht
Mon, 2019/10/28 - 21:32
Permalink
XA2 Plus on 3.1.0.11
ezameht
Sun, 2019/10/27 - 00:43
Permalink
How to disable flash?
halftux
Sun, 2019/10/27 - 22:21
Permalink
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
Wed, 2019/10/23 - 08:34
Permalink
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
Wed, 2019/10/23 - 12:39
Permalink
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
Tue, 2019/10/22 - 01:28
Permalink
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
Tue, 2019/10/22 - 11:17
Permalink
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
Tue, 2019/10/22 - 23:09
Permalink
Released a new version at least the primary camera should work for SF>3.