## 介绍
使用python来剪辑视频!
借助moviepy这个库
github repo:
[https://github.com/chunleili/cut_video](https://github.com/chunleili/cut_video)
## 安装
你可以使用
```
pip install cut_video
```
来下载。(推荐,因为还会在你系统内安装同名的命令行工具)
或者直接clone这个repo
## 用法
在当前文件夹下
1. 你需要提供mp4视频: full.mp4
2. 你需要在to_erase.json中输入需要剪辑去掉的部分
例如
```json
[ ["0:22", "1:14"],
["1:25", "1:30"],
["2:13", "2:25"]
]
```
代表我想要去掉0:22-1:14, 1:25-1:30 和2:13-2:25 这三个时间片段, 保留剩下的。
结果在 final.mp4当中
假如你使用pip的方式安装,只需要运行
```
cut_video
```
即可
## 其他运行方式
你还可以运行python脚本的方式来运行
```
python cut_video.py
```
或者如果你安装了jupyter,也可以运行ipython脚本
```
cut_video.ipynb
```
## 视频教程
请见视频教程
https://www.bilibili.com/video/BV1xG4y137WJ/
Raw data
{
"_id": null,
"home_page": "https://github.com/chunleili/cut_video",
"name": "cut-video",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python,moviepy,cut video",
"author": "chunlei li",
"author_email": "li_cl@foxmail.com",
"download_url": "https://files.pythonhosted.org/packages/79/64/24ff2d55a772633c1dded101c1c76ae1351f05e41e5840134f537b8118e5/cut_video-0.0.10.tar.gz",
"platform": null,
"description": "## \u4ecb\u7ecd\n\u4f7f\u7528python\u6765\u526a\u8f91\u89c6\u9891\uff01\n\n\u501f\u52a9moviepy\u8fd9\u4e2a\u5e93\n\ngithub repo: \n\n[https://github.com/chunleili/cut_video](https://github.com/chunleili/cut_video)\n\n## \u5b89\u88c5\n\u4f60\u53ef\u4ee5\u4f7f\u7528\n```\npip install cut_video\n```\n\u6765\u4e0b\u8f7d\u3002\uff08\u63a8\u8350\uff0c\u56e0\u4e3a\u8fd8\u4f1a\u5728\u4f60\u7cfb\u7edf\u5185\u5b89\u88c5\u540c\u540d\u7684\u547d\u4ee4\u884c\u5de5\u5177\uff09\n\n\n\u6216\u8005\u76f4\u63a5clone\u8fd9\u4e2arepo\n\n## \u7528\u6cd5\n\u5728\u5f53\u524d\u6587\u4ef6\u5939\u4e0b\n\n1. \u4f60\u9700\u8981\u63d0\u4f9bmp4\u89c6\u9891: full.mp4\n\n2. \u4f60\u9700\u8981\u5728to_erase.json\u4e2d\u8f93\u5165\u9700\u8981\u526a\u8f91\u53bb\u6389\u7684\u90e8\u5206\n\n\u4f8b\u5982\n```json\n[ [\"0:22\", \"1:14\"],\n [\"1:25\", \"1:30\"],\n [\"2:13\", \"2:25\"]\n]\n```\n\n\u4ee3\u8868\u6211\u60f3\u8981\u53bb\u63890:22-1:14, 1:25-1:30 \u548c2:13-2:25 \u8fd9\u4e09\u4e2a\u65f6\u95f4\u7247\u6bb5, \u4fdd\u7559\u5269\u4e0b\u7684\u3002\n\n\u7ed3\u679c\u5728 final.mp4\u5f53\u4e2d\n\n\u5047\u5982\u4f60\u4f7f\u7528pip\u7684\u65b9\u5f0f\u5b89\u88c5\uff0c\u53ea\u9700\u8981\u8fd0\u884c\n```\ncut_video\n```\n\u5373\u53ef\n\n## \u5176\u4ed6\u8fd0\u884c\u65b9\u5f0f\n\u4f60\u8fd8\u53ef\u4ee5\u8fd0\u884cpython\u811a\u672c\u7684\u65b9\u5f0f\u6765\u8fd0\u884c\n\n```\npython cut_video.py\n```\n\n\u6216\u8005\u5982\u679c\u4f60\u5b89\u88c5\u4e86jupyter\uff0c\u4e5f\u53ef\u4ee5\u8fd0\u884cipython\u811a\u672c\n\n```\ncut_video.ipynb\n```\n\n## \u89c6\u9891\u6559\u7a0b\n\n\u8bf7\u89c1\u89c6\u9891\u6559\u7a0b\n\nhttps://www.bilibili.com/video/BV1xG4y137WJ/\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Easily cut the video by moviepy",
"version": "0.0.10",
"split_keywords": [
"python",
"moviepy",
"cut video"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "5192365a7fb1d5b7427a70ec50274a89",
"sha256": "971ebc86059ee6e1777b0bd3554576ac5dbe0f1e68056d23e991156506fc670c"
},
"downloads": -1,
"filename": "cut_video-0.0.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5192365a7fb1d5b7427a70ec50274a89",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6154,
"upload_time": "2022-12-16T17:59:50",
"upload_time_iso_8601": "2022-12-16T17:59:50.834597Z",
"url": "https://files.pythonhosted.org/packages/0f/08/9192aed4cb0047a092bdbdadb161ef9c114a23fbdb2bbf36398dda2d5601/cut_video-0.0.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "6f0195d93176fe1dbc88c0c2de62e5a3",
"sha256": "f8420ed09d815f6766fe8e9c1f7276d53b3cebb286857d13196c242c2eb47145"
},
"downloads": -1,
"filename": "cut_video-0.0.10.tar.gz",
"has_sig": false,
"md5_digest": "6f0195d93176fe1dbc88c0c2de62e5a3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4184,
"upload_time": "2022-12-16T17:59:52",
"upload_time_iso_8601": "2022-12-16T17:59:52.739260Z",
"url": "https://files.pythonhosted.org/packages/79/64/24ff2d55a772633c1dded101c1c76ae1351f05e41e5840134f537b8118e5/cut_video-0.0.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-16 17:59:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "chunleili",
"github_project": "cut_video",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "cut-video"
}