maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [SFOS] [WIP] cameraplus for Sailfish OS (https://talk.maemo.org/showthread.php?t=93256)

malkavian 2014-06-12 20:41

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by MSameer (Post 1429368)
This is always the case. Sensor maximum resolution is in 4:3 aspect ratio. 16:9 most likely involves some kind of hardware cropping element. It's how it is in modern hardware :)

I have just read this and made some maths and your supposition is exactly right:

8Mpix means: 8 * 1024 * 1024 pix = 8.388.608 pix
It is a rectangle of 4 x 3, that means that the width (long side) is:
sqrt(8388608/4/3)*4 = 3344,37 pix

If we are cutting the photo to get a 16:9 one, we maintain the width but not the height, so in 16:9 the width is the same. Then the height (which have a 9:16 proportion to the width) is:
3344,37 * 9/16 = 1881,21

So the pix we have in a cropped 16:9 image are:
3344,37 * 1881,21 = 6.291.462

And 6 Mpix are: 6 * 1024 * 1024 = 6.291.456 pix

So, that's correct, 16:9 photos is got cropping them from 4:3.

(If you use more decimals you will get the exact same number).

PS: I am changing just now the camera to 4:3. If I would want to crop the photo, I will do it by myself.

MSameer 2014-06-12 23:04

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by malkavian (Post 1429374)
PS: I am changing just now the camera to 4:3. If I would want to crop the photo, I will do it by myself.

Take care because if you crop it manually, you end up re-encoding the jpeg image which might lead to some artifacts.

malkavian 2014-06-12 23:49

Re: [WIP] cameraplus for Sailfish OS
 
I doubt that but thank you. If am I sure I want something in 16:9 I will use it, but if not, I prefer to get more image and let it in 4:3.

evk 2014-06-13 19:08

Re: [WIP] cameraplus for Sailfish OS
 
I'd like to see more choices for crop. Sometimes I want the full resolution and crop later, reencodning isn't really an issue since I'll be adjusting contrast and colours anyway.

But mostly I prefer to get a finished picture in the camera. Especially if I'm using the phone. Sensor and lens isn't good enough for good pictures anyway and no raw format limits the possiblity for post work.

So, I wish for 1:1, 3:2 and 5:4.

MSameer 2014-06-13 23:32

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by evk (Post 1429522)
I'd like to see more choices for crop. Sometimes I want the full resolution and crop later, reencodning isn't really an issue since I'll be adjusting contrast and colours anyway.

But mostly I prefer to get a finished picture in the camera. Especially if I'm using the phone. Sensor and lens isn't good enough for good pictures anyway and no raw format limits the possiblity for post work.

So, I wish for 1:1, 3:2 and 5:4.

I'd like to have that too but I am limited by what the driver/camera HW itself can do.

In Sailfish it's an issue because I get jpeg images and I can't manually decode and crop because the quality will suffer.

evk 2014-06-14 08:00

Re: [WIP] cameraplus for Sailfish OS
 
I see. Better leave it as it is until that can be solved.

Could be usefull with a overlay, but I'm not sure it's worth the bother.

latency 2014-06-14 11:41

Re: [WIP] cameraplus for Sailfish OS
 
Is it possible to have a video mode that makes the file better suited for sending via mail or messenger services like Whatsapp? Even the lowest resolution available currently makes a 10 seconds video pretty big. I can record 30 second clips on my android phone that looks pretty ok and are smaller in size than a 10 second video with the lowest possible resolution in cameraplus.

Small bug: I have to click the record button twice in video mode to make it start recording.

MSameer 2014-06-14 11:47

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by evk (Post 1429547)
I see. Better leave it as it is until that can be solved.

Could be usefull with a overlay, but I'm not sure it's worth the bother.

It can be possible with some black border on top of the viewfinder and lossless cropping of the jpeg image (If everything is calculated correctly) but then we might have issues while zooming.

An alternative approach would be to have an image editing tool with lossless cropping functionality. I don't know if I will ever get to making that tool or not but I can help anyone trying to make it.

MSameer 2014-06-14 11:49

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by latency (Post 1429567)
Is it possible to have a video mode that makes the file better suited for sending via mail or messenger services like Whatsapp? Even the lowest resolution available currently makes a 10 seconds video pretty big. I can record 30 second clips on my android phone that looks pretty ok and are smaller in size than a 10 second video with the lowest possible resolution in cameraplus.

At the moment I am using the same bitrate for all videos. I need to fix that which should lead to decreased size for the lower resolutions.

I have an issue about that here: https://gitorious.org/projects/cameraplus/issues/33

Quote:

Originally Posted by latency (Post 1429567)
Small bug: I have to click the record button twice in video mode to make it start recording.

Sometimes it happens even in image mode ;)

