录屏
ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 out.mp4
推流
UDP
ffmpeg -re -stream_loop -1 -i a.mp4 -vcodec copy -f mpegts udp://127.0.0.1:1234
ffplay -protocol_whitelist "file,udp,rtp" -i udp://192.168.2.102:1234
RTP
ffmpeg -re -stream_loop -1 -i a.mp4 -vcodec copy -f rtp_mpegts rtp://192.168.2.102:1234
ffplay -protocol_whitelist "file,udp,rtp" -i rtp://192.168.2.102:1234
RTMP
报错:Connection to tcp://192.168.2.102:1935 failed: Connection refused
ffmpeg -re -stream_loop -1 -i a.flv -vcodec libx264 -acodec aac -strict -2 -f flv rtmp://192.168.2.102:1935/live/stream
ffplay rtmp://192.168.0.157:1935/live/stream