Total Pageviews

Friday 24 June 2022

在mac上,利用uvd下载youtube视频

 在mac上,

git clone https://github.com/xioren/uvd

cd uvd

cd src

nim c -d:ssl -d:release uvd.nim

(此命令会在当前目录下,生成可执行文件uvd)
./uvd --help

如果遇错:could not import: X509_check_host

请看文章https://yasar-yy.medium.com/installing-openssl-library-on-macos-catalina-6777a2e238a6

(https://github.com/nim-lang/nimble/issues/789)

然后,

./uvd https://www.youtube.com/watch?v=DjiGV8KqJPs 

此命令肯定是无法下载youtube视频的,因为*.youtube.com已被封,无法直p接访问上面这个youtube视频的网址。

我们可以利用proxychains4来做代理:

proxychains4 ./uvd https://www.youtube.com/watch?v=DjiGV8KqJPs 

now it can be downloaded successfully.

如果要把下载下来的mkv视频转换为mp4视频,运行:

ffmpeg -i '陈瑞 [ 我是一只修行千年的狐 ] [DjiGV8KqJPs].mkv' -vcodec copy -acodec copy 白狐.mp4

(当然在mac上,你得先安装ffmpeg: brew install ffmpeg)

项目地址:https://github.com/xioren/uvd

https://github.com/xioren/uvd/issues/6 

related post: 在mac上,搭建nim环境


 

No comments:

Post a Comment