Skip to main content

基于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


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.2.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_ffclip-0.0.2-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

Details for the file py_ffclip-0.0.2.tar.gz.

File metadata

  • Download URL: py_ffclip-0.0.2.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for py_ffclip-0.0.2.tar.gz
Algorithm Hash digest
SHA256 7024efbdbb2f14090b1c451160203c6b9098387264166acb1e7a95a221942428
MD5 e91999b714b28b1b15d697fab2bc5d9f
BLAKE2b-256 9971138ce1e97692836230f0ee5f4ccae91ff61e77b11f510e1d93343c664e55

See more details on using hashes here.

File details

Details for the file py_ffclip-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: py_ffclip-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 25.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for py_ffclip-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 34b66b3317ad0f0f673420e985114b32f4331b665d3db19f22fc834d1b1f4c02
MD5 571d3d629738c774b0f75fad3fa8bf94
BLAKE2b-256 39554ac85e68ee3e96688e268407583099dd3f9ed918f88db42771c75dc824a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page