Skip to main content

flavpy

flavpyは、味覚情報を埋め込み可能なファイル形式:FlavMP4のキャプチャ、書き込みを行います

インストール方法

pip install flavpy

使用方法

FlavCaptureで読み込み、FlavWriterで書き込みを行います

FlavCapture

FlavMP4ファイルを読み込みます

import flavpy

#コンテキストマネージャを使う場合
with flavpy.FlavCapture("taste.mp4", modal="taste") as cap:
    while True:
        # ret 読み込み成功したかどうか
        # data 読み込んだデータ(ndarray)
        # delta フレームの持続時間(メディア時間基準)
        ret, data, delta = cap.read()
        if not ret:
            break

FlavWriter

FlavMP4ファイルを書き込みます

import flavpy
import numpy as np
#コンテキストマネージャを使う場合 (使わない場合は最後にwriter.export()してください)

#ここでは、add_modalでファイルを指定して、動画ファイルに味覚を付与しています。
with flavpy.FlavWriter("output2.mp4","taste",codec="raw5", fps=60, add_modal_on="output.mp4") as writer:
    data = [[(i*10)%256, i%256, i%256, i%256, i%256] for i in range(100)]
    for d in data:
        writer.write(np.array(d,dtype=np.uint8))

Metadata

Release files for flavpy 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flavpy 1.0.2
File Size Uploaded Provenance
flavpy-1.0.2.tar.gz 6.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for flavpy 1.0.2
File Interpreter ABI Platform
flavpy-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 13.0 kB

Release files / flavpy-1.0.2.tar.gz

Download URL flavpy-1.0.2.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
66d3701cced4f571d9936d9b438998769d1562dd32e7140928d9a60b6e35cb57
BLAKE2b-256 checksum
How to use checksums
12b1b8f49e281d81453b3382a42c57abd365a29837fcafdf636ea1a549fe3dc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release files / flavpy-1.0.2-py3-none-any.whl

Download URL flavpy-1.0.2-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
465a2a735572ef1edd83de4fd64924780dd4979e1c1f06ac551b56db4eb799c6
BLAKE2b-256 checksum
How to use checksums
e4e2391e1cc2a703646c497fe0b1386ccd8c6a26e523ddb9ad8793e048dc8893
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Security for flavpy 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page