console-player 1.2__tar.gz → 1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1 @@
1
-
2
1
  include consoleplay/icon.png
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: console-player
3
- Version: 1.2
3
+ Version: 1.3
4
4
  Summary: 让终端可以播放视频!
5
5
  Home-page: https://github.com/SystemFileB/console-player
6
6
  Author: SystemFileB
@@ -14,7 +14,7 @@ Requires-Dist: py7zr
14
14
  Requires-Dist: tqdm
15
15
  Requires-Dist: Pillow
16
16
  Requires-Dist: colorama
17
- Requires-Dist: pygame
17
+ Requires-Dist: pygame-ce
18
18
  Dynamic: author
19
19
  Dynamic: classifier
20
20
  Dynamic: description
@@ -28,10 +28,12 @@ Dynamic: summary
28
28
 
29
29
  # 🎞️ console-player
30
30
  视频播放器,但终端
31
- 这个项目包含了[FFmpeg](https://ffmpeg.org/)的LGPL构建
31
+ 这个项目包含了[FFmpeg](https://ffmpeg.org/)的[LGPLv3](https://www.gnu.org/licenses/lgpl-3.0.en.html)构建,同时在PyPI版本中FFmpeg还经过UPX压缩过
32
32
 
33
33
  这个项目的图标使用到了[Iconpark](https://iconpark.oceanengine.com/official)的三角形图标,这个部分使用[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)授权
34
34
 
35
+ 使用的相关项目及对应的许可证,见[licenses](licenses)
36
+
35
37
  ## 📦 安装
36
38
  ```bash
37
39
  # Windows用户没有安装FFmpeg的,或者使用其他系统的
@@ -108,18 +110,36 @@ $ python setup.py bdist_wheel --others
108
110
  "frames":, //视频帧数,填入数字,比如3500
109
111
  "fps":, //视频的帧率,填入数字,要和frames和音频长度吻合,否则播放报错,比如20
110
112
  "type":, //视频类型,比如"cpvt"或"cpv"
111
- "xz":, //你的cpvt类型的文件是否使用了xz压缩,填true或false
112
- "height":, //视频高度,暂时没有实现,比如60
113
+ "xz": //你的cpvt类型的文件是否使用了xz压缩,填true或false
113
114
  }
114
115
  ```
115
116
 
116
117
  最后,把这个目录的所有内容压缩到7z文件,把后缀一改,搞定!
117
118
 
118
119
  ## 📝 更新日志
120
+ ### 1.10(未来)
121
+ 跳票,但是会在 ~~[ccplay](https://github.com/SystemFileB/ccplay)中实现一部分~~
122
+ 我觉得用 C++ 实现可能较难,用 Rust 实现可能简单点?
123
+ 等到以后想到了再去用 Rust 重写这个吧
124
+
125
+ - 让线程池在处理帧上更高效
126
+ - 现在在生成`cpv(t)`文件前会检查ffmpeg是否可用
127
+ - 优化`consoleplay`命令在播放大文件时的内存占用
128
+ - 移除了Herobrine
129
+
130
+ ### 1.03
131
+ - 由于 pygame 已经 2 年没更,所以这个依赖被我改成了 pygame-ce
132
+ - 更新在 Windows 上的内置 FFmpeg 版本
133
+
134
+ ### 1.02.1
135
+ - 因改了许可证,在这里我进一步增强了FFmpeg的许可证合规性,它的许可证先已包含在在Windows版`console-player`包中的`/console_player_tools/ffmpeg.exe.license.md`中
136
+
119
137
  ### 1.02
120
138
  - **从此版本开始,使用MPL 2.0许可证,以前的版本使用LGPL 3.0许可证**
121
139
  - 适应了`py7zr 1.0.0-rc2`的不兼容更改,它移除了`readall`方法而需要使用`BytesIOFactory`实现
122
140
  - 把LOGO显示改成了ASCII艺术
141
+ - 现在FFmpeg在提取帧的时候会使用最近邻插值算法
142
+ - 更新FFmpeg
123
143
 
124
144
  - 我发现用Python来写这个库会遇到性能瓶颈,所以我未来会写一个C++重写的版本,原Python版本会把后端也改用C++实现
125
145
 
@@ -1,9 +1,11 @@
1
1
  # 🎞️ console-player
2
2
  视频播放器,但终端
3
- 这个项目包含了[FFmpeg](https://ffmpeg.org/)的LGPL构建
3
+ 这个项目包含了[FFmpeg](https://ffmpeg.org/)的[LGPLv3](https://www.gnu.org/licenses/lgpl-3.0.en.html)构建,同时在PyPI版本中FFmpeg还经过UPX压缩过
4
4
 
5
5
  这个项目的图标使用到了[Iconpark](https://iconpark.oceanengine.com/official)的三角形图标,这个部分使用[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)授权
6
6
 
7
+ 使用的相关项目及对应的许可证,见[licenses](licenses)
8
+
7
9
  ## 📦 安装
8
10
  ```bash
9
11
  # Windows用户没有安装FFmpeg的,或者使用其他系统的
@@ -80,18 +82,36 @@ $ python setup.py bdist_wheel --others
80
82
  "frames":, //视频帧数,填入数字,比如3500
81
83
  "fps":, //视频的帧率,填入数字,要和frames和音频长度吻合,否则播放报错,比如20
82
84
  "type":, //视频类型,比如"cpvt"或"cpv"
83
- "xz":, //你的cpvt类型的文件是否使用了xz压缩,填true或false
84
- "height":, //视频高度,暂时没有实现,比如60
85
+ "xz": //你的cpvt类型的文件是否使用了xz压缩,填true或false
85
86
  }
86
87
  ```
87
88
 
88
89
  最后,把这个目录的所有内容压缩到7z文件,把后缀一改,搞定!
89
90
 
90
91
  ## 📝 更新日志
92
+ ### 1.10(未来)
93
+ 跳票,但是会在 ~~[ccplay](https://github.com/SystemFileB/ccplay)中实现一部分~~
94
+ 我觉得用 C++ 实现可能较难,用 Rust 实现可能简单点?
95
+ 等到以后想到了再去用 Rust 重写这个吧
96
+
97
+ - 让线程池在处理帧上更高效
98
+ - 现在在生成`cpv(t)`文件前会检查ffmpeg是否可用
99
+ - 优化`consoleplay`命令在播放大文件时的内存占用
100
+ - 移除了Herobrine
101
+
102
+ ### 1.03
103
+ - 由于 pygame 已经 2 年没更,所以这个依赖被我改成了 pygame-ce
104
+ - 更新在 Windows 上的内置 FFmpeg 版本
105
+
106
+ ### 1.02.1
107
+ - 因改了许可证,在这里我进一步增强了FFmpeg的许可证合规性,它的许可证先已包含在在Windows版`console-player`包中的`/console_player_tools/ffmpeg.exe.license.md`中
108
+
91
109
  ### 1.02
92
110
  - **从此版本开始,使用MPL 2.0许可证,以前的版本使用LGPL 3.0许可证**
93
111
  - 适应了`py7zr 1.0.0-rc2`的不兼容更改,它移除了`readall`方法而需要使用`BytesIOFactory`实现
94
112
  - 把LOGO显示改成了ASCII艺术
113
+ - 现在FFmpeg在提取帧的时候会使用最近邻插值算法
114
+ - 更新FFmpeg
95
115
 
96
116
  - 我发现用Python来写这个库会遇到性能瓶颈,所以我未来会写一个C++重写的版本,原Python版本会把后端也改用C++实现
97
117
 
@@ -103,4 +123,4 @@ $ python setup.py bdist_wheel --others
103
123
  - 更新了FFmpeg的版本,从7.1到master
104
124
 
105
125
  ### 1.00
106
- - 第一次发布
126
+ - 第一次发布
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: console-player
3
- Version: 1.2
3
+ Version: 1.3
4
4
  Summary: 让终端可以播放视频!
5
5
  Home-page: https://github.com/SystemFileB/console-player
6
6
  Author: SystemFileB
@@ -14,7 +14,7 @@ Requires-Dist: py7zr
14
14
  Requires-Dist: tqdm
15
15
  Requires-Dist: Pillow
16
16
  Requires-Dist: colorama
17
- Requires-Dist: pygame
17
+ Requires-Dist: pygame-ce
18
18
  Dynamic: author
19
19
  Dynamic: classifier
20
20
  Dynamic: description
@@ -28,10 +28,12 @@ Dynamic: summary
28
28
 
29
29
  # 🎞️ console-player
30
30
  视频播放器,但终端
31
- 这个项目包含了[FFmpeg](https://ffmpeg.org/)的LGPL构建
31
+ 这个项目包含了[FFmpeg](https://ffmpeg.org/)的[LGPLv3](https://www.gnu.org/licenses/lgpl-3.0.en.html)构建,同时在PyPI版本中FFmpeg还经过UPX压缩过
32
32
 
33
33
  这个项目的图标使用到了[Iconpark](https://iconpark.oceanengine.com/official)的三角形图标,这个部分使用[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)授权
34
34
 
35
+ 使用的相关项目及对应的许可证,见[licenses](licenses)
36
+
35
37
  ## 📦 安装
36
38
  ```bash
37
39
  # Windows用户没有安装FFmpeg的,或者使用其他系统的
@@ -108,18 +110,36 @@ $ python setup.py bdist_wheel --others
108
110
  "frames":, //视频帧数,填入数字,比如3500
109
111
  "fps":, //视频的帧率,填入数字,要和frames和音频长度吻合,否则播放报错,比如20
110
112
  "type":, //视频类型,比如"cpvt"或"cpv"
111
- "xz":, //你的cpvt类型的文件是否使用了xz压缩,填true或false
112
- "height":, //视频高度,暂时没有实现,比如60
113
+ "xz": //你的cpvt类型的文件是否使用了xz压缩,填true或false
113
114
  }
114
115
  ```
115
116
 
116
117
  最后,把这个目录的所有内容压缩到7z文件,把后缀一改,搞定!
117
118
 
118
119
  ## 📝 更新日志
120
+ ### 1.10(未来)
121
+ 跳票,但是会在 ~~[ccplay](https://github.com/SystemFileB/ccplay)中实现一部分~~
122
+ 我觉得用 C++ 实现可能较难,用 Rust 实现可能简单点?
123
+ 等到以后想到了再去用 Rust 重写这个吧
124
+
125
+ - 让线程池在处理帧上更高效
126
+ - 现在在生成`cpv(t)`文件前会检查ffmpeg是否可用
127
+ - 优化`consoleplay`命令在播放大文件时的内存占用
128
+ - 移除了Herobrine
129
+
130
+ ### 1.03
131
+ - 由于 pygame 已经 2 年没更,所以这个依赖被我改成了 pygame-ce
132
+ - 更新在 Windows 上的内置 FFmpeg 版本
133
+
134
+ ### 1.02.1
135
+ - 因改了许可证,在这里我进一步增强了FFmpeg的许可证合规性,它的许可证先已包含在在Windows版`console-player`包中的`/console_player_tools/ffmpeg.exe.license.md`中
136
+
119
137
  ### 1.02
120
138
  - **从此版本开始,使用MPL 2.0许可证,以前的版本使用LGPL 3.0许可证**
121
139
  - 适应了`py7zr 1.0.0-rc2`的不兼容更改,它移除了`readall`方法而需要使用`BytesIOFactory`实现
122
140
  - 把LOGO显示改成了ASCII艺术
141
+ - 现在FFmpeg在提取帧的时候会使用最近邻插值算法
142
+ - 更新FFmpeg
123
143
 
124
144
  - 我发现用Python来写这个库会遇到性能瓶颈,所以我未来会写一个C++重写的版本,原Python版本会把后端也改用C++实现
125
145
 
@@ -2,4 +2,4 @@ py7zr
2
2
  tqdm
3
3
  Pillow
4
4
  colorama
5
- pygame
5
+ pygame-ce
@@ -3,7 +3,7 @@ from colorama import Fore
3
3
  __version__=cp.version
4
4
  def main():
5
5
  if len(sys.argv)>1:
6
- print(cp.pic2terminal(sys.argv[1]),try_rgba=True)
6
+ print(cp.pic2terminal(sys.argv[1],try_rgba=True))
7
7
  else:
8
8
  print(f"""╭───────────────────╮ ConsolePlay {cp.version}
9
9
  │ {Fore.BLUE}│╲{Fore.RESET} │ By: SystemFileB和其他贡献者们
@@ -15,4 +15,4 @@ def main():
15
15
  ╰───────────────────╯""")
16
16
  sys.exit(1)
17
17
  if __name__=="__main__":
18
- main()
18
+ main()
@@ -5,7 +5,7 @@ from PIL import Image
5
5
  from typing import IO, Union
6
6
  StrOrBytesPath = Union[str, bytes, os.PathLike[str], os.PathLike[bytes]]
7
7
 
8
- version="1.02"
8
+ version="1.03"
9
9
  __version__=version
10
10
 
11
11
  tsize=shutil.get_terminal_size()
@@ -97,4 +97,4 @@ def process_frame(frame_path: StrOrBytesPath | IO[bytes],text=False,th=None,xz=F
97
97
  if xz:
98
98
  return lzma.compress(pic2terminal(frame_path, True, True,th).encode("utf-8"),format=lzma.FORMAT_XZ)
99
99
  else:
100
- return pic2terminal(frame_path, True, True,th)
100
+ return pic2terminal(frame_path, True, True,th)
@@ -5,7 +5,7 @@ from consoleplay import process_frame
5
5
  manifest={}
6
6
 
7
7
  async def rm(temp):
8
- files = [os.path.join(temp, filename) for filename in os.listdir(temp)]
8
+ files = [os.path.join(root, filename) for root, _, filenames in os.walk(temp) for filename in filenames]
9
9
  if files:
10
10
  with tqdm(total=len(files), unit='file', desc="删除文件", colour="green") as pbar:
11
11
  for file_path in files:
@@ -41,9 +41,9 @@ async def ffmpeg_processer(input,temp,height,fps,mode) -> bool:
41
41
 
42
42
  os.makedirs(os.path.join(temp,"frames"),exist_ok=True)
43
43
  ffmpeg_frame = [
44
- ffmpeg,
44
+ ffmpeg,
45
45
  '-i', input,
46
- '-vf', f'scale=-1:{height},fps={fps}',
46
+ '-vf', f'scale=width=-1:height={height}:flags=neighbor,fps={fps}',
47
47
  '-hide_banner',
48
48
  f'{temp}/frames/%d.jpg'
49
49
  ]
@@ -26,7 +26,7 @@ platforms=["Windows"]
26
26
  packages=["cpvgen","consoleplay","consolepic"]
27
27
  if "--have-ffmpeg" in original_argv:
28
28
  packages.append("console_player_tools")
29
- package_data={'console_player_tools': ['ffmpeg.exe']}
29
+ package_data={'console_player_tools': ['ffmpeg.exe','ffmpeg.exe.license.md']}
30
30
  name="console-player"
31
31
  options["bdist_wheel"]["plat_name"]="win_amd64"
32
32
  if "--others" in original_argv:
@@ -55,7 +55,7 @@ setuptools.setup(
55
55
  "tqdm",
56
56
  "Pillow",
57
57
  "colorama",
58
- "pygame"
58
+ "pygame-ce"
59
59
  ],
60
60
  platforms=platforms,
61
61
  options=options,
@@ -69,4 +69,4 @@ setuptools.setup(
69
69
  license="LGPLv3",
70
70
  include_package_data=True,
71
71
  package_data=package_data
72
- )
72
+ )
File without changes
File without changes