slopping
A script to make cropping easy when ffmpeg'ing. Needs slop, xdotool, and xwininfo.
Usage
$ ffmpeg -i input -vf crop=$(slopping) output
The window we are hovering with the mouse needs to be of the same size (w, h) of the video to extract the correct values.
To generate PIL.Image cropping coordinates, pass 'pil' as argument when executing the script:
$ slopping pil
Can also be imported as a module to query the coordinates:
[ins] In [1]: import slopping
[ins] In [2]: ffmpeg_crop = slopping.crop()
[nav] In [3]: pil_crop = slopping.crop('pil')
[ins] In [4]: ffmpeg_crop
Out[4]: (244, 210, 128, 228)
[ins] In [5]: pil_crop
Out[5]: (309, 367, 554, 484)
Installation
$ pip install slopping
Metadata
Release files for slopping 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| slopping-1.0.0.tar.gz | 2.9 kB | Without provenance | Details for slopping-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| slopping-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for slopping-1.0.0-py3-none-any.whl |
Total release size: 7.7 kB
Release files / slopping-1.0.0.tar.gz
| Download URL | slopping-1.0.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4abced1ea6797871dde6ea224cff396d236e2484d69e9e8ebf60f7b03b7a2d1
|
|
BLAKE2b-256 checksum How to use checksums |
1a671d97511743261f37d15160b00bff6d6f086bc9eeba70e3d2c47d907f4b63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.5
|
Release files / slopping-1.0.0-py3-none-any.whl
| Download URL | slopping-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
adbce3dafbdbc989a2fa5ff5ceb168fa4af30037f0688ed57ff6fd917681aae2
|
|
BLAKE2b-256 checksum How to use checksums |
dae42ebd99e4f3bddcc18b1fe9cd0b58363fcd179f39ae79e8abd131c0247734
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.5
|
Security for slopping 1.0.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.