Note -- 2024.4

pip install -r requirements.txt -i https://pypi.python.org/simple


# 使用pip config set global.index-url来直接指定下载源的URL
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
http://mirrors.aliyun.com/pypi/simple/ 

https://pypi.mirrors.ustc.edu.cn/simple/ 

http://pypi.douban.com/simple/ 

https://pypi.tuna.tsinghua.edu.cn/simple/ 

http://pypi.mirrors.ustc.edu.cn/simple/
(lmt) PS E:\code\ProCode\TinyRAG> pip install -r requirements.txt -i https://pypi.python.org/simple
Looking in indexes: https://pypi.python.org/simple
Collecting openai (from -r requirements.txt (line 1))
  Using cached openai-1.16.1-py3-none-any.whl.metadata (21 kB)
Collecting zhipuai (from -r requirements.txt (line 2))
  Using cached zhipuai-2.0.1-py3-none-any.whl.metadata (2.7 kB)
Collecting numpy (from -r requirements.txt (line 3))
  Using cached numpy-1.26.4-cp310-cp310-win_amd64.whl.metadata (61 kB)
Collecting python-dotenv (from -r requirements.txt (line 4))
  Using cached python_dotenv-1.0.1-py3-none-any.whl.metadata (23 kB)
Collecting torch (from -r requirements.txt (line 5))
  Using cached torch-2.2.2-cp310-cp310-win_amd64.whl.metadata (26 kB)
Collecting torchvision (from -r requirements.txt (line 6))
  Using cached torchvision-0.17.2-cp310-cp310-win_amd64.whl.metadata (6.6 kB)
Collecting torchaudio (from -r requirements.txt (line 7))
  Using cached torchaudio-2.2.2-cp310-cp310-win_amd64.whl.metadata (6.4 kB)
Collecting transformers (from -r requirements.txt (line 8))
  Using cached transformers-4.39.3-py3-none-any.whl.metadata (134 kB)
Collecting tqdm (from -r requirements.txt (line 9))
  Using cached tqdm-4.66.2-py3-none-any.whl.metadata (57 kB)
Collecting PyPDF2 (from -r requirements.txt (line 10))
  Using cached pypdf2-3.0.1-py3-none-any.whl.metadata (6.8 kB)
Collecting markdown (from -r requirements.txt (line 11))
  Using cached Markdown-3.6-py3-none-any.whl.metadata (7.0 kB)
Collecting html2text (from -r requirements.txt (line 12))
  Using cached html2text-2024.2.26.tar.gz (56 kB)
  Preparing metadata (setup.py) ... done
Collecting tiktoken (from -r requirements.txt (line 13))
  Using cached tiktoken-0.6.0-cp310-cp310-win_amd64.whl.metadata (6.8 kB)
Collecting beautifulsoup4 (from -r requirements.txt (line 14))
  Using cached beautifulsoup4-4.12.3-py3-none-any.whl.metadata (3.8 kB)
Collecting anyio<5,>=3.5.0 (from openai->-r requirements.txt (line 1))
  Using cached anyio-4.3.0-py3-none-any.whl.metadata (4.6 kB)
Collecting distro<2,>=1.7.0 (from openai->-r requirements.txt (line 1))
  Using cached distro-1.9.0-py3-none-any.whl.metadata (6.8 kB)
Collecting httpx<1,>=0.23.0 (from openai->-r requirements.txt (line 1))
  Using cached httpx-0.27.0-py3-none-any.whl.metadata (7.2 kB)
Collecting pydantic<3,>=1.9.0 (from openai->-r requirements.txt (line 1))
  Using cached pydantic-2.6.4-py3-none-any.whl.metadata (85 kB)
Collecting sniffio (from openai->-r requirements.txt (line 1))
  Using cached sniffio-1.3.1-py3-none-any.whl.metadata (3.9 kB)
Collecting typing-extensions<5,>=4.7 (from openai->-r requirements.txt (line 1))
  Using cached typing_extensions-4.10.0-py3-none-any.whl.metadata (3.0 kB)
Collecting cachetools>=4.2.2 (from zhipuai->-r requirements.txt (line 2))
  Using cached cachetools-5.3.3-py3-none-any.whl.metadata (5.3 kB)
Collecting pyjwt~=2.8.0 (from zhipuai->-r requirements.txt (line 2))
  Using cached PyJWT-2.8.0-py3-none-any.whl.metadata (4.2 kB)
Collecting filelock (from torch->-r requirements.txt (line 5))
  Using cached filelock-3.13.3-py3-none-any.whl.metadata (2.8 kB)
