ffmpeg -sseof -60 -i "input.mp4" -c copy -avoid_negative_ts make_zero "last1min.mp4"-sseof -60:从文件末尾往前定位 60 秒-c copy:不重编码(快,零画质损失)
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import clr | |
| clr.AddReference('System') | |
| clr.AddReference('System.Web.Extensions') | |
| from System import Uri | |
| from System.Net import HttpWebRequest | |
| from System.Text import Encoding |
| " ============================== | |
| " UI & behavior | |
| " ============================== | |
| if has('termguicolors') | |
| set termguicolors | |
| endif | |
| set background=dark | |
| syntax enable |
| /* 引入思源黑体和思源宋体 */ | |
| @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700&family=Noto+Serif+SC:wght@400;700&display=swap'); | |
| .document-content p, | |
| .document-content body, | |
| .document-content span, | |
| .document-content ul li, | |
| .document-content div { | |
| font-family: 'Noto Serif SC', serif !important; | |
| } |
| local function pick(rules, count, random_func) | |
| random_func = random_func or math.random | |
| count = count or 1 | |
| local ret = {} | |
| local total_weight = 0 | |
| for _, v in ipairs(rules) do | |
| local weight = v.weight | |
| total_weight = total_weight + weight | |
| end |
| # 支持显示特殊字符 | |
| # set -g default-terminal "screen-256color" | |
| # set -ga terminal-overrides ",xterm*:Tc:sitm=\E[3m" | |
| set -g default-terminal "tmux-256color" | |
| set -as terminal-features ",xterm*:RGB" | |
| set -g base-index 1 # 窗口编号从 1 开始计数 | |
| set -g display-panes-time 10000 # PREFIX-Q 显示编号的驻留时长,单位 ms | |
| set -g mouse on # 开启鼠标 | |
| set -g pane-base-index 1 # 窗格编号从 1 开始计数 |
| # 用淘宝源下载python包进行安装 | |
| v=$1 | |
| wget https://npm.taobao.org/mirrors/python/$v/Python-$v.tar.xz -P ~/.pyenv/cache/ | |
| pyenv install $v |