惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Full Disclosure
Recorded Future
Recorded Future
T
Tenable Blog
S
Securelist
C
CERT Recently Published Vulnerability Notes
T
Threatpost
S
Schneier on Security
A
Arctic Wolf
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Register - Security
The Register - Security
Cisco Talos Blog
Cisco Talos Blog
AWS News Blog
AWS News Blog
K
Kaspersky official blog
T
True Tiger Recordings
T
Threat Research - Cisco Blogs
V
Vulnerabilities – Threatpost
P
Palo Alto Networks Blog
T
The Exploit Database - CXSecurity.com
小众软件
小众软件
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog
Cyberwarzone
Cyberwarzone
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tor Project blog
Spread Privacy
Spread Privacy
Malwarebytes
Malwarebytes
P
Proofpoint News Feed
F
Fox-IT International blog
F
Fortinet All Blogs
P
Privacy & Cybersecurity Law Blog
G
GRAHAM CLULEY
量子位
Latest news
Latest news
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
Project Zero
Project Zero
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
I
Intezer
博客园_首页
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
Darknet – Hacking Tools, Hacker News & Cyber Security

PowerShell

求助在 Windows 桌面运行某个程序的多个实例并在整个穿够屏幕布满的 powershell 脚本, GPT 生成的也无法平铺位置随机的。 是我孤陋寡闻了吗? powershell 里面其实支持顺斜杠, tab 补全也能改成顺斜杠 求助:如何阻止 Powershell 生成 tmp 文件 请教 win11 powershell 设置别名的问题 如何确定 powershell 在终端输出的信息是 stdout 还是 stderr? ps1 文件如何双击以管理员身份运行 V2EX ps 无法显示 bash 命令的完整参数,是 bug 吗? powershell setx 变量后无法自身得到变量值 请教, powershell 脚本中使用中文,脚本文本存储的是 utf-8,运行后中文就是乱码。 oh-my-posh 导致 powershell 启动缓慢 powershell 管道问题 如何在打开 powershell 脚本的时候, cd 到脚本所在目录 如何让 powershell 输出的 txt 日志为 unix lf 格式 这个 powershell "比对”命令能优化吗? powershell 运行 ps 文件的时候,如何支持带空格的路径 cmd 输出日志的时候,如何不写入重复日志 请教-关于 PowerShell 的使用场景问题——竞赛,编程挑战,运维需求在哪里找 cmd 控制台显示输出日志过滤 powershell7, 执行速度和自动补全速度都慢的令我抓狂 请教一下.ps1 运行时如何让 powerShell 同时显示所运行命令的内容 有什么不错的 powershell 书籍吗? PowerShell 是否可以实现类似 expect 的功能? PowerShell 启动慢 现在 PowerShell 是不是没有什么用? PowerShell 竟然强悍如斯! 请问如何使用 powershell 禁用/启用设备? 逐浪 CMSv8.2 发布-集成 Node 与 Vue 脚手架和 PowerShell 支持的新一代网站管理系统 Powershell 的管道兼容性 powershell 的独门秘技之气运“丹田” powershell 的 tab 参数补全的,两个不同方式详解。 在 PowerShell 中好好说话 在 PowerShell 中使用 fish-style 自动补全提示 PowerShell 与 Windows Terminal 增强配置 怎么把一个脚本方法注册为系统的环境变量? !微软又放鸽子了! 分享 powershell ssh to Linux 脚本。 PowerShell Core 7.0 RC 已经发布 powershell 一个很诡异的问题 powershell 的 ntp 校时脚本,光棍节秒杀专用! PowerShell 如何强行覆盖一个文件 如何使用命令行或 PowerShell 删除一个已经安装好的证书 PowerShell 如何导入已有的 SSL 证书 PowerShell 如何定义文件夹的权限 推荐一个 github 上的 PowerShell 项目 Out-GridView 在 PowerShell Core 中回归了 powershell 6, 7 的新特性。 新出炉的 ssh-copy-id6.ps1,是新版 vscode 的最佳拍档 把那 5000 多万条企业数据放到 SQLite 数据库里
Windows 运行 ffmpeg 批量脚本的时候,如何在不中断的情况下限制 CPU 使用率
1054850490 · 2022-10-13 · via PowerShell

这是一个创建于 1321 天前的主题,其中的信息可能已经有所发展或是发生改变。

因为转码的机器也是我正在使用的机器,所以运行的时候是会影响到我日常使用的,但是 ffmpeg 也没法停下来,虽然也可以用续传方法继续上次没完成的进程,奈何我的代码渣,这脚本也是我找别人写的,所以我就想着,能不能在我用的时候限制一下 ffmpeg 的占用?然后等我要睡觉的时候就放开禁用,这中途不能中断,虽然 Windows 任务管理器可以设置限制 CPU 使用核心数,但是“重点”来了,这是个批量脚本,每次轮到下一个视频的时候,任务管理器就会重置刚才的核心数限制,所以想问有没有办法让他设置的限制可以一直保持着就算新进程建立,也会维持之前对这个“程序”的限制

soclearn

1

soclearn      2022 年 10 月 13 日

bash cpulimit

106npo

3

106npo      2022 年 10 月 14 日 via Android

