Desnublado

Not a single “cloud”!

Sometimes when I meet new people, I ask them: «What do you do when your smartphone runs out of storage space?». And unfortunately, then aswer many times is: «Delete photos and videos».

English / Español

ar / bg / bs / cs / da / de / dn / el / en / es / et / fa / fi / fr / ga / hi / hr / hu / id / it / ja / ka / ko / lt / lv / mk / mt / nl / pl / pt / ro / ru / sk / sl / sq / sr / sv / tr / uk / ur / vi / zh

TL;DR

desnublado creates smaller resolution versions of photos in avif and videos in av1 that are 50 to 100 times smaller than the originals, in a good enough quality to keep your entire collection on device.

Install Termux preferably from F-Droid, otherwise from Google Play, and run this command to install it:

curl -fsSLO https://desnublado.com/desnublado && bash desnublado setup

Tip: copy the command to the clipboard, then long-press in the termux terminal and tap paste.

ToC

Introduction

This program creates small versions of your photos and videos so that when you decide to free up space, you can keep a copy in your Android device.

This way if you decide to delete the originals (forever or because you copied them to a pendrive, laptop, etc.) you still keep a locally accessible copy, which does not require a connection to internet or “cloud” storage, while keeping your privacy.

With the default settings, desnublado:

The core of this program is a file written in bash called desnublado that runs on Termux, although it can also run on Linux Virtual Machine and any other Linux distribution. For most users who do not have Termux installed the unattended quick installation is the easiest way to get started.

Quick installation

For an easy, non interactive installation with the default settings, follow these two steps:

  1. Install Termux

  2. Copy the following command, open the application and paste it (long tap on screen):

    curl -fsSLO https://desnublado.com/desnublado && bash desnublado setup -y

Once the installation is finished, type exit to get out. The next time you open Termux, desnublado will automatically start processing your photos and videos.

Interactive installation

To run the installation program interactively choosing between the different available options, follow these two steps:

  1. Install Termux

  2. Copy the following command, open the application and paste it (long tap on screen):

    curl -fsSLO https://desnublado.com/desnublado && bash desnublado setup

The installation program will allow you to select the language, install the necessary programs, change the default options and enable or not to auto start desnublado when you open Termux.

Update

To upgrade to the latest version available, open Termux, tap any key to stop desnublado auto start and type the following command:

desnublado update

If ssh-keygen program (needed to verify the digital signature) is not available, desnublado will ask you to install it. When you’re done, type exit to quit Termux.

Download

File Description
desnublado v2026.10.20 desnublado main executable
desnublado.pub ed25519 public key to verify signatures
desnublado.sig SSHSIG digital signature
desnublado.lang v2026.09.22 desnublado translations file
desnublado.lang.sig SSHSIG digital signature
sha256sum.list sha256 hash of desnublado
sha256sum.list.sig SSHSIG digital signature

Verify the digital signature

desnublado is released with a SSHSIG digital signature to ensure its integrity, authenticity and to prevent tampering.

The content of the desnublado.pub file is:

desnublado@release ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILRUOIit/NU6usSafcc+mIxPlCjpCidS65+k7qY5MuCd solyplaya

To verify the signature:

ssh-keygen -Y verify -f desnublado.pub -I desnublado@release -n file -s desnublado.sig < desnublado

The output of valid signature verification is:

Good "file" signature for desnublado@release with ED25519 key SHA256:QE86VSWGb01iZskfTy8coFg1ycD8bAhXRga0r2gJoM0

Manual installation

Download the file and make it executable:

curl -fsSL -o /usr/local/bin/desnublado https://desnublado.com/desnublado && chmod +x /usr/local/bin/desnublado

Verify the digital signature and configure the options that you want by writing them to desnublado.override file or use enviroment variables.

desnublado requires the following programs:

exiftool ffmpeg imagemagick sqlite xxhash

A recent version of the programs is recommended, especially for ffmpeg.

Installation of open source software

While the quick installation instructions point to the Termux version from the playstore for being the easiest option for most people, the Termux version of F-Droid is the base of the development of this application. Apart from choosing an Android app distribution ecosystem where your freedom as a user is the top priority, this version includes some subtle differences such as the ability to hide the on-screen keyboard automatically when running desnublado.

Other recommended apps:

Fossify Gallery
Gallery app that respects your privacy. Compatible with the files generated by desnublado (avif y av1) and also allows to browse media grouped by folders and subfolders in a comfy way. (By default desnublado generates media sorted into year/month/file).

Fossify File Manager
A lightweight file explorer with essential features and nothing that you don’t need.

