https://trac.ffmpeg.org/wiki/StreamingGuide
https://ffmpeg.org/ffmpeg-devices.html
http://www.ffmpeg.org/ffmpeg-protocols.html#toc-rtp
http://tools.ietf.org/html/rfc3984
The --with-ffplay
is necessary if you want to play streams.
brew install ffmpeg --with-ffplay
Note this generates a .sdp file.
ffmpeg -re -f lavfi -i smptebars -vcodec libx264 -tune zerolatency -vf scale=1920:1080 -b 900k -sdp_file stream.sdp -f rtp "rtp://127.0.0.1:5600"
Mainly sends STAP-A packets.
ffplay stream.sdp
ffmpeg -f avfoundation -list_devices true -i ""
ffmpeg -f avfoundation -i "default" out.mpg
ffmpeg -re -f avfoundation -i "default" -vcodec libx264 -sdp_file stream.sdp -f rtp "rtp://127.0.0.1:5600"
ffmpeg -framerate 30 -f avfoundation -i "default" -vcodec libx264 -tune zerolatency -vf scale=1920:1080 -b 900k -sdp_file stream.sdp -f rtp "rtp://127.0.0.1:5600"
-frametate 30
may or may not be needed.
-tune zerolatency