如何正确停止ffmpeg屏幕录制? [英] How can i stop ffmpeg screen recording correctly?
问题描述
我正在记录屏幕并将其保存到* .mkv容器中(我不确定这是否是我真正需要的,我之所以选择它是因为在文件开始处使用了matadata,并希望该文件可以正常运行如果simething会出错),请使用以下命令:
I am recording my screen and saving it to a *.mkv container (I am not sure it is what i really need, i have chosen it because a matadata in start of the file, and had hoped the file will be OK if simething will be wrong) using command:
ffmpeg -f x11grab -r 7 -s 1920x1080 -i :0.0 -vcodec png -f segment -segment_time 20 Video_%02d.mkv
我有问题:使用硬件按钮:)关闭我的电脑时,我的视频文件段大小为0,我不知道为什么会发生这种情况.
I have problem: When a shut down my pc, using the hardware button :), i have 0 size video file segment, i don't know why it happens.
推荐答案
在运行命令时应按Q.这是退出ffmpeg的设计方法.
You should press Q while running the command. This is the designed way of quitting ffmpeg.
或者,如果您无法访问ffmpeg进程的标准输入,则可以将其终止.
Or you can kill the ffmpeg process with SIGINT, if you cannot access its standard input.
这篇关于如何正确停止ffmpeg屏幕录制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!