Aves
Aves is an excellent gallery and metadata explorer app with support for avif and av1 and some cool features.

Advanced usage

Apart from generating small versions of your photos and videos, you can use desnublado to do the following things:

Process a second folder

The settings src_extra, src_extra_done and src_extra_dst allow you to set a second folder in which existing files will be processed. This can be the folder where images from another camera app like OpenCamera are saved or just a folder where you copy the photos and videos generated by other devices (dslr camera, action camera, drone, etc)

Import from another device

You can import the photos and videos generated by desnublado in another device to yours, organizing the files by date and avoiding duplicates (depending on your settings). Copy the files to the src_import folder and run desnublado. New files will be imported, while duplicates will simply be removed.

Rebuild database

If you have used desnublado allowing duplicate content, you can rebuild the database once you change the settings to disable duplicate content.

You have two ways to trigger the database rebuild:

Create a file called desnublado.rebuild inside DCIM folder. (You can copy any file and change its name to this)

Or run the following command from the terminal:

touch $HOME/storage/shared/DCIM/desnublado.rebuild

Additional information

The files it creates

For images it creates AV1 Image Format files in an AVIF container.

AVIF sample 1
Download sample 1 (94kb)

AVIF sample 2
Download sample 2 (29kb)

For videos it creates AV1 files - AOMedia Video 1 in an MKV container


Download sample 1 (2mb)


Download sample 2 (2,6mb)

These file formats create smaller versions with a quality much higher than the typical jpeg and h264 at a considerably smaller size.

Public domain

desnublado is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to https://unlicense.org/

Why not Google Play?

I guess some people would prefer to download a desnublado “app” from the Google Play Store, however this would go against the principles of user freedom and sovereignty that this application defends.

See also Keep Android Open.

Why not an APK?

This application is deliberately created as a bash script, which is an uncompiled, simple language that allows easy modification. While there are many open source projects that publish their application compiled as .apk files on different sites, a regular user that wants to make small changes is met with several obstacles that make it difficult to understand the code and its modification and recompilation.

The code from desnublado can be read and modified from your own device with a simple text editor.

In addition, the same code that runs on Android also runs on any Linux operating system.

Show me some love

I released desnublado into the public domain because the main goal of it is to empower its users, their freedom, data soveraignity and to remove any dependencies from privacy invading third party cloud services.

It is free, as in gratis, yet you are welcome to show me some love if you like it :)

You can also drop some love words here if you want to. You will make my day!

The essence of desnublado

In essence, the following code does the same as desnublado when it is configured allowing duplicate content, without renaming into date time folders and without moving source files.

src="$HOME/storage/dcim/Camera"
dst="$HOME/storage/dcim/Camera_mini"

find "$src" -type f \( -name '*.jpg' -o -name '*.mp4' \) | while IFS= read -r file; do

    target="${file/#$src/$dst}"
    target="${target%.*}"
    mkdir -p "${target%/*}"
    echo "$file"

    case "$file" in
        *.jpg) [ ! -f "$target.avif" ] && magick "$file" -resize @900000\> -auto-orient -strip "$target.avif" ;;
        *.mp4) [ ! -f "$target.mkv" ] && SVT_LOG=1 ffmpeg -nostdin -hide_banner -loglevel error -stats -y -i "$file" -vf scale=640:640:force_original_aspect_ratio=decrease:force_divisible_by=2 -c:v libsvtav1 -crf 41 -preset 2 -c:a libopus -b:a 64k "$target.mkv" ;;
    esac

done

Issues

You can report issues at codeberg or dropping a line on simplex. Make sure that you have read the docuentation on this website first.

Options

There are two ways to change the default options. One is by editing the file desnublado.override and the other is by means of environment variables (ENV variables). If an option is specified in both an environment variable and the file denublado.override, the latter has preference.

This allows you to change the default preferences without modifying desnublado, thus allowing version updates while preserving your preferences.

Manual configuration

These are the options that can be edited using the file desnublado.override.

The first group of options can be set using desnublado override command while the rest must be edited using a plain text editor.

# configurable options
auto_update="false"
allow_dupes="false"
date_rename="true"
do_scroll="false"
move_sources="true"
show_full_path="false"
src="$HOME/storage/shared/DCIM/Camera"
src_done="$HOME/storage/shared/DCIM/Camera_done"
src_extra="$HOME/storage/shared/DCIM/Camera_extra"
src_extra_done=""
src_extra_dst=""
src_import="$HOME/storage/shared/DCIM/Camera_import"
dst="$HOME/storage/shared/DCIM/Camera_mini"
tmp="$TMPDIR"
lock_file="$HOME/.desnublado.lock"
lang_file="$config_path/desnublado.lang"
rebuild_flag="$HOME/desnublado.rebuild"
db="$HOME/desnublado.db"
min_free_mb="2048"
ext_list="mp4 mkv jpg avif"
prefer_meta="false"
prefer_utc="false"
show_ratio="false"
date_rename_sources="false"

