lwc:multimedia_and_graphics:streaming

This is an old revision of the document!


Streaming with nginx

Send a stream to nginx: ffmpeg -re -f video4linux2 -i /dev/video0 -vcodec libx264 -vprofile baseline -acodec none -x264-params keyint=30:scenecut=0 -strict -2 -f flv -pix_fmt yuv420p rtmp://<ip address>/show/stream

  • /show/stream is the stream url
  • keyint=30:scenecut=0 tells ffmpeg to do a new keyframe every 30 frames. Since this particular webcam is doing 30FPS that's 1 keyframe each second. This helps with latency since nginx is streaming per keyframe.

Testing nginx in foreground: sudo /usr/local/nginx/sbin/nginx -g 'daemon off;'

  • lwc/multimedia_and_graphics/streaming.1606441126.txt.gz
  • Last modified: 2020/11/26 19:38
  • by John Harrison