MSameer 2014-06-14 12:53

Re: [WIP] cameraplus for Sailfish OS
 
0.0.25 is out

- New icon by mcbook
- Do not prevent the flick to settings or post capture if the drag starts from the focus reticle
- Changing image resolution aspect ratio should re-position focus reticle correctly
- Reset touch focus when we switch between image and timer modes
- Touch focus now takes into account inverted landscape orientation

enjoy :)

bennypr0fane 2014-06-15 22:29

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1429363)
@bennypr0fane Mitakuuluu will have video recording in 640x480 in mid-bitrate mode in next release. It's about 1MB for 25sec video

@Coderus: Maybe you can help introduce this in Cameraplus as well?

MSameer 2014-06-15 22:52

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by bennypr0fane (Post 1429701)
@Coderus: Maybe you can help introduce this in Cameraplus as well?

Mitakuuluu uses QtMultimedia
cameraplus uses GStreamer directly via a custom library built on top of it.

The problem is that this library does not have the ability to set a different bitrate per resolution.

This has to be solved first in the code but I am mostly concentrating on image capturing and UI polishing ATM.

Video recording has quite a few issues:
- it's in MPEG4 and I want to move to H264
- It drops frames sometimes
- bitrate is too high for the lower resolutions.

I am planning to tackle these but it will just take a while.

Of course I'd appreciate any help :)

Makeclick 2014-06-23 04:59

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by MSameer (Post 1429702)

Video recording has quite a few issues:
- it's in MPEG4 and I want to move to H264

Hmm.. I think, MPEG4 is better and use less power (CPU). Compress is way faster with a MPEG4 (ffmpeg). There is very slim different with a video quality, you can use higher bitrate for MP4 MPEG4 vs MKV H264 and you get same size. I try this many many times with the Handbrake. H264 If you want many audio or subtitles files in the one file :). IF you want to use H264, you must play setting a lot or file size is going to be very big!

Of course you can try, but we do not have that much power to compress video files on the fly :)

MSameer 2014-06-23 12:30

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by Makeclick (Post 1430651)
Hmm.. I think, MPEG4 is better and use less power (CPU). Compress is way faster with a MPEG4 (ffmpeg). There is very slim different with a video quality, you can use higher bitrate for MP4 MPEG4 vs MKV H264 and you get same size. I try this many many times with the Handbrake. H264 If you want many audio or subtitles files in the one file :). IF you want to use H264, you must play setting a lot or file size is going to be very big!

Of course you can try, but we do not have that much power to compress video files on the fly :)

But we rely on hardware encoders and decoders so the CPU is not really affected here :)

Makeclick 2014-06-24 07:52

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by MSameer (Post 1430697)
But we rely on hardware encoders and decoders so the CPU is not really affected here :)

OU. I didn't know Jolla has those :). Nice, try it and please. add portrait mode.

MSameer 2014-06-24 16:41

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by Makeclick (Post 1430815)
OU. I didn't know Jolla has those :). Nice, try it and please. add portrait mode.

It has hardware decoders for H264, H263, MPEG4 and DivX and hardware encoders for MPEG4, H264 and H263

MSameer 2014-07-03 16:27

Re: [WIP] cameraplus for Sailfish OS
 
0.0.26 is out!
- tapping gallery button shows the media in gallery application instead of showing all images
- fixed a bug that caused leaking camera buffers every time we restart the pipeline
- completely disable face detection for now
- Avoid an unnecessary mode switch animation during startup
- Slightly decrease startup time by not disabling reverse geocoding when GPS is disabled

Enjoy :)

Morpog 2014-07-03 17:16

Re: [WIP] cameraplus for Sailfish OS
 
Then I even moire don't understand why Jolla ain't using H264 for video recording....

Thx for new release, will try itt out laters!

Makeclick 2014-07-15 11:27

Re: [WIP] cameraplus for Sailfish OS
 
[Bug] Pictures which i have been taken with the Cameraplus not showing up from Jollas Gallery app :( 1.0.8.19)

MSameer 2014-07-15 14:52

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by Makeclick (Post 1432840)
[Bug] Pictures which i have been taken with the Cameraplus not showing up from Jollas Gallery app :( 1.0.8.19)

