Skip to main content

FFmpeg

Stream live 1080p @ 30fps video to YouTube

FFmpeg tool can be used to stream live video to youtube, recipe command is below. Also add silent audio with proper encoding.

ffmpeg -re \
-f v4l2 \
-framerate 30 \
-video_size 1920x1080 \
-i /dev/video1 \
-ar 44100 \
-ac 2 \
-acodec pcm_s16le \
-f s16le \
-ac 2 \
-i /dev/zero \
-codec:a aac \
-ab 64k \
-strict experimental \
-vcodec copy \
-pix_fmt yuv420p \
-f flv "rtmp://a.rtmp.youtube.com/live2/[STREAM_ID]"

YouTube studio preview

youtube_stream.png