We have moved to a new Sailfish OS Forum. Please start new discussions there.
310

Camera can't store pictures to SD card [not relevant]

asked 2014-01-20 23:49:27 +0200

Virtsi gravatar image

updated 2015-02-22 22:00:54 +0200

raketti gravatar image

Is there a way to store pictures automatically to the external SD card instead of the phone storage?

edit retag flag offensive reopen delete

The question has been closed for the following reason "question is not relevant or outdated" by launchpad
close date 2016-10-06 02:58:03.006469

Comments

12

I would also like to see this option. Settings -- Apps -- Camera :)

cocovina ( 2014-02-15 12:43:52 +0200 )edit
2

My wife is furious about this. I believe it won't be a big trouble to add settings for this. I told her to copy with filetug but you know...

redfizh ( 2014-05-07 19:21:39 +0200 )edit
19

Yes, PLEASE add this functionality in a future update, I take many photos and videos and it fills up the internal memory pretty quickly, thus slowing down the performance of the phone, and so it would be so much better to be able to easily switch the storage location to a big fat SD card. Thank you!

FishesWillLaugh ( 2014-08-02 19:25:32 +0200 )edit
2

It should be an easy option to save pictures and videos to a SD card and need to be included in an update.

richardski ( 2014-09-30 09:58:43 +0200 )edit
4

@redfizh Tell your wife to "create a symlink from phone memory to microSD card" ;)

Wizah ( 2014-10-07 19:15:00 +0200 )edit

10 Answers

Sort by » oldest newest most voted
26

answered 2014-10-03 00:28:46 +0200

It's actually amazing that this feature didn't come yet. And a pity as well...

edit flag offensive delete publish link more

Comments

Settings > Apps > Camera > Storage does the trick _now_ (albeit I wasted enough time failing to figure out that Apps settings are down there, with that coresponding apps would just have Settings shortcut in their top menu as well): https://together.jolla.com/question/17691/camera-cant-store-pictures-to-sd-card/?answer=147253#post-id-147253

shigorin ( 2020-03-31 00:23:25 +0200 )edit
14

answered 2014-09-28 20:38:36 +0200

baptx gravatar image

updated 2018-01-18 15:40:35 +0200

Warning: with this solution, I later noticed that the videos were not very smooth. Writing to SD card in real time may be slower depending on your SD card (I tested with SanDIsk Ultra microSDHC I 32GB class 10). A safer solution would be to write photos / videos to the internal memory by default and when you need to free space, you move the content from the internal memory (/home/nemo/Pictures/ and /home/nemo/Videos/) to the SD card (/media/sdcard/3638-3338/Pictures/ and /media/sdcard/3638-3338/Videos/). The SD card photos and videos will be listed in the Gallery app also.

You can create a symlink from phone memory to microSD card but you will see a duplicate of photos/videos in the Gallery app, like someone said.

In fact, you need to create hidden folders in the SD card, for example ".Pictures" and ".Videos" and then you can save these commands as a shell script camera_sdcard.sh:

#!/bin/sh

rm Pictures Videos
sleep 5
ln -s /media/sdcard/3638-3338/.Pictures/ /home/nemo/Pictures
ln -s /media/sdcard/3638-3338/.Videos/ /home/nemo/Videos

If you run commands as a script, you need a delay like sleep 1 between symlinks creation, otherwise the Gallery app will not load all file thumbnails correctly. Update:I've found that the sleep is necessary after the rm command only and since current Jolla update 1.1.1.27, I have got black covers on the Messages and Phone app after using these symlinks with "sleep 1" or no delay at all. With a greater delay like "sleep 5", there are no black covers. I've found that this bug may not be related to the symlinks, it appears when doing several actions, I shared some screenshots here: https://together.jolla.com/question/2893/bug-double-tap-did-not-unlock-properly/#79276

