## 介绍
使用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-video123423",
"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/4d/53/e0c51a14c272cee416e7076dc1aa07bcb64d06cb755880bf7fbaec3c06c5/cut_video123423-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": "503723ac0e5929ccabaf7284779990d161955072a66e12ccdf50e0efb4f99fa1",
"md5": "0befb160aa2cd523b1cd7858a9e56042",
"sha256": "3e7ca6a0e8cc699c1eb313ce39b1382053022900ec6198b66f6cb9e597954874"
},
"downloads": -1,
"filename": "cut_video123423-0.0.12-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0befb160aa2cd523b1cd7858a9e56042",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6227,
"upload_time": "2024-11-10T13:37:17",
"upload_time_iso_8601": "2024-11-10T13:37:17.707163Z",
"url": "https://files.pythonhosted.org/packages/50/37/23ac0e5929ccabaf7284779990d161955072a66e12ccdf50e0efb4f99fa1/cut_video123423-0.0.12-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4d53e0c51a14c272cee416e7076dc1aa07bcb64d06cb755880bf7fbaec3c06c5",
"md5": "3825724ada6b84918c1da4f645adcc7b",
"sha256": "e5686ade780f5459bee5bb0067dada5c4955bde92ec3982a60d6ecabdb9e86ef"
},
"downloads": -1,
"filename": "cut_video123423-0.0.12.tar.gz",
"has_sig": false,
"md5_digest": "3825724ada6b84918c1da4f645adcc7b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4396,
"upload_time": "2024-11-10T13:37:18",
"upload_time_iso_8601": "2024-11-10T13:37:18.925485Z",
"url": "https://files.pythonhosted.org/packages/4d/53/e0c51a14c272cee416e7076dc1aa07bcb64d06cb755880bf7fbaec3c06c5/cut_video123423-0.0.12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-10 13:37:18",
"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-video123423"
}