Metadata-Version: 2.4
Name: smugglerjpg
Version: 1.0.2
Summary: High-performance CLI tool to generate dynamic slideshow videos and reverse-extract clean slide images.
Keywords: slideshow,video,images,photo-gallery,ffmpeg,opencv,cli,backup,youtube,rutube,telegram,extraction
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Environment :: Console
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Multimedia :: Graphics
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: numpy
Requires-Dist: opencv-python-headless
Requires-Dist: tqdm

# SmugglerJPG

Store your photos (galleries) on youtube or any other video hosting or messenger (rutube / telegram / max) for free! (You can use "unlisted"/"private" visibility or even drafts to keep it private from public)

~~~bash
# create a slideshow (with music!) 
smugglerjpg create /path/to/images -o output.mp4 -a /path/to/music_folder -d 4.0

# upload to youtube
# download  (use yt-dlp or just studio.youtube.com)

# extract images from video
smugglerjpg extract /tmp/video_from_youtube.webm -o /tmp/extracted
~~~

## Warning
Vibe-coded for personal purpose. Do not expect much quality from this project. (I do not trust LLM as programmers). But it works for me.

## Installation

### Method 1: Installing via pipx (Recommended for CLI)
You can install the CLI tool globally and safely in an isolated environment directly from the Git repository:

```bash
pipx install git+https://github.com/yaroslaff/smugglerjpg.git
```

### Method 2: Installing from source
Clone the repository and install it in editable mode:

```bash
git clone https://github.com/yaroslaff/smugglerjpg.git
cd smugglerjpg
pip install -e .
```

> **Note**: Video encoding and audio muxing require **FFmpeg** (including `ffprobe`) installed on your system.

## CLI Usage

The `smugglerjpg` command becomes globally accessible after installation.

### 1. Create a Slideshow (`create`)

Generate a slideshow video from a directory of images and overlay background music:

```bash
smugglerjpg create /path/to/images -o output.mp4 -a /path/to/music_folder -d 4.0
```

Add `-v` to inspect the exact ffmpeg commands used:

```bash
smugglerjpg create -v /path/to/images -o output.mp4 -d 4.0
```

---

### 2. Extract Slides Back from Video (`extract`)

Extract original slides cleanly from any slideshow video:

```bash
smugglerjpg extract output.mp4 -o /path/to/extracted_images
```

The extractor auto-detects slide duration by analyzing frame differences, then grabs the center frame of each segment. If OpenCV cannot decode the video (e.g. AV1 codec), it falls back to ffmpeg automatically. Use `-v` to see the ffmpeg/ffprobe commands.
