桌面录屏
录屏到文件 录屏推流到rtmp服务器
ffmpeg -f dshow -i video="screen-capture-recorder" -s 800x600 -r 10 -vcodec libx264 -preset:v ultrafast -tune:v zerolatency aaa.mp4
ffmpeg -f dshow -i video="screen-capture-recorder" -s 800x600 -r 10 -vcodec libx264 -preset:v ultrafast -tune:v zerolatency -f flv rtmp://192.168.1.253/live/1293636441140526
录屏到文件 录屏推流到rtmp服务器 包含声音
ffmpeg -f dshow -i video="screen-capture-recorder" -f dshow -i audio="virtual-audio-capturer" -r 10 -vcodec libx264 -preset:v ultrafast -tune:v zerolatency bbb.mp4
ffmpeg -f dshow -i video="screen-capture-recorder" -f dshow -i audio="virtual-audio-capturer" -s 800x600 -r 10 -vcodec libx264 -preset:v ultrafast -tune:v zerolatency -f flv rtmp://192.168.2.253/live/1293636441140526?vdoid=2019-04-19
备注: 命令录屏推流到rtmp 可能会有报错 real-time buffer [screen-capture-recorder] [video input] too full or near too full 网上查的结果是说编码效率和内存不足 运行性能不足 不能实时编码。
mp4 rtmp推流
ffmpeg -re -i aaa.mp4 -acodec copy -vcodec copy -f flv rtmp://192.168.1.253/live/1293636441140526
获取设备列表 用于设置 录屏时的 video audio
ffmpeg -list_devices true -f dshow -i dummy