# video encoding params
ffmpeg_params=(-vf scale=640:640:force_original_aspect_ratio=decrease:force_divisible_by=2 -c:v libsvtav1 -crf 41 -preset 2 -c:a libopus -b:a 64k)

# image encoding params
magick_params=(-resize @900000\>)

For example to change the value of src_extra:

desnublado override src_extra "storage/shared/DCIM/OpenCamera"

And to change the minimum required free space to 512MB:

desnublado override min_free_mb "512"

Use of environment variables

All configurable options except ffmpeg_params and magick_params can be modified using environment variables. The format is the prefix DNBL_ and in the name of the variable in capital letters.

For example, to change the value of src from Camera to OpenCamera using an enviroment variable:

DNBL_SRC="$HOME/storage/shared/DCIM/OpenCamera"

Note: Settings in desnublado.override have preference over environment variables.

List of variables

auto_update

[true|false] default: false

true: automatically check and install desnublado updates
false: disable auto updates

allow_dupes

[true|false] default: false

true: allows to generate duplicate content (same video/photo with different file name)
false: prevent duplicate content

date_rename

[true|false] default: true

true: creates files inside dst as YYYY/MM/YYYYMMDD_HHMMSS_MMM.ext
false: creates files inside dst with the same file name as the origial

do_scroll

[true|false] default: false

true: show the full history of processed files
false: limits history to what fits inside the screen

move_sources

[true|false] default: true

true: move source files to src_done after successful generation of the small version
false: original files are kept in src

show_full_path

[true|false] default: false

true: show full file paths
false: show relative paths to src and dst

src

[string] default: $HOME/storage/shared/DCIM/Camera

Path to the folder where photos and videos are located

src_done

[string] default: $HOME/storage/shared/DCIM/Camera_done

Path to the folder where to move processed source files

src_extra

[string] default: $HOME/storage/shared/DCIM/Camera_extra

Path to an additional folder to process photos and videos (ignored if the folder does not exists)

src_extra_done

[string] default: (empty)

Path to the folder where to move processed source files from the extra folder. If the value is empty files are moved to src_done (Only if move_sources is enabled)

src_extra_dst

[string] default: (empty)

If the value is empty files from src_extra folder are generated in dst folder, otherwise to the specified path.

src_import

[string] default: $HOME/storage/shared/DCIM/Camera_import

Path to a folder containing files generated by desnublado in another device to be imported. The settings date_rename and move_sources affect the import process. New files are moved to dst folder and repeated files are deleted. (ignored if the folder does not exists)

dst

[string] default: $HOME/storage/shared/DCIM/Camera_mini

Path to the folder where to save generated photos and videos

tmp

[string] default: $TMPDIR

Path where to save temporary files

lock_file

[string] default: $HOME/.config/desnublado/.desnublado.lock

Path to lock file that is used to prevent multiple instances running simultaneously

lang_file

[string] default: $HOME/.config/desnublado/desnublado.lang

Path to translations file

rebuild_flag

[string] default: DCIM/desnublado.rebuild

If this file exists desnublado recreates the unique content database and deletes the flag file. This is useful if you switch from allow_dupes enabled to disabled when you already generated smaller versions.

db

[string] default: $HOME/.config/desnublado/desnublado.db

Path to database file (sqlite3)

min_free_mb

[int] default: 2048

Minimum free space in megabytes that the device must have in order to keep converting media files. That’s to prevent filling up all the device’s storage.

ext_list

[string] default: mp4 mkv jpg avif

Space separated list of file extensions to process.

prefer_meta

[true|false] default: false

true: when using date_rename, determine date with: metadata -> file name -> file mod time
false: when using date_rename, determine date with: file name -> metadata -> file mod time

prefer_utc

[true|false] default: false

true: when using date_rename, convert dates to UTC
false: do not convert dates

show_ratio

[true|false] default: false

true: show the size ratio of generated target (how many times is smaller than the original)
false: do not show ratio

date_rename_sources

[true|false] default: false

true: creates files inside src_done as YYYY/MM/YYYYMMDD_HHMMSS_MMM.ext
false: keep the same file name as the origial