基于python封装的ffmpeg视频处理工具,依赖ffmpeg命令行
Project description
PyFFclip
PyFFclip 是一个基于FFmpeg命令行实现的Python库,可以用于处理视频编解码、组合剪辑等操作。
安装
你可以使用pip安装PyFFclip:
pip install py-ffclip
使用
- 获取视频时长
from ffclip import FFVideoClip
clip = FFVideoClip("input.mp4")
print(clip.duration)
clip.write_video("output.mp4",fps=30,codec="libx264")
- 组合剪辑
from ffclip import FFVideoClip, FFImageClip, FFTextClip, FFCompositeVideoClip
clip1 = FFImageClip("input1.png")
bg_video = FFVideoClip("input2.mp4")
text1 = FFTextClip("Hello world!", fontsize=60, color="green", size=(500, 500)).set_duration(5).alpha(0.1)
composite_clip = FFCompositeVideoClip([bg_video, clip1, text1])
composite_clip.write_video("out.mp4")
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 Distribution
py_ffclip-0.0.1.tar.gz
(17.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
py_ffclip-0.0.1-py3-none-any.whl
(23.5 kB
view details)
File details
Details for the file py_ffclip-0.0.1.tar.gz.
File metadata
- Download URL: py_ffclip-0.0.1.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23838c9f1d9c634c98caf8a67eea1baa0b40b12cef97972058c513373c026e38
|
|
| MD5 |
2db07d41cc1d7d1925d9ed6ea9c860bc
|
|
| BLAKE2b-256 |
c35c29cc573c3ea4cfe843b8972bf98f0ee004028ab0405407a2344166035ba1
|
File details
Details for the file py_ffclip-0.0.1-py3-none-any.whl.
File metadata
- Download URL: py_ffclip-0.0.1-py3-none-any.whl
- Upload date:
- Size: 23.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5da4354f6d19d4a5ad4955a54d7336c829ad0556ffffd2ddeed8dfb92da775a3
|
|
| MD5 |
1c983a1986f0d83e8bf8098946d35df7
|
|
| BLAKE2b-256 |
51a4e6cb78cbfc1381a012f10a1a55835af7e4306dfec413bc4de5ff44a20eef
|