Does it happen with jolla camera app?

ssahla 2014-07-15 18:47

Re: [WIP] cameraplus for Sailfish OS
 
Same problem as Makeclick. New photos taken with CameraPlus don't show in Gallery (but older ones do, I think). Photos taken with stock Camera do show.

I took one photo with each app and looked at the files with File Browser; the CameraPlus one says "owner: nemo, group: nemo" but the stock Camera one is "owner: nemo, group: privileged". Does this have something to do with the pics not showing?

coderus 2014-07-15 19:21

Re: [WIP] cameraplus for Sailfish OS
 
check file creation time

ssahla 2014-07-15 19:30

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1432907)
check file creation time

Same time, one minute apart.

MSameer 2014-07-15 19:30

Re: [WIP] cameraplus for Sailfish OS
 
I can reproduce it here. The only way to get tracker to index those images was to reset its database which caused tracker to reindex all the files and then they became visible.

However it still does not index new images. I am not sure why. I need to dig some more...

EDIT: Seems there is a regression in tracker. I think I found a workaround. I will see if I can push a fix out soon.

nestori 2014-07-17 05:45

Re: [WIP] cameraplus for Sailfish OS
 
Thank you for the great app, it's better than the stock camera in many ways already! I've read this thread and I don't think this has been asked: is it possible for you to enable higher ISO values than the current ISO400 or is this limited by the camera driver? I read from jolla together that ISO640 was possible earlier on the stock camera. I would not mind even higher settings, as the camera is nearly unusable in normal indoor light conditions when taking pics of my kids who do not stand still for a fraction of a second.

MSameer 2014-07-17 13:59

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by nestori (Post 1433088)
Thank you for the great app, it's better than the stock camera in many ways already! I've read this thread and I don't think this has been asked: is it possible for you to enable higher ISO values than the current ISO400 or is this limited by the camera driver? I read from jolla together that ISO640 was possible earlier on the stock camera. I would not mind even higher settings, as the camera is nearly unusable in normal indoor light conditions when taking pics of my kids who do not stand still for a fraction of a second.

Thanks for your words.

If you are into tinkering then you can edit the file:
Code:

/usr/share/harbour-cameraplus/etc/gst-droid/gstdroidcamsrc.conf
There is a section:
Code:

[iso-speed]
0 = auto
100 = ISO100
200 = ISO200
400 = ISO400

Modify it by adding:
Code:

800 = ISO800
EDIT:
also edit
Code:

/usr/share/harbour-cameraplus/share/cameraplus/config
and change device-0 from:
Code:

iso-modes=0,100,200,400
to
Code:

iso-modes=0,100,200,400,800
Then restart the application. This should give you ISO 800 which is the highest the driver supports. If it improves the situation for you and does not produce artifacts then I can enable it in the next release :)

nestori 2014-07-18 09:48

Re: [WIP] cameraplus for Sailfish OS
 
Thanks, I tried this but was not able to save the .ini file, must be a permission thing which I dont know how to fix. Not much unix experience, sorry. I used tinyedit for this.

MSameer 2014-07-18 16:39

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by nestori (Post 1433236)
Thanks, I tried this but was not able to save the .ini file, must be a permission thing which I dont know how to fix. Not much unix experience, sorry. I used tinyedit for this.

You need to be root in order to edit the files.

I can attach the files here for you if it makes your life easier.

I will see if I can build an RPM for you but cannot promise it now.

EDIT: OK. I added ISO 800 so it should be available in the next release.

I also have an idea to try to bump the frame rate up a bit and decrease it in night scene mode. Not sure it will help but we can at least try :)
I will try to implement it before the next release but cannot promise.

EDIT2: increasing the frame rate to 30 caused the images to be significantly darker :(

nestori 2014-07-18 18:49

Re: [WIP] cameraplus for Sailfish OS
 
I actually just managed to modify the files by enabling the dev mode, setting pw and installing nano :D

It seems to work beautifully, but did not have a change to put this into a proper field test as the kids are sleeping. :) Some noise in the test pics naturally but I rather have that than just blurry faces.

mattiviljanen 2014-07-21 18:51

Re: [WIP] cameraplus for Sailfish OS
 
Just stopping by to say thanks for your hard work! :)

I noticed that having shot a video using 1080p I couldn't play it smoothly using cameraplus. Then I tested it with 720p video, and playback was smooth. Perhaps it all boils down to issue 33. I would have tested it by playing it back with Gallery, but... Yeah, pics and vids not appearing in gallery is already a known issue :)

