FFmpeg网络摄像头推流Youtube直播
• 1 min read
ffmpeg -f lavfi -i anullsrc -rtsp_transport udp -i rtsp://10.1.1.171:554/unicast -tune zerolatency -vcodec libx264 -preset veryfast -maxrate 1984k -bufsize 3968k -vf "format=yuv420p" -g 60 -acodec libmp3lame -b:a 96k -ar 44100 -f flv -s 1920x1080 rtmp://a.rtmp.youtube.com/live2/${STREAMKEY}
视频文件
ffmpeg -re -i 4K.HEVC.mp4 -vcodec libx264 -preset veryfast -maxrate 1984k -bufsize 3968k -vf "format=yuv420p" -g 60 -acodec libmp3lame -b:a 96k -ar 44100 -f flv -s 1920x1080 rtmp://a.rtmp.youtube.com/live2/${STREAMKEY}