Python helpers to manipulate video from vapoursynth
Project description
python-bestsource
A library helper for producing and manipulating videos with audio support in vapoursynth using bestsource
Current state
Sound is working with vspreview as soon as Track1 is selected in the Playback sub panel hidden by default and play is triggered for a video that has sound and has not been trimmed. I provide a test video in test/ and two examples scripts
trim.vpy:
Shows how trim is handled with video that has sound - the player I used is a forked vspreview 0.7.1 to fix bug in main/window.py that has been handled in new version of vspreview. Easy answer from authors is you upgrade your python version due to requirement in one dependency vstools to have the fix done with new versions of vspreview.
frame.vpy
Show frame props of a clip different ways. Under scite you can trigger vspreview with [F5] or compile - In test I let you the scite config file. Both works fine for a non trimed video.
aegisub audio tests support in vapoursynth
This requires vapoursynth fork from Arch1t3cht and the use of peagisub for vapoursynth plugin dir configuration. Two subtitles files are provided:
Open tests/VTS_01_1-trim100.ass then tests/VTS_01_1-trim100.vpy delivers video as channel 0 and audio as channel 1 this is not supported by current release that disable Open AUdio from Video feature.
As I did not find a way to know which type of channel audio or video is requested. I opened thus a Request for feature
Open tests/VTS_01_1-trim100-video-audio.ass then tests/VTS_01_1-trim100-video.vpy delivers video as channel 0 then tests/VTS_01_1-trim100-audio.vpy delivers audio as channel 0 (separately in time)
this works if you ensure plays does not goes outside boundary ie frame 101 else you will be flooded by popups. Play and seeking work fine and did not stall in middle there is just a minor problem with the horizonthal zoom for audio
Installation
as local user
pip3 install -U python-bssource
for all
sudo pip3 install python-bssource
For those who want to bridge to arch1tech's aegisub fork, use my lua helper peagisub to get the path of the vapoursynth plugin needed by aegisub_vs.py.
Limitations / Considerations
The choice for authors of vspreview not wanting to fix broken old versions for reason of time and efficiency, claiming fixes has been done with recent versions is understable.
However, this means forcing everybody to upgrade python to the latest release to make it work this requirement exludes normal ubuntu end users stalled with python 3.10. Python support does not follow such a rule and let two precedent version open.
In addition refusing contributions and considering everyone is working in a developper destop env is another thing
Normally, this does not allow arrogance as a group of developpers a place to insult others and trigger ban first to show their superiority and then dicussion.
For now what we can expect is from this: player stalling and sound goes outside boundaries when you insists on resuming play. It may have bee fixed in latest release of vspreview.
It is not quite clear that it comes from vspreview as the trim part is still experimental and when I trimed to the length of video making normally the video untouched, the audio problems arise.
History
1.0.0 - First release
Contributing
Feel free to add other object and fixes.
Development
Compile .egg
$ ./package.sh
Upload to PyPI
- Create an API Token from the Web UI. (Edit your
~/.pypirc
with the generated token.) - Install Twine
$ python3 -m pip install --user --upgrade twine
- Upload the bundle
$ python3 -m twine upload dist/*
Note: The upload to PyPI is currently assured by GitHub Actions.
Release
- Increase the version number in
setup.py
. - Commit and push.
- Create a new tag in GitHub to trigger the CI pipeline.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file python_bestsource-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: python_bestsource-1.0.0-py3-none-any.whl
- Upload date:
- Size: 26.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cd898407c9bbafba5570954206cea7942962c3bab0e45539853fc475cab3dfe |
|
MD5 | 6e8bdbe8c9f7047bfd822928dcd056da |
|
BLAKE2b-256 | 82e150d136c4270e22af492fa9ac891ea8834c4abeb7e165d64d12873b96d1d6 |