linux ffmpeg录屏
2022-08-17 本文已影响0人
自由侠
编码参数: fps: 200, bitrate 800kb, gop: 60, format: cbr, profile: baseline (No B frame)
ffmpeg -f x11grab -video_size 640*480 -framerate 20 -i $DISPLAY -c:v libx264 -profile:v baseline -preset:v fast -pix_fmt yuv420p -b:v 800k -maxrate 800k -minrate 800k -bufsize 50k -nal-hrd cbr -g 60 output.h264
录屏并推送到srt server:
ffmpeg -f x11grab -video_size 640*480 -framerate 20 -i $DISPLAY -c:v libx264 -profile:v baseline -preset:v fast -pix_fmt yuv420p -b:v 800k -maxrate 800k -minrate 800k -bufsize 50k -nal-hrd cbr -g 60 -f mpegts 'srt://xx.xx.xx.xx:10080?streamid=#!::h=live/livestream,m=publish&transtype=file'