创建覆盖文本的视频的cli。

viraloverla的Python项目详细描述


viraloverlay™

添加样式,定时文本到视频的礼物!有点像这样:

Demo

用法

vo [OPTIONS] FILEPATH OVERLAY_DATA

OVERLAY_DATA: a JSON file path OR a JSON-formatted string containing an
array of overlays, each containing key-value pairs of at least "text",
"start", and "stop". optional keys: "font_size", "font_color",
"text_position_x", and "text_position_y"

Options:
  -g, --gif             output to GIF instead of MP4
  -f, --font-path TEXT  path to the font you'd like to use.
  --help                Show this message and exit.

示例

$ vo <path_to_video> <json_transcript_filepath_or_string> [--gif --font]

(lots of ffmpeg output...)
Okay, I overlaid your text on <path_to_video_overlaid>.

JSON文本格式

json_transcript字符串或文件应该如下所示:

[
    {
        "start": 1.03,
        "stop": 1.21,
        "text": "I"
    },
    {
        "start": 1.21,
        "stop": 1.44,
        "text": "am"
    },
    {
        "start": 1.45,
        "stop": 1.84,
        "text": "saying"
    },
    {
        "start": 1.85,
        "stop": 2.25,
        "text": "some"
    },
    {
        "start": 2.25,
        "stop": 2.97,
        "text": "words"
    }
]

请参阅同级项目Transcribe all the Thingstpro,以方便自动生成此类转录本。

安装

pip install viraloverlay
brew install ffmpeg  # (if you don't have ffmpeg already)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java从JSP或HTML向servlet发送多个参数   java方法来查看字符是否在字符数组中   使用带有java的MAC地址连接到设备   java如何将csv文件中的数据打印到secondactivity?   java如何从netbean 7.0.1连接到数据库   java考虑所有可能的类值,用于输出测试分割的预测值。   java我的actionListener调用有什么问题   swing在Java中实现粒子过滤器最有效的方法是什么?   java运行。getFontFamily()为返回null。使用apachepoi的docx文件   一个事务中的java领域循环与每个步骤循环中的一个事务   java日期格式与Spring Boot不兼容   java类冲突。处理   java GridBagLayout不工作   java将图像发送到另一个应用程序