MSameer 2014-07-21 20:59

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by mattiviljanen (Post 1433545)
Just stopping by to say thanks for your hard work! :)

I noticed that having shot a video using 1080p I couldn't play it smoothly using cameraplus. Then I tested it with 720p video, and playback was smooth. Perhaps it all boils down to issue 33. I would have tested it by playing it back with Gallery, but... Yeah, pics and vids not appearing in gallery is already a known issue :)

Thanks for your support :)

I will be releasing an update in a short period that works around the images not being shown in gallery. I apologize for the delay.

To be honest, I personally consider video recording and playback to be highly experimental. It also drops frames while recording and I am yet to investigate the reason. In fact the encoders and decoders I am using need to be rewritten :(

Perhaps you could try the video on a desktop and see if it works or not?

MSameer 2014-07-21 21:15

Re: [WIP] cameraplus for Sailfish OS
 
0.0.27
- Don't inform tracker about our captured media as it prevents it from indexing the media
- Add ISO 800

Enjoy :)

MacManus 2014-07-23 20:01

Re: [WIP] cameraplus for Sailfish OS
 
Hi,

Can I take a photo from terminal? Does this app have a command line interface? That would be awesome!

Thanks

MSameer 2014-07-23 20:26

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by MacManus (Post 1433747)
Hi,

Can I take a photo from terminal? Does this app have a command line interface? That would be awesome!

Thanks

Unfortunately it does not yet. I can add a dbus interface for doing that. The only problem will be shipping the service file as it's not allowed by harbour :(

coderus 2014-07-23 20:32

Re: [WIP] cameraplus for Sailfish OS
 
you can enable dbus without service file for now, and it will be available at least while app is running.

MSameer 2014-07-23 20:53

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1433755)
you can enable dbus without service file for now, and it will be available at least while app is running.

That is doable indeed. I can do an interface like:

QStringList enumerateModes() // We already have image, video, timer and I am working on sequential shots. In the future we will get panorama and ZSL (hopefully).
bool switchMode(const QString& mode);
bool startCapture(bool focus); // focus is ignored if mode does not support it
void stopCapture(); // mainly to stop video recording

and then a signal:
void mediaSaved(const QString& fileName);
void captureCanceled(); // if the user cancels the operation.

Would that work?

MSameer 2014-07-28 13:23

Re: [WIP] cameraplus for Sailfish OS
 
0.0.28 available from OpenRepos with this changelog:

- Updated GStreamer to 1.4.0 (No user visible changes)
- Don't ignore the first tap on the capture button after returning from post capture view
- Reworked camera plugin selector
- Added sequential shots mode
- Fixed a rare crash when switching between front and back cameras

Enjoy :)

EDIT: I have removed that release from openrepos. I discovered a serious crash when playing back recorded videos.

EDIT2: I found a workaround for now and uploaded a new RPM. A proper fix will come in a future release but we should be fine for now.

nestori 2014-07-29 11:44

Re: [WIP] cameraplus for Sailfish OS
 
Hi, I've noticed a problem when using both origibal sailfish camera and cameraplus on the device: the sf camera will overwrite the picture files generated by cameraplus. For example if I first take one pic with camera plus, check the image file name from the gallery, then take another pic with sf camera, then go back to gallery and I can see the new picture has replaced the old one with the same file name.

Clearly this is more a problem with the sf cam not checking if it's about to overwrite a existing file than a bug with cameraplus, but I don't know what else to do with this info than report here.

MSameer 2014-07-29 11:55

Re: [WIP] cameraplus for Sailfish OS
 
Quote:

Originally Posted by nestori (Post 1434188)
Hi, I've noticed a problem when using both origibal sailfish camera and cameraplus on the device: the sf camera will overwrite the picture files generated by cameraplus. For example if I first take one pic with camera plus, check the image file name from the gallery, then take another pic with sf camera, then go back to gallery and I can see the new picture has replaced the old one with the same file name.

Clearly this is more a problem with the sf cam not checking if it's about to overwrite a existing file than a bug with cameraplus, but I don't know what else to do with this info than report here.

You can report it on http://together.jolla.com

I don't really know how can I workaround that issue in cameraplus (other than changing where I save the images and videos) :(

nestori 2014-07-29 14:15

Re: [WIP] cameraplus for Sailfish OS
 
Thanks, I'll do that. I'll post here when I'm done (likely this evening) so people here can vote for it too.


All times are GMT. The time now is 18:17.

vBulletin® Version 3.8.8