Collecting sympy (from torch->-r requirements.txt (line 5))
  Using cached sympy-1.12-py3-none-any.whl.metadata (12 kB)
Collecting networkx (from torch->-r requirements.txt (line 5))
  Using cached networkx-3.2.1-py3-none-any.whl.metadata (5.2 kB)
Collecting jinja2 (from torch->-r requirements.txt (line 5))
  Using cached Jinja2-3.1.3-py3-none-any.whl.metadata (3.3 kB)
Collecting fsspec (from torch->-r requirements.txt (line 5))
  Using cached fsspec-2024.3.1-py3-none-any.whl.metadata (6.8 kB)
Collecting pillow!=8.3.*,>=5.3.0 (from torchvision->-r requirements.txt (line 6))
  Using cached pillow-10.3.0-cp310-cp310-win_amd64.whl.metadata (9.4 kB)
Collecting huggingface-hub<1.0,>=0.19.3 (from transformers->-r requirements.txt (line 8))
  Using cached huggingface_hub-0.22.2-py3-none-any.whl.metadata (12 kB)
Collecting packaging>=20.0 (from transformers->-r requirements.txt (line 8))
  Using cached packaging-24.0-py3-none-any.whl.metadata (3.2 kB)
Collecting pyyaml>=5.1 (from transformers->-r requirements.txt (line 8))
  Using cached PyYAML-6.0.1-cp310-cp310-win_amd64.whl.metadata (2.1 kB)
Collecting regex!=2019.12.17 (from transformers->-r requirements.txt (line 8))
  Using cached regex-2023.12.25-cp310-cp310-win_amd64.whl.metadata (41 kB)
Collecting requests (from transformers->-r requirements.txt (line 8))
  Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting tokenizers<0.19,>=0.14 (from transformers->-r requirements.txt (line 8))
  Using cached tokenizers-0.15.2-cp310-none-win_amd64.whl.metadata (6.8 kB)
Collecting safetensors>=0.4.1 (from transformers->-r requirements.txt (line 8))
  Using cached safetensors-0.4.2-cp310-none-win_amd64.whl.metadata (3.9 kB)
Collecting colorama (from tqdm->-r requirements.txt (line 9))
  Using cached colorama-0.4.6-py2.py3-none-any.whl.metadata (17 kB)
Collecting soupsieve>1.2 (from beautifulsoup4->-r requirements.txt (line 14))
  Using cached soupsieve-2.5-py3-none-any.whl.metadata (4.7 kB)
Collecting idna>=2.8 (from anyio<5,>=3.5.0->openai->-r requirements.txt (line 1))
  Using cached idna-3.6-py3-none-any.whl.metadata (9.9 kB)
Collecting exceptiongroup>=1.0.2 (from anyio<5,>=3.5.0->openai->-r requirements.txt (line 1))
  Using cached exceptiongroup-1.2.0-py3-none-any.whl.metadata (6.6 kB)
Collecting certifi (from httpx<1,>=0.23.0->openai->-r requirements.txt (line 1))
  Using cached certifi-2024.2.2-py3-none-any.whl.metadata (2.2 kB)
Collecting httpcore==1.* (from httpx<1,>=0.23.0->openai->-r requirements.txt (line 1))
  Using cached httpcore-1.0.5-py3-none-any.whl.metadata (20 kB)
Collecting h11<0.15,>=0.13 (from httpcore==1.*->httpx<1,>=0.23.0->openai->-r requirements.txt (line 1))
  Using cached h11-0.14.0-py3-none-any.whl.metadata (8.2 kB)
Collecting annotated-types>=0.4.0 (from pydantic<3,>=1.9.0->openai->-r requirements.txt (line 1))
  Using cached annotated_types-0.6.0-py3-none-any.whl.metadata (12 kB)
Collecting pydantic-core==2.16.3 (from pydantic<3,>=1.9.0->openai->-r requirements.txt (line 1))
  Using cached pydantic_core-2.16.3-cp310-none-win_amd64.whl.metadata (6.6 kB)
Collecting charset-normalizer<4,>=2 (from requests->transformers->-r requirements.txt (line 8))
  Downloading charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl.metadata (34 kB)
Collecting urllib3<3,>=1.21.1 (from requests->transformers->-r requirements.txt (line 8))
  Downloading urllib3-2.2.1-py3-none-any.whl.metadata (6.4 kB)
Collecting MarkupSafe>=2.0 (from jinja2->torch->-r requirements.txt (line 5))
  Downloading MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl.metadata (3.1 kB)
