https://github.com/cycneuramus/signal-backup-shrink
Reduce the size of Signal backup files
https://github.com/cycneuramus/signal-backup-shrink
pillow python signal signal-backup vcsi
Last synced: about 1 month ago
JSON representation
Reduce the size of Signal backup files
- Host: GitHub
- URL: https://github.com/cycneuramus/signal-backup-shrink
- Owner: cycneuramus
- Created: 2022-05-27T09:26:57.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-07-18T15:30:27.000Z (11 months ago)
- Last Synced: 2025-04-19T04:41:28.107Z (about 1 month ago)
- Topics: pillow, python, signal, signal-backup, vcsi
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 13
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Overview
This is a companion script to [signalbackup-tools](https://github.com/bepaald/signalbackup-tools) that reduces the size of a Signal backup by processing message attachments of the following file types:
+ `.jpg, .png` (resized and compressed)
+ `.gif, .mp4, .mkv, .3gp` (replaced with a collage of keyframes)Using this method, I was able to reduce my Signal backup size by about 80% (from 4GB to 800MB) without having to delete anything and thus lose context in the message history.
## Dependencies
+ [signalbackup-tools](https://github.com/bepaald/signalbackup-tools)
+ [vcsi](https://github.com/amietn/vcsi)
+ [filetype](https://pypi.org/project/filetype)
+ [pillow](https://pypi.org/project/Pillow)## Usage
1. Dump the unencrypted backup components to disk:
`signalbackup-tools [backupfile] [password] --output [directory]`
2. Process message attachments:
`signal-backup-shrink.py [directory]`
3. Re-encrypt backup with processed attachments:
`signalbackup-tools [directory] --replaceattachments -o OUTPUT.backup -op [password]`
## Limitations
Currently, `signalbackup-tools` [only supports replacing attachments with images](https://github.com/bepaald/signalbackup-tools/issues/68#issuecomment-1138812152). Hence, it is not possible to
+ process audio files (such as voice recordings)
+ replace gifs or videos with smaller versions
+ optimize PDFs or other documents