实操:
录屏:
ffmpeg.exe -r 1 -f gdigrab -i desktop -vcodec libx264 out.mp4
录制麦克风声音和摄像头的视频:
ffmpeg -f dshow -i video=”USB2.0 PC CAMERA” -f dshow -i audio=”麦克风 (USB2.0 MIC)” -vcodec libx264 -acodec aac -strict -2 out.mkv
麦克风声音+屏幕录像+带水印
ffmpeg -f dshow -i audio=”麦克风 (Realtek High Definition Au” -rtbufsize 1000M -thread_queue_size 1024 -f gdigrab -i desktop -pix_fmt yuv420p -vf drawtext=”fontcolor=red:fontsize=50:fontfile=’msyh.ttf’:text=’888′:x=50:y=50″ -y out.mp4
录制屏幕为直播流:
ffmpeg -thread_queue_size 1000 -r 30 -f gdigrab -s 1600×900 -offset_x 100 -offset_y 200 -i desktop -vcodec libx264 -acodec copy -preset:v ultrafast -tune:v zerolatency -max_delay 10 -g 50 -sc_threshold 0 -f flv rtmp://xxxxxx
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/282086.html