Collecting mpmath>=0.19 (from sympy->torch->-r requirements.txt (line 5))
  Downloading mpmath-1.3.0-py3-none-any.whl.metadata (8.6 kB)
Downloading openai-1.16.1-py3-none-any.whl (266 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 266.9/266.9 kB 456.7 kB/s eta 0:00:00
Downloading zhipuai-2.0.1-py3-none-any.whl (26 kB)
Downloading numpy-1.26.4-cp310-cp310-win_amd64.whl (15.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.8/15.8 MB 2.4 MB/s eta 0:00:00
Downloading python_dotenv-1.0.1-py3-none-any.whl (19 kB)
Downloading torch-2.2.2-cp310-cp310-win_amd64.whl (198.6 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 198.6/198.6 MB 5.6 MB/s eta 0:00:00
Downloading torchvision-0.17.2-cp310-cp310-win_amd64.whl (1.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 4.4 MB/s eta 0:00:00
Downloading torchaudio-2.2.2-cp310-cp310-win_amd64.whl (2.4 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.4/2.4 MB 6.3 MB/s eta 0:00:00
Downloading transformers-4.39.3-py3-none-any.whl (8.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.8/8.8 MB 5.1 MB/s eta 0:00:00
Downloading tqdm-4.66.2-py3-none-any.whl (78 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.3/78.3 kB ? eta 0:00:00
Downloading pypdf2-3.0.1-py3-none-any.whl (232 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 232.6/232.6 kB 1.2 MB/s eta 0:00:00
Downloading Markdown-3.6-py3-none-any.whl (105 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 105.4/105.4 kB 3.1 MB/s eta 0:00:00
Downloading tiktoken-0.6.0-cp310-cp310-win_amd64.whl (798 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 798.7/798.7 kB 1.2 MB/s eta 0:00:00
Downloading beautifulsoup4-4.12.3-py3-none-any.whl (147 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 147.9/147.9 kB 800.5 kB/s eta 0:00:00
Downloading anyio-4.3.0-py3-none-any.whl (85 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 85.6/85.6 kB 172.0 kB/s eta 0:00:00
Downloading cachetools-5.3.3-py3-none-any.whl (9.3 kB)
Downloading distro-1.9.0-py3-none-any.whl (20 kB)
Downloading httpx-0.27.0-py3-none-any.whl (75 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 75.6/75.6 kB 1.1 MB/s eta 0:00:00
Downloading httpcore-1.0.5-py3-none-any.whl (77 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.9/77.9 kB 727.8 kB/s eta 0:00:00
Downloading huggingface_hub-0.22.2-py3-none-any.whl (388 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 388.9/388.9 kB 757.2 kB/s eta 0:00:00
Downloading fsspec-2024.3.1-py3-none-any.whl (171 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 172.0/172.0 kB 2.1 MB/s eta 0:00:00
Downloading packaging-24.0-py3-none-any.whl (53 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.5/53.5 kB 115.3 kB/s eta 0:00:00
Downloading pillow-10.3.0-cp310-cp310-win_amd64.whl (2.5 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.5/2.5 MB 990.2 kB/s eta 0:00:00
Downloading pydantic-2.6.4-py3-none-any.whl (394 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 394.9/394.9 kB 1.2 MB/s eta 0:00:00
Downloading pydantic_core-2.16.3-cp310-none-win_amd64.whl (1.9 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 1.1 MB/s eta 0:00:00
Downloading PyJWT-2.8.0-py3-none-any.whl (22 kB)
Downloading PyYAML-6.0.1-cp310-cp310-win_amd64.whl (145 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 145.3/145.3 kB 785.5 kB/s eta 0:00:00
Downloading regex-2023.12.25-cp310-cp310-win_amd64.whl (269 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 269.5/269.5 kB 872.9 kB/s eta 0:00:00
Downloading requests-2.31.0-py3-none-any.whl (62 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB ? eta 0:00:00
Downloading safetensors-0.4.2-cp310-none-win_amd64.whl (269 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 269.5/269.5 kB 1.7 MB/s eta 0:00:00
Downloading sniffio-1.3.1-py3-none-any.whl (10 kB)
Downloading soupsieve-2.5-py3-none-any.whl (36 kB)
Downloading tokenizers-0.15.2-cp310-none-win_amd64.whl (2.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.2/2.2 MB 1.2 MB/s eta 0:00:00
Downloading typing_extensions-4.10.0-py3-none-any.whl (33 kB)
Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Downloading filelock-3.13.3-py3-none-any.whl (11 kB)
Downloading Jinja2-3.1.3-py3-none-any.whl (133 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.2/133.2 kB ? eta 0:00:00
Downloading networkx-3.2.1-py3-none-any.whl (1.6 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 246.6 kB/s eta 0:00:00
Downloading sympy-1.12-py3-none-any.whl (5.7 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.7/5.7 MB 725.0 kB/s eta 0:00:00
Downloading annotated_types-0.6.0-py3-none-any.whl (12 kB)
Downloading certifi-2024.2.2-py3-none-any.whl (163 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 163.8/163.8 kB 10.2 MB/s eta 0:00:00
Downloading charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl (100 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.3/100.3 kB 479.3 kB/s eta 0:00:00
Downloading exceptiongroup-1.2.0-py3-none-any.whl (16 kB)
Downloading idna-3.6-py3-none-any.whl (61 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.6/61.6 kB 1.7 MB/s eta 0:00:00
Downloading MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl (17 kB)
Downloading mpmath-1.3.0-py3-none-any.whl (536 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 536.2/536.2 kB 673.4 kB/s eta 0:00:00
Downloading urllib3-2.2.1-py3-none-any.whl (121 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 121.1/121.1 kB 886.6 kB/s eta 0:00:00
Downloading h11-0.14.0-py3-none-any.whl (58 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB ? eta 0:00:00
Building wheels for collected packages: html2text
  Building wheel for html2text (setup.py) ... done
  Created wheel for html2text: filename=html2text-2024.2.26-py3-none-any.whl size=33130 sha256=80a507a312875f30707c93a6a3abfe662afc79f780e0514281fa2d88137b90ef
  Stored in directory: c:\users\misty\appdata\local\pip\cache\wheels\f3\96\6d\a7eba8f80d31cbd188a2787b81514d82fc5ae6943c44777659
Successfully built html2text
Installing collected packages: mpmath, urllib3, typing-extensions, sympy, soupsieve, sniffio, safetensors, regex, pyyaml, python-dotenv, PyPDF2, pyjwt, pillow, packaging, numpy, networ
kx, MarkupSafe, markdown, idna, html2text, h11, fsspec, filelock, exceptiongroup, distro, colorama, charset-normalizer, certifi, cachetools, annotated-types, tqdm, requests, pydantic-core, jinja2, httpcore, beautifulsoup4, anyio, torch, tiktoken, pydantic, huggingface-hub, httpx, zhipuai, torchvision, torchaudio, tokenizers, openai, transformers
Successfully installed MarkupSafe-2.1.5 PyPDF2-3.0.1 annotated-types-0.6.0 anyio-4.3.0 beautifulsoup4-4.12.3 cachetools-5.3.3 certifi-2024.2.2 charset-normalizer-3.3.2 colorama-0.4.6 d
istro-1.9.0 exceptiongroup-1.2.0 filelock-3.13.3 fsspec-2024.3.1 h11-0.14.0 html2text-2024.2.26 httpcore-1.0.5 httpx-0.27.0 huggingface-hub-0.22.2 idna-3.6 jinja2-3.1.3 markdown-3.6 mp
math-1.3.0 networkx-3.2.1 numpy-1.26.4 openai-1.16.1 packaging-24.0 pillow-10.3.0 pydantic-2.6.4 pydantic-core-2.16.3 pyjwt-2.8.0 python-dotenv-1.0.1 pyyaml-6.0.1 regex-2023.12.25 requ
ests-2.31.0 safetensors-0.4.2 sniffio-1.3.1 soupsieve-2.5 sympy-1.12 tiktoken-0.6.0 tokenizers-0.15.2 torch-2.2.2 torchaudio-2.2.2 torchvision-0.17.2 tqdm-4.66.2 transformers-4.39.3 typing-extensions-4.10.0 urllib3-2.2.1 zhipuai-2.0.1

Two

Extract the video cover using ffmpeg:

ffmpeg -i video.mp4 -map 0:v -map -0:V -c copy cover.jpg

Get the first frame of the video as the cover image:

ffmpeg -i video.mp4 -y -f image2 -frames 1 cover_1f.jpg

Specify cover size -s x*y:

ffmpeg -i video.mp4 -y -f image2 -s 640*480 -frames 1 cover_640_480.jpg

Extract the cover at 10 seconds:

ffmpeg -i video.mp4 -y -f image2 -ss 10 -t 0.001 cover_10s.jpg

Recover the video with a cover:

ffmpeg -i video.mp4 -i cover.jpg -map 1 -map 0 -c copy -disposition:0 attached_pic out_video.mp4

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值