When you shutdown your phone, you will have to create symlinks again. Even if they still exist, the Gallery app doesn't show SD card content until you create symlinks after the phone operating system startup. I tried to use systemd to autostart the script but it didn't work, it looks like the system hasn't finished starting to load files from SD card into Jolla's Gallery app (starting script after SD card mount or as the last service didn't work for me).

So you can manually start the script after startup but an easier way to do this is to create a .desktop shortcut file that you can start from a file manager or even better, as a shortcut in the phone applications:

[Desktop Entry]
Type=Application
Name=SD card
Exec=/home/nemo/camera_sdcard.sh

This desktop shortcut assume that you have the camera_sdcard.sh file in /home/nemo/ folder. Now you can save the shortcut as camera_sdcard.desktop in /home/nemo/.local/share/applications/ and you will have a shortcut to load pictures and videos from the SD card after phone startup! When you take a picture or video, they are automatically saved to the SD card and appear on the Gallery application.

I will share another trick here, if you move all pictures/videos from your phone memory or SD card to a computer (so files on your phone have been removed) and you want to copy files again to your phone, you will see that the Gallery app files are not sorted in the original order they were created. This is due to the copy process (cp command doesn't respect any order), files copied first appear first in the Gallery app and the last files copied are the one you can see at the beginning. I already shared this on Twitter (https://twitter.com/baptx/status/494989666408345602), at the moment, Jolla Gallery pictures and videos can only be sorted by date (when pictures/videos were taken or copied), so if you want keep the original order, you can mount Jolla filesystem with MTPFS (jmtpfs on Linux) or SSHFS and use these commands:

for i in `ls Jolla/* | sort -r`; do \cp $i Jolla; sleep 1; done
for i in `ls Camera/*`; do \cp $i Camera; sleep 1; done

The first command is for copying the Jolla pictures that come pre-installed in the phone, files are named "Jolla_01.jpg", "Jolla_02.jpg", ...,"Jolla_30.jpg" so you copy alphabetically starting from the end and the second one is for the pictures/videos taken, named "YYYYMMDD_001.jpg", "YYYYMMDD_002.jpg" and so on. The \cp backslash will omit cp alias, for example cp -i, you will not be asked if you want to overwrite an existing file. The sleep 1 delay is necessary for the Gallery to respect your copy order.

edit flag offensive delete publish link more

Comments

8

Wow! So Jolla is to be a device to be used only by computer engineers!? Jokes apart, thanks for this info and your effort to figure it out. Much appreciated.

sifartech ( 2014-10-07 17:38:11 +0200 )edit
2

@baptx: No need to sleep 1 second for each file. Use "cp -p" or "cp --preserve=timestamps" with FAT on your SD card. This preserves the original timestamps and in this way the sort order.

axaq ( 2015-02-01 23:50:55 +0200 )edit

@axaq have you tried it? With "cp -p" or "cp --preserve=timestamps", it also messes the order on my Jolla Gallery app. And in the camera_sdcard.sh script at the beginning of my answer, there is a sleep needed too but sometimes I have to execute the script several times to get it working (maybe a syncing problem with Jolla software).

baptx ( 2015-04-26 21:01:47 +0200 )edit
7

answered 2016-09-26 13:29:06 +0200

dmnk gravatar image

fixed in 2.0.4

https://together.jolla.com/question/146274/changelog-204fiskarsinjoki/

[jolla-camera] Allow photos/video to be stored on the SD card.

edit flag offensive delete publish link more

Comments

ok so this is yet to be released....

t0mps0 ( 2016-09-26 16:35:53 +0200 )edit
1

wonder why your link gives "This post is temporarily not available"

t0mps0 ( 2016-09-26 22:00:12 +0200 )edit
1

it was hidden again, after being publicly available. check again tomorrow.

dmnk ( 2016-09-26 23:11:06 +0200 )edit

Still not available, it's 29th. Why was it hidden in the first place? Anyway, let's see that release go official first and then announce it fixed. In the meantime, where's the changelog that makes you say it is?

bennypr0fane ( 2016-09-29 13:31:41 +0200 )edit

@bennypr0fane the update was pulled back for some technical reasons, the change log was available for a short time, look here: https://together.jolla.com/question/146329/update-204/?answer=146356#post-id-146356

nick75 ( 2016-09-29 14:06:51 +0200 )edit
4

answered 2015-02-01 01:48:11 +0200

M.Bln. gravatar image

I would like to ask you for making a request (at least in tagging) out of it... Thanks.

edit flag offensive delete publish link more
2

answered 2015-10-11 21:32:43 +0200

polarphone gravatar image

Grest to use symlink!

Howevet I think for those not into the inner workings of linux and fir ease of use following features for camera app would be wanted/needed

  1. Selective sorting - time of exposure or age of file

  2. Able ti select storage if sd card present.

edit flag offensive delete publish link more
2

answered 2016-10-06 02:54:36 +0200

launchpad gravatar image

updated 2016-10-06 02:57:15 +0200

Now finally natively available with Fiskarsinjoki ... Thanks a lot !! d (o_o) b

https://together.jolla.com/question/146274/changelog-204fiskarsinjoki/#146274-jolla-camera

Quote: "Allow photos/video to be stored on the SD card."

Goto "Settings" > "Apps" > "Camera" > "Storage" ....

edit flag offensive delete publish link more
1

answered 2014-02-04 11:22:27 +0200

Niki gravatar image

I didn't see the usual "storage: phone / sdcard ?" setting. I guess you could try with a symlink from the local storage to the SD card ?

edit flag offensive delete publish link more

Comments

4

the symlink works when you take photos/videos, but when you open the Gallery to to look at the pictures/videos, each will appear twice in the listing. It looks like the tracker scans both the SD card through its direct path, as well as via the symlink - this is not elegant.

barral ( 2014-04-23 14:33:24 +0200 )edit
2

@barral you have to create hidden folders in the SD card like .Pictures and .Videos, see my answer.

baptx ( 2014-09-28 22:56:57 +0200 )edit
1

answered 2014-10-07 16:15:25 +0200

butler gravatar image

updated 2014-10-07 16:16:02 +0200

Now situation is somewhat better. Nothing seem to change tracker settings on reboot/remount, so indexing of Pictures and Videos dirs can be disabled while tracker will still index SD card.

gsettings set org.freedesktop.Tracker.Miner.Files index-recursive-directories "['&DESKTOP', '&DOCUMENTS', '&DOWNLOAD', '&MUSIC']"

Then you can create symlinks for Pictures / Video as baptx wrote.

edit flag offensive delete publish link more

Comments

1

So with this code we don't need to create hidden folders? In current update 1.1.1.27, I've seen a small change: after reboot, camera photos and videos from SD card still appear in Gallery app but if you want to display new photos/videos taken after reboot, you have to recreate symlinks like other updates.

baptx ( 2015-01-31 23:55:59 +0200 )edit
1

answered 2015-07-03 20:27:50 +0200

gfwp gravatar image

Strange about symlinks. IS the whole FS resetted "à la busybox" after each reboot?

Why not a way more elegant mount loop in /etc/fstab to use external SD on Camera and MMfiles?

Regards

edit flag offensive delete publish link more
1

answered 2015-10-11 21:18:04 +0200

saturn gravatar image

Similar to other answers here, I have added a script that i execute manually with ShellEx every few days/weeks that sorts and moves my pictures and videos to the SD card.

note: where xxxx-xxxx is the SD card name.

Here is the script:

#!/bin/bash

PHOTO_SRC=/home/nemo/Pictures/Camera
PHOTO_DST=/media/sdcard/xxxx-xxxx/Pictures/Camera
VIDEO_SRC=/home/nemo/Videos/Camera
VIDEO_DST=/media/sdcard/xxxx-xxxx/Videos/Camera

FORMAT=+%Y%m%d

echo "Start moving Photos ..."
cd "$PHOTO_SRC"
PHOTO_NUM=`ls -al $PHOTO_SRC/*.jpg |wc -l`;
echo "Found $PHOTO_NUM photos to move."
for file in *; do
if [ -f $file ]
then
   dname=`date $FORMAT -r $file`
   mkdir -p "$PHOTO_DST"/"$dname"
   mv "$file" "$PHOTO_DST"/"$dname"
fi
done
echo "Completed moving Photos"

echo "Start moving Videos ..."
cd "$VIDEO_SRC"
VIDEO_NUM=`ls -al $VIDEO_SRC/*.mp4 |wc -l`;
echo "Found $VIDEO_NUM videos to move. "
for file in *; do
if [ -f $file ]
then
   mv "$file" "$VIDEO_DST"
fi
done
echo "Completed moving videos"
edit flag offensive delete publish link more

Comments

And also this is still not availlable on Taalojärvi may 2016, the camera still stores everything on the mass storage, not the sd card.

Ray64 ( 2016-05-11 08:46:05 +0200 )edit

Question tools

Follow
30 followers

Stats

Asked: 2014-01-20 23:49:27 +0200

Seen: 6,155 times

Last updated: Jan 18 '18