Skip to content

Instantly share code, notes, and snippets.

@Mohamedemad4
Created January 18, 2021 00:20
Show Gist options
  • Save Mohamedemad4/d4f41488c1bd863a6e26af5b6a6ab0f2 to your computer and use it in GitHub Desktop.
Save Mohamedemad4/d4f41488c1bd863a6e26af5b6a6ab0f2 to your computer and use it in GitHub Desktop.
Low latency webcam streaming with ffmpeg
# ffmpeg -f v4l2 -i /dev/video0 http://localhost:8090/feed1.ffm
# and run the server with ffserver -c mpjpeg_streaming.conf
# go to your browser in http://localhost:8090/feed.mpjpg
HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 0.0005g
ACL allow 127.0.0.1
ACL allow localhost
</Feed>
<Stream feed.mpjpg>
Format mpjpeg
Feed feed1.ffm
VideoFrameRate 15
VideoBitRate 512
VideoBufferSize 12
NoAudio
</Stream>
<Stream stat.html>
Format status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
</Stream>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment