PT服务器工具

本文最后更新于 2024年11月20日 凌晨

本文主要包括PT的各类辅种发种的shell命令,电影种的截图制种,音乐种的抓流、转码、发种频谱图等等。

服务器性能测试脚本

其他脚本参考

1
wget -qO- --no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash

两个大家常用的脚本,基本集成了多数需要的发种工具,(有概率装不上其他软件比如wine)
星大Inexistence

1
bash <(wget --no-check-certificate -qO- https://github.com/Aniverse/inexistence/raw/master/inexistence.sh)

Jerry048

1
2
bash <(wget -qO- https://raw.githubusercontent.com/jerry048/Dedicated-Seedbox/main/Install.sh) <username> <password> <Cache Size(unit:GiB)>
# 格式类似,注意空格 name password 16 GB

虚拟环境搭建

Docker一键安装

1
2
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

conda安装使用

主要用于python的运行,比起virtualenv,conda最大优点是可以自动安装指定新版本python,不用本地环境

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
wget -4 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py39_4.9.2-Linux-x86_64.sh
#第二步安装
sh Miniconda3-py39_4.9.2-Linux-x86_64.sh
#第三步配置conda镜像

export PATH=/root/miniconda3/bin:$PATH
# alias ohmyzsh="mate ~/.oh-my-zsh"

vim ~/.zshrc
## 添加下面的内容
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/root/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/root/miniconda3/etc/profile.d/conda.sh" ]; then
. "/root/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/root/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<

#添加完后激活
source ~/.zshrc

#使用
conda create -n py39 python=3.9
conda activate py39

下载器工具

transmission

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
version: "3.2"

services:
transmission:
image: chisbread/transmission
container_name: transmission
environment:
- PUID=0
- PGID=0
- TZ=Asia/Shanghai
- USER=
- PASS=
- PEERPORT=10413
volumes:
- /tr/config:/config
- /tr/downloads:/downloads
- /tr/watch:/watch

ports:
- 9091:9091
- 10413:10413
- 10413:10413/udp
restart: unless-stopped

配置好yml文件后需要下载docker-compose命令
在对应的目录输入docker-compose up
具体参考这篇文章

Usenet下载器sabnzbd

1
2
3
4
5
6
7
8
9
10
docker run -d \
--name=sabnzbd \
-p 8384:8080 \
-e PUID=1000 \
-e PGID=1000 \
-v /home/你的用户名/sabnzbd/config:/config \
-v /home/你的用户名/sabnzbd/downloads:/downloads \
-v /home/你的用户名/sabnzbd/incomplete:/incomplete-downloads \
--restart unless-stopped \
linuxserver/sabnzbd

vim /home/你的用户名/sabnzbd/config/sabnzbd.ini
把–inet_exposure从0修改到5才能正常访问

  • 记得替换路径!

助手工具

PPTP

Chrome
Edge

Jackett

1
2
3
4
5
6
7
8
9
docker create --name=jackett \
--restart=always \
-v /root/jackett/config:/config \
-v /root/jackett/downloads:/downloads \
-e PGID=0 -e PUID=0 \
-p 9117:9117 \
linuxserver/jackett

docker start

Prowlarr

更推荐这个工具,还能支持Usenet的indexer,比上者维护更勤

1
2
3
4
5
6
7
8
9
10
docker run -d \
--name=prowlarr \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Asia/Shanghai \
-p 9696:9696 \
-v /prowlarr/config:/config \
-v /本地下载目录:/downloads \
--restart unless-stopped \
linuxserver/prowlarr

IYUU plus

1
2
mkdir /root/plus -p
docker run -d --name IYUUPlus -v /root/plus:/IYUU/db -v /etc/qbit/config/qBittorrent/BT_backup:/qb -v /etc/transmission/config/torrents:/tr -p 8787:8787 --restart=always iyuucn/iyuuplus:latest

seedcross

辅种外站神器,不过还没成熟有辅错的可能,它的原理是用你下载器的种子通过jackett搜索匹配。
github链接

1
docker run -d --name seedcross -v /somedir/in/host:/code/seedcross/db -p 8019:8019 ccf2012/seedcross:latest

打开8787端口
密码为空,第一次输入时你可以自由设置你的密码;以后密码与第一次相同才能登录

FileBrower

荒野无灯FBE的安装脚,作为网盘可直接做种截图,非常方便

1
2
3
4
5
6
7
8
9
10
11
12
mkdir -p ~/docker/fb/config ~/docker/fb/myfiles
docker run -d --name fb \
--restart=unless-stopped \
-e PUID=$UID \
-e PGID=$GID \
-e WEB_PORT=8082 \
-e FB_AUTH_SERVER_ADDR="127.0.0.1" \
-p 8082:8082 \
-v ~/docker/fb/config:/config \
-v /:/myfiles \
--mount type=tmpfs,destination=/tmp \
80x86/filebrowser:2.9.4-amd64

做截图

1
ffmpeg -i [视频路径] -r 1 -vframes 4 -q:v 2 -f image2 image-%d.jpeg

Rclone

1
2
3
#安装最新版本rclone 
apt-get install p7zip-full
curl https://rclone.org/install.sh | sudo bash

盒子文件同步到云盘,主要是我盒子拉本地非常慢,所以用云盘做中转。
可以是Onedrive、Google drive
我这里说阿里云盘

1
2
3
4
5
6
7
8
9
10
docker run -d \
--name=aliyundrive-webdav \
--restart=always \
-p 8080:8080 \
-v $PWD/docker/aliyundrive-webdav/:/etc/aliyundrive-webdav/ \
-e REFRESH_TOKEN='your refreshToken' \
-e WEBDAV_AUTH_USER=admin \
-e WEBDAV_AUTH_PASSWORD=admin \
messense/aliyundrive-webdav

可以点开ip:8080访问,密码账号如上,需要注意的是,换成其他端口可能会服务不了,如果冲突的话先把另一个关了。

Clouddrive2的服务搭建

这个比rlone更方便,主要是用来挂载115的

1
2
3
4
5
6
7
wget https://github.com/cloud-fs/cloud-fs.github.io/releases/download/v0.8.1/clouddrive-2-linux-x86_64-0.8.1.tgz
md /opt/clouddrive
tar zxvf clouddrive-2-linux-x86_64-0.8.1.tgz -C /opt/clouddrive

vim /etc/systemd/system/clouddrive.service
#写入下面的内容,daemon reload

1
2
3
4
5
6
7
8
9
10
Description=clouddrive2
After=network.target

[Service]
Type=exec
Restart=on-failure
ExecStart=/opt/clouddrive/clouddrive

[Install]
WantedBy=multi-user.target

Onedrive

1
要在mac/win上先用rclone authorize "onedrive"跳转网页授权,返回token(注意要把整个json全复制下来)

同时挂载多个rclone的网盘

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
curl https://rclone.org/install.sh | sudo bash
#安装完成后,运行rclone连接webdav完成配置
rclone config

#配置玩rclone后

#前者上od地址后者上本地地址,复制以下内容创建service
vim /etc/systemd/system/rclone@.service
#粘贴以下内容
[Unit]
Description=Rclone mount %I drive
AssertPathIsDirectory=LocalFolder
After=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/rclone mount %i: /mnt/%i \
--config /root/.config/rclone/rclone.conf \
--copy-links \
--no-gzip-encoding \
--no-check-certificate \
--vfs-cache-mode full \
--umask 0000 \
--default-permissions \
--allow-non-empty \
--allow-other \
--attr-timeout 5m \
--vfs-cache-max-size 1G \
--buffer-size 500M \
--vfs-read-chunk-size 64M \
--vfs-read-chunk-size-limit 1G
ExecStop=/bin/fusermount -u LocalFolder
Restart=on-abort
User=root

[Install]
WantedBy=default.target

/mnt改为想挂载的目标目录根目录。配置好后创建挂载目标子目录后可以自动挂载,注意名字要和rclone的remotes一致。

1
2
3
mkdir /mnt/od1
systemctl enable rclone@od1
systemctl start rclone@od1

最简单的方法 rclone config file 直接复制conf文件夹内的配置信息,粘贴到对应的服务器

配置教程参考,需要注意最新版可能编号不一样,要自己选择webdav

IRC

挂在到nas上的thelounge客户端

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
wget -P /root https://github.com/thelounge/thelounge/releases/download/v4.2.0/thelounge_4.2.0_all.deb
dpkg -i /root/thelounge_4.2.0_all.deb
#systemctl stop thelounge.service
#sed -i 's/9000,/11111,/g' /etc/thelounge/config.js
# 以上命令替换端口号,9000端口号挺常见容易产生冲突
# 比如 docker 的 portainer 镜像默认映射端口号就用的是 9000
# 该命令将 9000 端口号替换成 11111,这个可以自定义(1-65535 任选一个没重复的当端口号)

systemctl start thelounge.service
systemctl enable thelounge.service
thelounge add 用户名#手动添加登陆的用户名
#配置的时候记得在命令里面加上以下三句命令
/msg NickServ RECOVER 昵称
/msg NickServ IDENTIFY 昵称 密码#避免被挤掉
/msg Vertigo ENTER 昵称 irc密码

如果提示node版本问题可能需要更新,nvm是个管理node的工具

1
2
3
4
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

音乐相关

Flac to mp3

Flac2Mp3该工具会将你所有flac文件转为mp3,且按相同的名字文件结构保存。

下载链接download.tar.gz

1
2
3
4
5
6
7
tar zxvf flac2mp3-0.3.0.tar.gz
apt install flac
apt install lame
#找到解压文件内的flac2mp3.pl文件,善用软连接,默认v2,自己修改为v0或320

ln -s 文件所在路径 f2m
./f2m --preset=V0 /path/to/lossless /path/to/lossy

Flac 24bit->16bit

1
2
3
sox input.flac -G -b 16 output.flac rate -v -L 48000 dither

for flac in *.flac; do sox -S "${flac}" -r 44100 -b 16 new/"${flac}"; done

一键上传图床脚本

https://github.com/theirix/ptpimg-uploader

1
2
3
4
5
pip install ptpimg_uploader

export PTPIMG_API_KEY=<your hex key>

ptpimg_uploader ~/seed/mytorrent/folder.jpg

频谱图

  1. sox 专辑路径名字/*.flac -n spectrogram -o 专辑.png
  2. 要是二级目录
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    #!/zsh/bin
    dir=/home/download/
    filename=$1
    cd "$filename"
    ls -d */ | grep -o '[a-Z]*\ *[0-9]/' >temp.log
    sed -i 's/$/*flac/' temp.log
    mapfile acmd <temp.log
    echo ${acmd[@]}
    fdir=''
    if test -z "$acmd"
    then
    echo "No subfolder~"
    sox *flac -n spectrogram -o $dir/spectrograms/"$filename".png
    else
    l=${#acmd[@]}
    case "$l" in
    2)
    echo "There 2 discs"
    a1=`cat temp.log | sed -n '1p'`
    a2=`cat temp.log | sed -n '2p'`
    sox "$a1" "$a2" -n spectrogram -o $dir/spectrograms/"$filename".png

    ;;
    *)
    echo "There more than 3 discs, only take first 3"
    a1=`cat temp.log | sed -n '1p'`
    a2=`cat temp.log | sed -n '2p'`
    a3=`cat temp.log | sed -n '3p'`
    sox "$a1" "$a2" "$a3" -n spectrogram -o $dir/spectrograms/"$filename".png
    ;;
    esac
  3. 单碟版一键制谱并上传图床返回链接
1
2
3
4
5
6
7
8
9
10
11
12
13
vim sp-up.sh
#复制以下内容
n=$1
cd "$n"

sox *flac -n spectrogram -o ../spectrograms/"$n".png
sp=$(ptpimg_uploader -k your-ptpimg-key --bbcode
spec=[hide=spectrogram]$sp[/hide]
echo "PTPIMGurl: $spec"

#具体使用
sh sp-up.sh 专辑目录

1
2
3
4
5
6
7
git clone https://github.com/EwolBash/spsox.git
cd spsox
chmod +x spsox
cp spsox /usr/local/bin/
spsox
spsox -r /home/ewol/Music/music/'Chuck Prophet - Bobby Fuller Died For Your Sins (2017) [FLAC]'/
spsox -r /home/ewol/Music/music

web抓流

https://github.com/nathom/streamrip

1
2
3
4
5
6
7
#需要python>3.8
pip3 install streamrip --upgrade

rip config --open
#填上arl之类的信息

rip 专辑url

压缩flac专辑到lv8

flac命令行文档

1
flac -8 专辑名字/* -f

抓流制种频谱图集合

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/zsh
l=($*)
#num=$1
for num in ${l[*]};do
echo https://www.xxx.com/album/$num
ripb=`rip url line https://www.deezer.com/album/$num`
echo "$ripb"
fullname=/home/download

if [[ $ripb =~ "Unable to stream" ]] || [[ $ripb =~ "already downloaded" ]]
then
echo $num "$ripb">>$fullname/fail.log#抓流失败或者重复跳过循环
continue
fi
dirname=$(ls -At $fullname | sed -n "1p")
mktorrent -v -p -l 22 -o $fullname/torrents/"$dirname".torrent $fullname/"$dirname"
cd $fullname/"$dirname"

ls -d */ | grep -o '[a-Z]*\ *[0-9]/' >temp.log
sed -i 's/$/*flac/' temp.log
mapfile acmd <temp.log

fdir=''
if test -z "$acmd"
then
echo "No subfolder~"
sox *flac -n spectrogram -o $fullname/spectrograms/"$dirname".png
else
l=${#acmd[@]}
case "$l" in
2)
echo "There 2 discs"
a1=`cat temp.log | sed -n '1p'`
a2=`cat temp.log | sed -n '2p'`
sox "$a1" "$a2" -n spectrogram -o $fullname/spectrograms/"$dirname".png
;;
3)
echo "There 3 discs"
a1=`cat temp.log | sed -n '1p'`
a2=`cat temp.log | sed -n '2p'`
a3=`cat temp.log | sed -n '3p'`
sox "$a1" "$a2" "$a3" -n spectrogram -o $fullname/spectrograms/"$dirname".png
;;
4)
echo "There 4 discs"
a1=`cat temp.log | sed -n '1p'`
a2=`cat temp.log | sed -n '2p'`
a3=`cat temp.log | sed -n '3p'`
a4=`cat temp.log | sed -n '4p'`
sox "$a1" "$a2" "$a3" "$a4" -n spectrogram -o $fullname/spectrograms/"$dirname".png
;;
*)
echo "There more than 5 discs, only take first 6"
a1=`cat temp.log | sed -n '1p'`
a2=`cat temp.log | sed -n '2p'`
a3=`cat temp.log | sed -n '3p'`
a4=`cat temp.log | sed -n '4p'`
a5=`cat temp.log | sed -n '5p'`
a6=`cat temp.log | sed -n '6p'`
sox "$a1" "$a2" "$a3" "$a4" "$a5" "$a6" -n spectrogram -o $fullname/spectrograms/"$dirname".png
;;
esac
fi
#sox $fullname/"$dirname"/*flac -n spectrogram -o $fullname/spectrograms/"$dirname".png
sp=$(ptpimg_uploader --bbcode $fullname/spectrograms/"$dirname".png)
spec=[hide=spectrogram]$sp[/hide]
echo "$spec $dirname $num" >>"$fullname"/torrents/PtpimgUrl.txt
echo "PTPIMGurl: $spec"
sleep $[($RANDOM % 10)+3]

截图工具convert

要apt install imagemagick

AutoBrr

https://autobrr.com/configuration/irc
刷外站神器,主要是支持没有rss用irc推送的站,上面的官方文档已经相当详细,我这个是介绍下docker安装

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
vim docker-compose.yml
#写入以下内容,替换映射地址
version: "3.7"

services:
autobrr:
container_name: autobrr
image: ghcr.io/autobrr/autobrr:latest
restart: unless-stopped
#logging:
# driver: json-file
# options:
# max-file: ${DOCKERLOGGING_MAXFILE}
# max-size: ${DOCKERLOGGING_MAXSIZE}
user: 1000:1000
environment:
- TZ=${TZ}
volumes:
- ${BASE_DOCKER_DATA_PATH}/autobrr/config:/config
ports:
- 7474:7474
1
docker compose up -d

注意盒子上使用要找到config.toml文件,把127.0.0.1改成0.0.0.0

通知可用tg的bot,怎么搞详细教程参考这个教程,简单一点就是先去搜索botFather创建一个bot,搞号命名描述获取token,再去getuseridbot查自己id(有概率搜不到)。点击链接测试返回值https://api.telegram.org/bot<换自己token>/getUpdates
填的时候注意token直接复制整个‘数字:字符串’,chat_id是自己的id。

  • 注意:
    添加客户端的时候deluge一个坑,他的名字密码要去/docker/appdata/deluge/auth找,username:password:level的形式,地址必须是纯数字ip,不是官方推荐的127.0.0.1或者localhost。qb地址是http://ip:端口

flexget

自动rss新种,可自定义规则,星大脚本直接装或者直接:pip install flexget

配置文件config.yml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
templates:
# 剩余空间模板,当 path 对应的路径的剩余空间小于 space 规定的数值的时候停止 RSS 下载
freespace:
free_space:
path: /home/gawain/deluge/download/
space: 20240
# qb 的模板,之后写 qb 就是指把种子推送到 qb 进行下载;下面 tr de rt 也是如此
qb:
qbittorrent:
path: /home/gawain/deluge/download/
host: localhost
port: 2017
username: ****
password: ****
de:
deluge:
path: /home/gawain/deluge/TSBluray/rar
host: localhost
port: 58846
username: ...
password: ...
size:
content_size:
min: 13000
max: 46666
strict: yes

tasks:
Ts-Bluray:
rss: https://www.torrentseeds.org/rss/****
if:
- "'BLURAY' in title": accept
#- "'subs' in title": reject
temperate:
- de
- freespace
- size
deluge:
label: TSBluray

web_server:
port: 6566
web_ui: yes

schedules: no

然后测试:

1
2
3
4
5
6
7
8
9
10
#不下载只测试获取情况
flexget --test
#标记老的种子
flexget --learn
#确定flexget安装目录
which flexget
#添加cron
crontab -e
#添加语句,后面替换上面获取的路径
*/3 * * * * /usr/local/bin/flexget execute

差速器

大佬博客
只要提供给差速器一个需要发布的文件夹和豆瓣信息页面,差速器会自动帮你

  1. 根据豆瓣链接获取PTGen信息
  2. 根据资源载体获取MediaInfo/BDInfo信息
  3. 截取自定数量的无损截图,上传到指定的图床
  4. 制作种子
  5. 如果是本地环境,自动打开浏览器,然后自动填充所有的信息
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    #Linux一键安装,其他平台和docker参考以上文章
    curl -Lso- https://raw.githubusercontent.com/LeiShi1313/Differential/main/install.sh | bash

    vim config.ini
    #写入以下内容
    [DEFAULT]
    ; 是否制种
    make_torrent = true

    ; 生成截图的数量
    screenshot_count = 6
    ; 图床,差速器支持PTPIMG、自建imgurl、自建Chevereto(z4a、imgbb、猫柠的图床等)、SM.MS和BYR作为图床
    image_hosting = CHEVERETO
    ; 自建Chevereto的地址
    chevereto_hosting_url = https://XXX.com
    ; 自建Chevereto的用户名
    chevereto_username = XXXX
    ; 自建Chevereto的密码
    chevereto_password = YYYY

    ; 自动填充使用的脚本,这里使用树大的脚本
    easy_upload = true
    ; 也可以使用明日大的脚本来进行自动填充
    ; auto_feed = true

    ; 使用差速器自带的短网址服务
    use_short_url = true

    ; 差速器自带一个自建的PTGen,如果无法访问,可以提供自定义PTGen地址
    ;ptgen_url = https://XXXXX.com

    [NexusPHP]
    ; 发种页面的链接
    upload_url = https://XXXXX.com/upload.php

    #发布格式
    dft ne -f [种子文件夹] -u [豆瓣链接]
    需要注意的是需要自己配置config,和视频文件同一文件夹,可能需要科学使用默认ptgen。

解压rar

主要为了解压0day资源,只能手动安装

1
2
3
4
5
6
7
wget http://www.rarlab.com/rar/rarlinux-x64-5.0.0.tar.gz --no-check-certificate
tar xvf rarlinux-x64-5.0.0.tar.gz
cd rar
make install
ln -n unrar /usr/bin/unrar
#使用方法
unrar e ***.rar(or folder) target-path

Remux

Remux必须有eac3to的解码日志,而eac3to又只支持windows,所以需要wine32

Wine

可以星大脚本直接手动加参数装
Debian10安装Wine32有很多坑,wine是为了eac3to

1
apt-get install libgnutls30:i386 libldap-2.4-2:i386 libgpg-error0:i386 libxml2:i386 libasound2-plugins:i386 libsdl2-2.0-0:i386 libfreetype6:i386 libdbus-1-3:i386 libsqlite3-0:i386

eac3to

https://unixsheikh.com/tutorials/remuxing-iso-dvd-or-bluray-using-cat-and-ffmpeg-on-linux.html

1
2
3
4
5
6
7
8
9
#eac3to日志:
wget -O eac3to.zip https://www.videohelp.com/download/eac3to336.zip\?r\=LRXdxQfL
unzip eac3to.zip
wine eac3to/eac3to.exe `winepath -w /home/gawain/deluge/download/Songs.From.The.Second.Floor.2000.COMPLETE.BLURAY-iFPD/BDMV` '1)' 1:chapter.txt 2:h264.mkv 3:DTSMAENG.dtsma -progressnumbers -log=eac3to.txt
#注意,这里有个非常诡异的问题,排查了很久,1)会选者不上,主要是因为路径的问题,要用winepath
#1)ffmpeg
ffmpeg -i 00009.m2ts -map 0:0 -vcodec copy -map 0:1 -acodec copy -map 0:7 -scodec copy W.E.2011.1080p.BluRay.Remux.mkv
#2)mkvermerge
mkvmerge -o W.E.2011.1080p.BluRay.Remux.mkv 00009.m2ts

