捕获屏幕时过去持续时间0.750206过大

时间:2018-04-01 13:24:24

标签: ffmpeg screenshot

我想用ffmpeg

捕获我的屏幕
xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
ffmpeg -f x11grab -framerate 30 -threads 0 -s 1920 x 1080 -i :0 /tmp/capture.mp4

错误信息:

[x11grab @ 0x556025373ae0] Stream #0: not enough frames to estimate rate; consider increasing probesize
Past duration 0.750206 too large     435kB time=00:00:01.00 bitrate=3564.5kbits/s dup=19 drop=0 speed=0.382x    
Past duration 0.749168 too large

尝试其他ffmpeg命令。

ffmpeg -f x11grab -video_size 1360x768 -framerate 30 -i :0.0 -f pulse -i default -preset ultrafast -crf 18 -pix_fmt yuv420p out.mkv

[x11grab @ 0x55db2f72fc00] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[pulse @ 0x55db2f7374e0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[output stream 0:1 @ 0x55db2f7784e0] 100 buffers queued in output stream 0:1, something may be wrong.
[libvorbis @ 0x55db2f753720] Queue input is backward in time
[matroska @ 0x55db2f750760] Non-monotonous DTS in output stream 0:1; previous: 3411, current: 3272; changing to 3411. This may result in incorrect timestamps in the output file.

如何解决?

1 个答案:

答案 0 :(得分:1)

将此参数添加到ffmpeg并再试一次:-thread_queue_size 2048 这些:-probesize 10M -analyzeduration 10M