## 介绍
使用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-video2",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, moviepy, cut video",
"author": "lqc1234",
"author_email": "948961528@qq.com",
"download_url": "https://files.pythonhosted.org/packages/a6/50/e8e7222fa69b7dc2c4313c20f1877a47a11212c4bc16d94e2768452e0b3e/cut_video2-0.0.12.tar.gz",
"platform": null,
"description": "## \u4ecb\u7ecd\r\n\u4f7f\u7528python\u6765\u526a\u8f91\u89c6\u9891\uff01\r\n\r\n\u501f\u52a9moviepy\u8fd9\u4e2a\u5e93\r\n\r\ngithub repo: \r\n\r\n[https://github.com/chunleili/cut_video](https://github.com/chunleili/cut_video)\r\n\r\n## \u5b89\u88c5\r\n\u4f60\u53ef\u4ee5\u4f7f\u7528\r\n```\r\npip install cut_video\r\n```\r\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\r\n\r\n\r\n\u6216\u8005\u76f4\u63a5clone\u8fd9\u4e2arepo\r\n\r\n## \u7528\u6cd5\r\n\u5728\u5f53\u524d\u6587\u4ef6\u5939\u4e0b\r\n\r\n1. \u4f60\u9700\u8981\u63d0\u4f9bmp4\u89c6\u9891: full.mp4\r\n\r\n2. \u4f60\u9700\u8981\u5728to_erase.json\u4e2d\u8f93\u5165\u9700\u8981\u526a\u8f91\u53bb\u6389\u7684\u90e8\u5206\r\n\r\n\u4f8b\u5982\r\n```json\r\n[ [\"0:22\", \"1:14\"],\r\n [\"1:25\", \"1:30\"],\r\n [\"2:13\", \"2:25\"]\r\n]\r\n```\r\n\r\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\r\n\r\n\u7ed3\u679c\u5728 final.mp4\u5f53\u4e2d\r\n\r\n\u5047\u5982\u4f60\u4f7f\u7528pip\u7684\u65b9\u5f0f\u5b89\u88c5\uff0c\u53ea\u9700\u8981\u8fd0\u884c\r\n```\r\ncut_video\r\n```\r\n\u5373\u53ef\r\n\r\n## \u5176\u4ed6\u8fd0\u884c\u65b9\u5f0f\r\n\u4f60\u8fd8\u53ef\u4ee5\u8fd0\u884cpython\u811a\u672c\u7684\u65b9\u5f0f\u6765\u8fd0\u884c\r\n\r\n```\r\npython cut_video.py\r\n```\r\n\r\n\u6216\u8005\u5982\u679c\u4f60\u5b89\u88c5\u4e86jupyter\uff0c\u4e5f\u53ef\u4ee5\u8fd0\u884cipython\u811a\u672c\r\n\r\n```\r\ncut_video.ipynb\r\n```\r\n\r\n## \u89c6\u9891\u6559\u7a0b\r\n\r\n\u8bf7\u89c1\u89c6\u9891\u6559\u7a0b\r\n\r\nhttps://www.bilibili.com/video/BV1xG4y137WJ/\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Easily cut the video by moviepy",
"version": "0.0.12",
"project_urls": {
"Homepage": "https://github.com/chunleili/cut_video"
},
"split_keywords": [
"python",
" moviepy",
" cut video"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2d0cffb75c241b5393e1d5776110c1760aaa3fec0032700987750ebf24b81b94",
"md5": "7802320ff3f27341c064c62083fef3aa",
"sha256": "eeaee02c7caee72343d22d61995a583089bbefaab16d65cf62a666536f23cff1"
},
"downloads": -1,
"filename": "cut_video2-0.0.12-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7802320ff3f27341c064c62083fef3aa",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6138,
"upload_time": "2024-11-10T13:19:55",
"upload_time_iso_8601": "2024-11-10T13:19:55.821877Z",
"url": "https://files.pythonhosted.org/packages/2d/0c/ffb75c241b5393e1d5776110c1760aaa3fec0032700987750ebf24b81b94/cut_video2-0.0.12-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a650e8e7222fa69b7dc2c4313c20f1877a47a11212c4bc16d94e2768452e0b3e",
"md5": "75cc86b84c5abe2e78e26f6a33f28ff6",
"sha256": "bcc78a91b1b5f7924073b2701d3c86e088fc95eb086029a86bc24d6db228c7fb"
},
"downloads": -1,
"filename": "cut_video2-0.0.12.tar.gz",
"has_sig": false,
"md5_digest": "75cc86b84c5abe2e78e26f6a33f28ff6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4382,
"upload_time": "2024-11-10T13:19:57",
"upload_time_iso_8601": "2024-11-10T13:19:57.130347Z",
"url": "https://files.pythonhosted.org/packages/a6/50/e8e7222fa69b7dc2c4313c20f1877a47a11212c4bc16d94e2768452e0b3e/cut_video2-0.0.12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-10 13:19:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "chunleili",
"github_project": "cut_video",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "cut-video2"
}