Test your video feed with one simple command

In case you want to test your live-stream server, it can be a hassle to fire up OBS each time, and start streaming from a different machine. Luckily, a simple command for FFmpeg can be used to start a live-stream from the localhost. Within a second, you should see something like what you see in the next image.
An added bonus is that running this, takes practically no resources, unlike OBS for example.
Simply copy/paste the following in to your terminal, but obviously you'll need to edit the STREAM-KEY at the end, to whatever you are using as stream-key.
ffmpeg -re \
-f lavfi -i testsrc \
-f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 \
-shortest \
-vcodec libx264 -profile:v baseline -pix_fmt yuv420p \
-acodec aac -ar 44100 -b:a 128k \
-f flv rtmp://127.0.0.1:1935/live/STREAM-KEY



Recent Comments