Task
To refresh Shotwell thumbnails cache.
Description
Shotwell create thumbnail for every picture it display so when you scroll through gallery it will rebuild it. Problem is when storage is slow (SMB over WiFi) it takes some time.
Idea
Force Shotwell to scroll all gallery
Solution
Find id of Shotwell window:
jaqb@linux:~$ xdotool search --onlyvisible --name shotwell 2098671 2099432
As you can see sometimes there are two of them (I don't know why)
Switch to that window an send Page_Down / Next key check.
jaqb@linux:~$ xdotool windowactivate 2099432 --sync key Next
Repeat many many (1000) times but give some time (22s) to refresh all visible pictures. I've prepared bash script:
jaqb@linux:~$ cat ./shotwell-cache-refresh.bash #!/bin/bash xdotool windowactivate --sync $1 for x in `seq 1000`; do sleep 22 xdotool key Next done EOF
After confirmation which identifier is good (2099432) you can run:
jaqb@ubuntu-16:~$ ./shotwell-cache-refresh.bash 209943
and do something more interesting than just typing Page_Down key for more than 6h.
The easiest way to set up own Jitsi meet server is containerization (see Jitsi in docker).
When you would like to change logo watermark you can use this method. It will work only in this instance of docker. You can stop / start container, but when you destroy it (i.e.: docker-compose down) the changes will gone.
Copy new file (original dimensions are 612x272) to your docker server and place in directory:
~/.jitsi-meet-cfg/web/
check id / name of your web container, i.e.:
[docker@docker jitsi-meet]# docker-compose ps Name Command State Ports ------------------------------------------------------------------------------------------------ jitsi-meet_jicofo_1 /init Up jitsi-meet_jvb_1 /init Up 0.0.0.0:10000->10000/udp, 0.0.0.0:4443->4443/tcp jitsi-meet_prosody_1 /init Up 5222/tcp, 5269/tcp, 5280/tcp, 5347/tcp jitsi-meet_web_1 /init Up 0.0.0.0:8443->443/tcp, 0.0.0.0:8000->80/tcp
as you can see in my case it is the jitsi-meet_web_1.
Execute bash inside container:
docker exec -it jitsi-meet_web_1 /bin/bash
replace original watermark
cd /usr/share/jitsi-meet/images/ mv watermark.png watermark.png-old cp /config/new-logo.png watermark.png
it's not necessary, but I've saved Jitsi watermark as watermark.png-old.
That's all.
You can also check ~/.jitsi-meet-cfg/web/interface_config.js file for other parameters.
Nowadays everybody use some conferencing systems. If you would like to have your own, on controlled infrastructure, maybe only in LAN/VPN environment you can try Jitsi.
The "demo" installation in CentOS 7 based on docker containers is quite simple.
Install docker and docker-compose
If you already have docker installed skip this step. You can also read Docker in CentOS 7 in 5 steps.
curl -fsSL https://get.docker.com/ | sh systemctl start docker systemctl enable docker curl -L "https://github.com/docker/compose/releases/download/\ 1.23.1/docker-compose-$(uname -s)-$(uname -m)" \ -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose
Prepare environment
Install GIT
yum install git
Download docker files
git clone https://github.com/jitsi/docker-jitsi-meet && cd docker-jitsi-meet
Prepare directories
mkdir -p ~/.jitsi-meet-cfg/{web/letsencrypt,transcripts,prosody,jicofo,jvb} cp env.example .env
Needed modifications
If you want to use it in LAN/separated network you have to change
DOCKER_HOST_ADDRESS=192.168.1.89 JVB_STUN_SERVERS=
in .env file. Of course DOCKER_HOST_ADDRESS will be YOUR docker IP address.
If you not set JVB_STUN_SERVERS to null value you won't be able to join the conference. You can change it later in
~/.jitsi-meet-cfg/jvb/sip-communicator.properties file.
Configure firewall
cat <<EOF > /etc/firewalld/services/jitsi.xml <?xml version="1.0" encoding="utf-8"?> <service> <short>Jitsi</short> <description>Multi-platform open-source video conferencing system</description> <port protocol="tcp" port="8000"/> <port protocol="tcp" port="8443"/> <port protocol="tcp" port="4443"/> <port protocol="udp" port="10000"/> </service> EOF firewall-cmd --reload firewall-cmd --add-service jitsi firewall-cmd --permanent --add-service jitsi
Start all
docker-compose -f docker-compose.yml -f etherpad.yml up -d
As you can see I've also added etherpad - for document sharing.
Install chromaprint:
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm yum install libchromaprint
You have to use epel-release-latest (not epel-release) not to get:
Problem: package ffmpeg-4.2.1-3.el8.x86_64 requires libavdevice.so.58()(64bit), but none of the providers can be installed - package ffmpeg-4.2.1-3.el8.x86_64 requires libavdevice.so.58(LIBAVDEVICE_58)(64bit), but none of the providers can be installed - conflicting requests - nothing provides libjack.so.0()(64bit) needed by libavdevice-4.2.1-3.el8.x86_64 (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Install beet
pip3 install beets pip3 install pyacoustid
Enable plugins:
echo "plugins: duplicates chroma" >> .config/beets/config.yaml
Install fpcalc
cd /tmp wget "https://github.com/acoustid/chromaprint/releases/download/v1.4.3/chromaprint-fpcalc-1.4.3-linux-x86_64.tar.gz" cd /usr/local/bin/ tar -xzf /tmp/chromaprint-fpcalc-1.4.3-linux-x86_64.tar.gz ln -s chromaprint-fpcalc-1.4.3-linux-x86_64/fpcalc .
Install ffmpeg (RPM Fusion, How To Install FFmpeg on CentOS 8, How to turn CentOS 8 into a perfect desktop):
yum install --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm yum install --nogpgcheck https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm yum config-manager --enable PowerTools yum config-manager --enable epel-testing yum config-manager --enable rpmfusion-free-updates-testing yum install ffmpeg
Now beet can fingerprint files:
beet fingerprint
I want to import my pictures tags made in F-Spot (0.8.2) to digiKam (4.10)
I found Roland Geider script but it doesn't work in totay's Linux (differences in DBUS structure): Original F-Spot to digiKam script.
I've made trivial correction (comment-out problematic code) and now script looks like this:
You have to provide collection with the same path like in F-Spot. It can import tags.
If your F-Spot path doesn't exists anymore you have to alter photos.db. In my case some of pictures had path /home/zdjatka and some /mnt/zdjatka, but now all pictures are in the same place /mnt/zdjatka, so I alter path:
cp ~/.config/f-spot/photos.db ~/photos.db sqlite3 ~/photos.db update photos \ set base_uri=REPLACE(base_uri, "home", "mnt") \ where base_uri not like "%/mnt/zdjatka%"; update photo_versions \ set base_uri=REPLACE(base_uri, "home", "mnt") \ where base_uri not like "%/mnt/zdjatka%"; .quit
as you can see photos.db is sqlite3 database (usually located at ~/.config/f-spot/photos.db) and I copied file to home directory (not to modify original file).
Assuming you digiKam is initialized in Pictures directory and you have defined collection in same folder as is defined in F-Spot database (photos.db) complete command to convert is:
python fspot_to_digikam.py Pictures --fspot-folder .
To enable acoustic fingerprinting in beets You have to install python acoustid library. My NAS uses Debian, so:
apt-get install python-acoustid
Now You can enable Chromaprint plugin (using beet config -e or directly editing ~/.config/beets/config.yaml file):
plugins: duplicates chroma
as you can see I have also enabled duplicate plugin.
Now if You run
beet fingerprint
You will get a lot of:
fingerprinting fingerprint generation failed: audio could not be decoded
so I also installed:
apt-get install python-gi apt-get install gstreamer1.0-plugins-good \ gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly apt-get install ffmpeg libchromaprint-tools \ python-chromaprint libchromaprint0 gstreamer0.10-chromaprint \ libchromaprint-dev
but it doesn't work.
On the other hand fpcalc works.
I've installed the newest version:
wget "https://bitbucket.org/acoustid/chromaprint/downloads/chromaprint-fpcalc-1.4.1-linux-x86_64.tar.gz" tar -xzf chromaprint-fpcalc-1.4.1-linux-x86_64.tar.gz mv chromaprint-fpcalc-1.4.1-linux-x86_64 /usr/local/bin/ cd /usr/local/bin/ ln -s chromaprint-fpcalc-1.4.1-linux-x86_64/fpcalc
but still I've got the same error:
root@MyNAS:/tmp# beet import -W piosenka.mp3 fingerprinting of '/tmp/piosenka.mp3' failed: audio could not be decoded /tmp/piosenka.mp3 (1 items) No matching release found for 1 tracks. For help, see: http://beets.readthedocs.org/en/latest/faq.html#nomatch [U]se as-is, as Tracks, Group albums, Skip, Enter search, enter Id, aBort?
Nowadays if you want to clean up your MP3 collection instead of writing your own scripts You should better read about MusicBrainz/Picard, beets (witch Duplicates plugin) - they both (and VLC too!) use AcoustID.
You can also try, quite old, Echoprint/Server for the Echoprint.
When You use MS Windows, the best way to convert audio CD to MP3 (such program is also called grabber or ripper) is to use CDex - Open Source Digital Audio CD Extractor.
It's simple, uses GPL license and automatically fills MP3 Tags using CDDB (freedb.org) and/or local database. It also have portable edition (today only 1.77).
To get images placed on map based on GPS tags in Piwigo (2.9) I had to install and enable "Exiftool GPS" plugin and install exiftools.
I've downloaded it and unpack in /tmp directory:
cd /tmp wget "http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-10.51.tar.gz" tar -xzf Image-ExifTool-10.51.tar.gz cd Image-ExifTool-10.51
Prepare directory and copy files
mkdir /usr/local/Image-ExifTool-10.51 cp exiftool /usr/local/Image-ExifTool-10.51/exiftool cp -r lib /usr/local/Image-ExifTool-10.51
Prepare symbolic links
cd /usr/local ln -s Image-ExifTool-10.51 Image-ExifTool cd bin ln -s ../Image-ExifTool/exiftool . mkdir /usr/local/lib/site_perl cd /usr/local/lib/site_perl ln -s ../../Image-ExifTool/lib/File ../../Image-ExifTool/lib/Image .
and now it works:
root@NAS:~# exiftool --help Syntax: exiftool [OPTIONS] FILE Consult the exiftool documentation for a full list of options.
This is short-cut for PowerShot SX230HS users. I got this informations from Canon Hack Development Kit site.
First of all you have to check your firmware version. Jut put an empty ver.req or vers.req file on your SD card. I've put both. Then press the func set+disp. buttons together (i.e. press set first, keep holding it down, then press disp.)
You will see something like Firmware Ver GM1.01C (in my case). The 1.01C is firmware version.
Now go to CHDK Download page and get proper file. In my case sx230hs-101c-1.4.1-4691-full.zip.
Unzip this file to your SD card and place back to camera.
Now follow the instruction:
- Power up camera using Playback button.
- Press Menu
- Select Firmware update
- Accept update by pressing OK (don't worry it will be "reverted" when you power off camera ;-)
That's all! Now you can even write your own script to camera (or use some examples).
Add comment