i is the name of the input file.
-map is used to map each track to a specific command option.
0:0 is the first track, i.e. the video, which is then mapped to the -vcodec option, i.e. video codec option, which simply copies the video track into the new mkv container.
0:1 is the first audio track, i.e. the English audio, which is then mapped to the -acodec option, i.e. audio codec option, which simply copies the English audio track into the new mkv container.
0:9 is the first subtitle track, i.e. the English subtitle, which is then mapped to the -scodec option, i.e. subtitle codec option, which simply copies the English subtitle into the new mkv container.

1
2
apt install mkvtoolnix
mkvmerge

小工具集合

mosh连接

1
2
3
4
5
6
brew install mosh#mac 客户端

sudo apt-get install mosh
mosh-server new -c 256 -s -l LANG=en_US.UTF-8 -p 60000

mosh pi@pi42.local -p 6000

远程同步文件

1
2
rsync -avz --progress /root/client/   root@202.112.23.12:/home/work/      
#将本机的/root/client/拷贝至远程的202.112.23.12:/home/work/目录,--progress可以查看拷贝的过程

docker查看映射目录

1
2
docker inspect 容器名称 | grep Mounts -A 20

批量获取前端种子下载链接

主要是针对ptpp不支持的站点

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
console.clear()

var trs = document.querySelectorAll("form[action]")
var pk ="passkey"
var dl =''
href=''
ct=0
for (var tr of trs){
a=tr.action
if (a.match(/zip/))
{
continue
}
tid=a.match(/id=(\d+)&*sign=(\d+)/)
console.log(tr)
if(tid)
href="https://***./download.php?id="+tid[1]+"&passkey="+pk+"&https=1"
dl=dl+href+"\r\n"
ct=ct+1
}
console.log(dl,ct)
copy(dl)

新服务器探针ServerStatus

https://github.com/zdz/ServerStatus-Rust

1
2
3
4
5
6
#自动安装配置脚本
wget --no-check-certificate -qO status.sh 'https://raw.githubusercontent.com/zdz/ServerStatus-Rust/master/scripts/status.sh'
#客户端
./status.sh -i -c http://name:password@ip:8080
#服务器
./status.sh -i -s

PT服务器工具
https://gawain12.github.io/2022/05/11/PT服务器工具总结/
作者
Gawain
发布于
2022年5月11日
许可协议