PyVideoKit-Libs 0.2.0__py3-none-any.whl → 0.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyvideokit_libs/convert_to_ffv1.py +5 -2
- pyvideokit_libs/fade_video.py +2 -5
- {pyvideokit_libs-0.2.0.dist-info → pyvideokit_libs-0.3.0.dist-info}/METADATA +72 -9
- {pyvideokit_libs-0.2.0.dist-info → pyvideokit_libs-0.3.0.dist-info}/RECORD +7 -7
- {pyvideokit_libs-0.2.0.dist-info → pyvideokit_libs-0.3.0.dist-info}/WHEEL +0 -0
- {pyvideokit_libs-0.2.0.dist-info → pyvideokit_libs-0.3.0.dist-info}/licenses/LICENSE +0 -0
- {pyvideokit_libs-0.2.0.dist-info → pyvideokit_libs-0.3.0.dist-info}/top_level.txt +0 -0
|
@@ -7,7 +7,7 @@ from . import ffmpeg_utils as utils
|
|
|
7
7
|
|
|
8
8
|
def convert_to_ffv1(
|
|
9
9
|
input_path: Path,
|
|
10
|
-
fps: int =
|
|
10
|
+
fps: int | None = None,
|
|
11
11
|
output: str | None = None,
|
|
12
12
|
on_progress: Callable[[float], None] | None = None,
|
|
13
13
|
) -> Path:
|
|
@@ -20,7 +20,10 @@ def convert_to_ffv1(
|
|
|
20
20
|
"-i", str(input_path),
|
|
21
21
|
"-map", "0",
|
|
22
22
|
"-c:v", "ffv1",
|
|
23
|
-
|
|
23
|
+
]
|
|
24
|
+
if fps is not None:
|
|
25
|
+
cmd += ["-r", str(fps)]
|
|
26
|
+
cmd += [
|
|
24
27
|
"-c:a", "pcm_s16le",
|
|
25
28
|
str(output_path),
|
|
26
29
|
]
|
pyvideokit_libs/fade_video.py
CHANGED
|
@@ -11,9 +11,8 @@ def _build_fade_cmd(
|
|
|
11
11
|
fade_out: float | None,
|
|
12
12
|
total_duration: float,
|
|
13
13
|
output_path: Path,
|
|
14
|
-
fps: int,
|
|
15
14
|
) -> list[str]:
|
|
16
|
-
v_filters = [
|
|
15
|
+
v_filters = []
|
|
17
16
|
if fade_in is not None:
|
|
18
17
|
v_filters.append(f"fade=t=in:st=0:d={fade_in:.3f}")
|
|
19
18
|
if fade_out is not None:
|
|
@@ -34,7 +33,6 @@ def _build_fade_cmd(
|
|
|
34
33
|
"-i", str(input_path),
|
|
35
34
|
"-c:v", "ffv1",
|
|
36
35
|
"-pix_fmt", "yuv420p",
|
|
37
|
-
"-r", str(fps),
|
|
38
36
|
"-vf", ",".join(v_filters),
|
|
39
37
|
]
|
|
40
38
|
if af_chain:
|
|
@@ -49,7 +47,6 @@ def fade_video(
|
|
|
49
47
|
input_path: Path,
|
|
50
48
|
fade_in: float | None = None,
|
|
51
49
|
fade_out: float | None = None,
|
|
52
|
-
fps: int = 60,
|
|
53
50
|
output: str | None = None,
|
|
54
51
|
on_progress: Callable[[float], None] | None = None,
|
|
55
52
|
) -> Path:
|
|
@@ -66,6 +63,6 @@ def fade_video(
|
|
|
66
63
|
output_path = utils.resolve_output_path(
|
|
67
64
|
utils.make_output_path(input_path, suffix="_fade"), output
|
|
68
65
|
)
|
|
69
|
-
cmd = _build_fade_cmd(input_path, fade_in, fade_out, total_duration, output_path
|
|
66
|
+
cmd = _build_fade_cmd(input_path, fade_in, fade_out, total_duration, output_path)
|
|
70
67
|
utils.run_ffmpeg_with_progress(cmd, duration=total_duration, on_progress=on_progress)
|
|
71
68
|
return output_path
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyVideoKit-Libs
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Python library for FFmpeg-based video processing
|
|
5
5
|
Author-email: Evilchuck666 <carlos.martinez.medina1992@gmail.com>
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
@@ -686,7 +686,7 @@ Description-Content-Type: text/markdown
|
|
|
686
686
|
License-File: LICENSE
|
|
687
687
|
Dynamic: license-file
|
|
688
688
|
|
|
689
|
-
#
|
|
689
|
+
# 🎬 PyVideoKit-Libs
|
|
690
690
|
|
|
691
691
|

|
|
692
692
|

|
|
@@ -698,10 +698,10 @@ Python library for FFmpeg-based video and audio processing. Provides the core fu
|
|
|
698
698
|
## ✨ Features
|
|
699
699
|
|
|
700
700
|
- 📼 **VHS effect** — retro visual noise, color bleed, and audio degradation
|
|
701
|
-
- ✂️ **Trim** — cut a segment by start/end time with stream copy
|
|
701
|
+
- ✂️ **Trim** — cut a segment by start/end time with stream copy (no re-encoding)
|
|
702
702
|
- 🔗 **Concatenate** — join multiple videos with stream compatibility validation
|
|
703
703
|
- 🎬 **Fade** — fade-in and/or fade-out on an FFV1 master
|
|
704
|
-
- 🔊 **Extract audio** — dump the audio track to uncompressed WAV
|
|
704
|
+
- 🔊 **Extract audio** — dump the audio track to uncompressed WAV (PCM 16-bit)
|
|
705
705
|
- 🎞️ **Convert to FFV1** — create a lossless MKV master for editing
|
|
706
706
|
- 📺 **Prepare for YouTube** — encode to ProRes 422 HQ MOV, upscaled to 4K
|
|
707
707
|
|
|
@@ -719,10 +719,72 @@ No Python package dependencies — the library delegates all heavy lifting to ex
|
|
|
719
719
|
|
|
720
720
|
## 🔧 Installation
|
|
721
721
|
|
|
722
|
+
### 🏗️ Arch Linux (AUR)
|
|
723
|
+
|
|
724
|
+
```bash
|
|
725
|
+
yay -S python-pyvideokit-libs
|
|
726
|
+
```
|
|
727
|
+
|
|
728
|
+
FFmpeg, FFprobe, and SoX are installed automatically as pacman dependencies.
|
|
729
|
+
|
|
730
|
+
### 🐍 Other systems (pip)
|
|
731
|
+
|
|
732
|
+
```bash
|
|
733
|
+
pip install PyVideoKit-Libs
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
Make sure **FFmpeg**, **FFprobe**, and **SoX** are available in your `PATH`.
|
|
737
|
+
|
|
738
|
+
---
|
|
739
|
+
|
|
740
|
+
## 🖥️ Desktop Integration
|
|
741
|
+
|
|
742
|
+
If you also have [PyVideoKit-GUI](https://pypi.org/project/PyVideoKit-GUI/) installed, you can add it to your application launcher. Arch Linux users get this automatically via the AUR package. For all other systems:
|
|
743
|
+
|
|
744
|
+
**1. Save the icon:**
|
|
745
|
+
|
|
746
|
+
```bash
|
|
747
|
+
mkdir -p ~/.local/share/icons/hicolor/scalable/apps
|
|
748
|
+
cat > ~/.local/share/icons/hicolor/scalable/apps/pvk-gui.svg << 'EOF'
|
|
749
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
|
|
750
|
+
<rect x="4" y="14" width="40" height="30" rx="3" fill="#2d3561"/>
|
|
751
|
+
<rect x="10" y="19" width="28" height="20" rx="2" fill="#1a2038"/>
|
|
752
|
+
<polygon points="18,21 18,37 33,29" fill="#ff6b6b"/>
|
|
753
|
+
<rect x="4" y="6" width="40" height="8" rx="2" fill="#ff6b6b"/>
|
|
754
|
+
<rect x="11" y="6" width="6" height="8" fill="#ffffff"/>
|
|
755
|
+
<rect x="23" y="6" width="6" height="8" fill="#ffffff"/>
|
|
756
|
+
<rect x="35" y="6" width="5" height="8" fill="#ffffff"/>
|
|
757
|
+
</svg>
|
|
758
|
+
EOF
|
|
759
|
+
```
|
|
760
|
+
|
|
761
|
+
**2. Create the `.desktop` entry:**
|
|
762
|
+
|
|
763
|
+
```bash
|
|
764
|
+
mkdir -p ~/.local/share/applications
|
|
765
|
+
cat > ~/.local/share/applications/pvk-gui.desktop << 'EOF'
|
|
766
|
+
[Desktop Entry]
|
|
767
|
+
Version=1.0
|
|
768
|
+
Type=Application
|
|
769
|
+
Name=PyVideoKit
|
|
770
|
+
GenericName=Video Processing Tool
|
|
771
|
+
Comment=FFmpeg-based video processing GUI
|
|
772
|
+
Exec=pvk-gui
|
|
773
|
+
Icon=pvk-gui
|
|
774
|
+
Categories=AudioVideo;Video;AudioVideoEditing;
|
|
775
|
+
Terminal=false
|
|
776
|
+
Keywords=video;ffmpeg;trim;fade;vhs;youtube;convert;
|
|
777
|
+
EOF
|
|
778
|
+
```
|
|
779
|
+
|
|
780
|
+
**3. Refresh the icon cache** *(may be required on some desktop environments)*:
|
|
781
|
+
|
|
722
782
|
```bash
|
|
723
|
-
|
|
783
|
+
gtk-update-icon-cache ~/.local/share/icons/hicolor/
|
|
724
784
|
```
|
|
725
785
|
|
|
786
|
+
PyVideoKit will now appear in your application launcher.
|
|
787
|
+
|
|
726
788
|
---
|
|
727
789
|
|
|
728
790
|
## 🚀 Quick Start
|
|
@@ -782,7 +844,7 @@ out = join_videos([Path("clip1.mkv"), Path("clip2.mkv"), Path("clip3.mkv")])
|
|
|
782
844
|
|
|
783
845
|
---
|
|
784
846
|
|
|
785
|
-
#### `fade_video(input_path, fade_in=None, fade_out=None,
|
|
847
|
+
#### `fade_video(input_path, fade_in=None, fade_out=None, output=None, on_progress=None) -> Path`
|
|
786
848
|
|
|
787
849
|
Add fade-in and/or fade-out to an FFV1 video. Output is re-encoded as FFV1 with PCM audio.
|
|
788
850
|
|
|
@@ -802,12 +864,13 @@ out = extract_audio(Path("video.mkv"))
|
|
|
802
864
|
|
|
803
865
|
---
|
|
804
866
|
|
|
805
|
-
#### `convert_to_ffv1(input_path, fps=
|
|
867
|
+
#### `convert_to_ffv1(input_path, fps=None, output=None, on_progress=None) -> Path`
|
|
806
868
|
|
|
807
|
-
Convert any video to a lossless FFV1/MKV master. Use this as the first step before applying effects.
|
|
869
|
+
Convert any video to a lossless FFV1/MKV master. Use this as the first step before applying effects. `fps` defaults to `None` (preserve source frame rate); pass an integer to force a specific rate.
|
|
808
870
|
|
|
809
871
|
```python
|
|
810
|
-
master = convert_to_ffv1(Path("recording.mp4")
|
|
872
|
+
master = convert_to_ffv1(Path("recording.mp4")) # preserve source fps
|
|
873
|
+
master = convert_to_ffv1(Path("recording.mp4"), fps=60) # force 60 fps
|
|
811
874
|
```
|
|
812
875
|
|
|
813
876
|
---
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
pyvideokit_libs/__init__.py,sha256=HCb41JcZdwarzPmzzf0cmWHvlMElgaa2uxofJLzHdZM,1341
|
|
2
2
|
pyvideokit_libs/apply_vhs_effect.py,sha256=qX8RXHO58B4LR8_GPtARyz7H_0h9k8sq1ba-bvvSmTA,4619
|
|
3
3
|
pyvideokit_libs/concat_videos.py,sha256=_po7RW84vlisEvbv03YekXi29JdLCy_HIpAbSEqvLGU,2369
|
|
4
|
-
pyvideokit_libs/convert_to_ffv1.py,sha256=
|
|
4
|
+
pyvideokit_libs/convert_to_ffv1.py,sha256=VWmWajo6_ofLDo5VLpTvQWbe48TFNA6zen9XtYfIvP0,842
|
|
5
5
|
pyvideokit_libs/extract_audio.py,sha256=FoySaZnKKn80S4vwhKYyaEDIfjQSt_dhzc7YPqFuKUA,691
|
|
6
|
-
pyvideokit_libs/fade_video.py,sha256=
|
|
6
|
+
pyvideokit_libs/fade_video.py,sha256=3tuUeTepo-K9j2xkb77KCVaCvGFzZ2fMNpcn0LYSHY0,2235
|
|
7
7
|
pyvideokit_libs/ffmpeg_utils.py,sha256=8zzKyhml1zJRO5sNguMhKW1yGS3cTV5l_M85aTK-fOI,7798
|
|
8
8
|
pyvideokit_libs/prepare_youtube.py,sha256=4tK2rob_W9Na1Y5lgD3AUgruNgFMq534KD3pdgIHJsY,1044
|
|
9
9
|
pyvideokit_libs/trim_video.py,sha256=Oqb76JvJTPos_fsEYG44TiNYjyxmj-x5m_ebTyOR-os,1204
|
|
10
|
-
pyvideokit_libs-0.
|
|
11
|
-
pyvideokit_libs-0.
|
|
12
|
-
pyvideokit_libs-0.
|
|
13
|
-
pyvideokit_libs-0.
|
|
14
|
-
pyvideokit_libs-0.
|
|
10
|
+
pyvideokit_libs-0.3.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
11
|
+
pyvideokit_libs-0.3.0.dist-info/METADATA,sha256=A1EyRqLzPqFY3u8KfvykFGvEIMdqxN3q-fyZoYSvsJk,48590
|
|
12
|
+
pyvideokit_libs-0.3.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
13
|
+
pyvideokit_libs-0.3.0.dist-info/top_level.txt,sha256=c7_48-dt9O7bTckB11y9fIfv0kE3oO9txvU6az99YjU,16
|
|
14
|
+
pyvideokit_libs-0.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|