終端輸入nvidia-smi查看cuda版本
我的是12.5,在網上沒有找到12.5的torch,就安裝12.1的。torch,torchvision,torchaudio版本以及python版本要對應
參考:https://blog.csdn.net/FengHanI/article/details/135116114
創建一個名為pytorch的環境,pip安裝上面的3個包
vscode選擇pytorch環境開始動手學深度學習
d2l安裝不了,降級python版本為3.10重復上述步驟
參考:https://blog.csdn.net/m0_75243362/article/details/136694837
https://blog.csdn.net/m0_65252751/article/details/136609208
Youtobe視頻搬運:
參考:https://github.com/ytdl-org/youtube-dl?tab=readme-ov-file#installation
實際操作:在conda創建的一個python環境中pip install yt-dlp
下載最佳音頻/視頻
參考下載命令:youtube-dl [OPTIONS] URL [URL…]
實際操作:
格式選項示例:
# Download best mp4 format available or any other best if no mp4 available
$ youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'# Download best format available but no better than 480p
$ youtube-dl -f 'bestvideo[height<=480]+bestaudio/best[height<=480]'# Download best video only format but no bigger than 50 MB
$ youtube-dl -f 'best[filesize<50M]'# Download best format available via direct link over HTTP/HTTPS protocol
$ youtube-dl -f '(bestvideo+bestaudio/best)[protocol^=http]'# Download the best video format and the best audio format without merging them
$ youtube-dl -f 'bestvideo,bestaudio' -o '%(title)s.f%(format_id)s.%(ext)s'
如果有最佳音視頻合并下載的留下您的請評論,謝謝!
FFmpeg下載合并音視頻
參考:https://space.bilibili.com/403276179/search?keyword=FFmpeg
由于我下載的是webm文件,沒用它的bat合并,實際操作:
這個命令轉換很快:ffmpeg -i “video_file.webm” -i “audio_file.webm” -c:v copy -c:a copy -shortest output.mp4
win11自帶的播放器放不出聲音的,我用potplayer播放,上傳到bili也可以放出聲音,推薦用以上命令
這個命令用自帶播放器可以放聲音,但轉換很慢:
ffmpeg -i “NVIDIA Jetson Orin Nano Super COMPLETE Setup Guide & Tutorial.f251.webm” -i “NVIDIA Jetson Orin Nano Super COMPLETE Setup Guide & Tutorial.f313.webm” -c:v copy -c:a aac -b:a 192k -shortest output.mp4
git bash管理github
參考:https://blog.csdn.net/qq_36667170/article/details/79085301(很好的教程)
https://blog.csdn.net/qq_41437512/article/details/109426017(需要再把最后一行勾上 ctrl+shift+letter那個)
在完成第一次上傳后,之后在本地做的修改,都可以通過如下命令進行同步:
git add -A #將文件的修改上傳到暫存區
git commit -m ‘說明’ #提交到本地倉庫
git push origin master #推送到GitHub網站上
vscode添加gitbash終端:
https://blog.csdn.net/qq_36303853/article/details/104067540
補充:
添加 Git 的路徑到系統的 PATH 環境變量:
打開“控制面板” -> “系統和安全” -> “系統” -> “高級系統設置”。
點擊“環境變量”按鈕。
在“系統變量”部分,找到并選擇 Path 變量,然后點擊“編輯”。
點擊“新建”,然后輸入 Git 的安裝路徑(例如:C:\Program Files\Git\bin)。
點擊一系列的“確定”按鈕保存更改。
用ssh下載github到本地,省梯子流量
下載項目:https://github.com/buxuku/VideoSubtitleGenerator
對于 https://github.com/user/repo.git,對應的 SSH URL 就是 git@github.com:user/repo.git
https://github.com/buxuku/VideoSubtitleGenerator.git
git@github.com:buxuku/VideoSubtitleGenerator.git
使用Conda創建NodeJS虛擬環境:https://blog.itpub.net/69901823/viewspace-2763056/
(開梯子安裝)
申請百度翻譯api
管理員身份運行anaconda prompt,前面照著步驟來,npm start運行前先用git clone git@github.com:ggerganov/whisper.cpp.git。
windows復制的視頻路徑多加一個’'在configs.js文件里面
potplayer根據字幕文件加到視頻里面,但是沒有翻譯成中文,有些小bug沒解決:
解決:.env文件放在項目根目錄下,不是與項目同一級的文件夾里面
https://www.bilibili.com/video/BV1Asf8YLE57/?spm_id_from=333.1387.homepage.video_card.click&vd_source=c988f28ad9af37435316731758625407
上傳到bili才發現它自帶生成字幕+翻譯,想翻譯好的話用deepl的api吧!