ffmpeg 有参数 threads 没超过总核心数时基本等于用几个核心

1054850490

4

1054850490  

OP

   2022 年 10 月 14 日

@xmumiffy #3 是有,但是嘛,它并不灵活,它在运行中就不能更改,我想我睡觉的时候放开限制,而我使用的时候再限制个数

mikewang

5

mikewang      2022 年 10 月 14 日

start /affinity 1 ffmpeg.exe *************

cxtrinityy

7

cxtrinityy      2022 年 10 月 14 日 via Android

Powershell 也可以安装到 Linux 吧,wsl 走起,用一楼的 cpulimit 方案试试

wevsty

8

wevsty      2022 年 10 月 14 日

POWERSHELL:

ForEach($PROCESS in GET-PROCESS ffmpeg) { $PROCESS.ProcessorAffinity=1}

wangyuyang3

9

wangyuyang3      2022 年 10 月 14 日 via Android

之前我为了指定 VMware 虚拟机调用的 cpu 内核,用了 process lasso 这款软件,实测可以永久记住规则,即使虚拟机进程结束重开。

你搞个破解版先试试看

AX5N

12

AX5N      2022 年 10 月 14 日

切成 N 片,然后再写一个程序判断你当前是否活动,活动的话下一个任务就低负载,不活动下一个任务就高负载,任务完成后再合并。

charlie21

13

charlie21      2022 年 10 月 14 日 via iPhone

可转码速度也会因此变慢

necomancer

14

necomancer      2022 年 10 月 14 日   ❤️ 1

任务管理器找到 ffmpeg 然后设置低优先级?

cnbatch

15

cnbatch      2022 年 10 月 14 日

换个思路,将 ffmpeg 进程的优先级设置到最低,也许这样更简单一些

Get-WmiObject Win32_process -filter 'name = "ffmpeg.exe"' | foreach-object { $_.SetPriority(64) }

加到脚本最后一行

cnbatch

16

cnbatch      2022 年 10 月 14 日

@cnbatch
啊,说得有点不太对了
应该是,用 & 符号加到脚本每句 ffmpeg 命令的后面

zcf0508

18

zcf0508      2022 年 10 月 14 日 via Android

process lasso pro

cheng6563

21

cheng6563      2022 年 10 月 14 日

process lasso pro

zictos

22

zictos      2022 年 10 月 14 日 via Android

cmd 命令就可以限制了,有些比较占 cpu 的软件我都是当软件切换到后台就限制只使用 cpu 的一个核心,切换到前台就使用所有核心

Ljcbaby

23

Ljcbaby      2022 年 10 月 14 日

@tqyq88 #20 如果有一定的质量要求,建议还是 CPU 而非 cuda ,当然拿 cuda 做解码输入还是可以的

dog82

24

dog82      2022 年 10 月 14 日

可以考虑用虚拟机解决

dog82

25

dog82      2022 年 10 月 14 日

或者让 ffmpeg 跑在 docker 里

mxT52CRuqR6o5

28

mxT52CRuqR6o5      2022 年 10 月 14 日 via Android

用 start 命令启动 ffmpeg 时设置低优先级,全设置低优先级就行了,你不用电脑的时候没有其他程序抢占资源就能跑满了

1054850490

31

1054850490  

OP

   2022 年 10 月 14 日

@tqyq88 #20
@Ljcbaby #23
其实就是用来做解码用途的,只是偶尔会遇到 av1 文件就会自动调用 CPU 解码,这就实在没办法了,会把我 CPU 吃满导致我日常也很难使用电脑,只能是等到 30 系显卡价格下来了再买个 30 系来解 av1

1054850490

32

1054850490  

OP

   2022 年 10 月 14 日

@wevsty #8
@ysc3839 #17
8 楼的方法是可以,只是有一个问题,这个循环是轮询的,也就是说 ffmpeg 刚启动的时候会有很短的时间内是没有限制核心数的,如果我正在打 LOL 的话就会突然卡一下,因为这时候会有一个峰值然后才降低,所以也并不太适用

wangyuyang3

35

wangyuyang3      2022 年 10 月 14 日

@1054850490 不是让你用虚拟机 hhh ,我是说 Process Lasso 可以实现和任务管理器类似的进程关联 CPU 调度设置,而且进程重启会一直记住这个规则,不用重新反复设置。

jeeyong

36

jeeyong      2022 年 10 月 14 日   ❤️ 1

直接设置 cpu 相关性不行吗?

hxy100

38

hxy100      2022 年 10 月 15 日

Windows 下有个开源的工具叫“Battle Encoder Shirase”(简称 BES ),支持监视尚未运行的进程、监视已经运行结束退出进程,支持以指定限制率运行指定进程,有 GUI 版本,同时也支持命令行调用,完全满足你的需求。

---
官网: https://mion.yosei.fi/BES/

---

mscsky

39

mscsky      2022 年 10 月 15 日

windows 上的 git 不是带 bash 环境?

hxy100

40

hxy100      2022 年 10 月 16 日

@mscsky 并不是所有的 Linux 软件在不修改源代码的前提下都能无缝移植到 Windows 上,一楼所提的那个 cpulimit 就不行。