semvec/pypi-packages huggingface dataset:
bser-python-client 0.0.4
A Python API client for bser-open-api
Requires Python: >=3.6

# BSER Python API Client

> [블랙서바이벌: 영원회귀 openapi](https://developer.eternalreturn.io/) 를 위한 Python API Client 입니다.
>
> A Python API Client for [Black Survival: Eternal Return openapi](https://developer.eternalreturn.io/).

## Requirements

- Python 3.6 or higher
- [requests](https://github.com/psf/requests)

## Installation

```
$ pip install bser-python-client
```

If you use pipenv,

```
$ pipenv install bser-python-client
```

## Example

Before run examples,

```
$ python setup.py develop
```

And then,

```python
from bser_client import BserAPIClient

api_client = BserAPIClient(api_key='your_token', version='v1')

characters = api_client.fetch_meta_data(meta_type='Character')

for character in characters:
    print(character.get('name'))
```

[More examples](/examples)
video-scene-detect 0.4.2
Scene detection from video files(.mp4)

# video-scene-detect
video-scene-detect is a Python library for extracting scenes from a video file. The package uses mulitprocessing at each of the steps to make the it fully-optimized.  

## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install video-scene-detect.

```bash
pip install video-scene-detect
```
## Dependencies
It uses [pyscenedetect](https://pypi.org/project/scenedetect/) for shots detection and [Optimal Sequential Grouping](https://github.com/ivi-ru/video-scene-detection) for finding the optimal number of scenes. It uses [ffmpeg](https://ffmpeg.org/) for extracting the scenes from main video file. Make sure you have pyscenedetect and ffmpeg installed on your system before using this package. This is tested on Windows 64-bit environment. 

## Flow
1. The package first finds shots using scenedetect and store them in a folder called 'shots'.
2. Create embeddings for each shot and store it in 'shots_embeddings'.
3. Compute similarity matrix between each shot and store in 'distance_matrix'.
4. Get optimal sequences of shots that form a scene and store the scenes into 'scenes_output'.

## Usage

```python
from video_scene_detect.SceneDetect import VideoSceneDetect

## Read in your mp4 file

scene_detect = VideoSceneDetect('path to your mp4 file')

## Use Pyscenedetect for finding and saving shots into different folders
## This creates a folder called shots in your directory 

scene_detect.find_and_save_shots()

## The shots to feature function will create embeddings for each of the shots

scene_detect.shots_to_features()

## Find similarity between each shots and compute a distance matrix

dist_mat = scene_detect.compute_similarity_matrix()

## Find the optimal sequences (shots) which can be grouped together to form a scene
## This outputs the indexes of the last shot of each scene  

optimal_sequence = scene_detect.get_optimal_scene(dist_mat)

## We then use ffmpeg to cut the original videos into scene

scene_detect.save_scenes(optimal_sequence)
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)