I'm studying how to live stream my webcam which would be recognized as /dev/video0 in linux to the internet. I'm trying ffmpeg, now get the following method works:
1.create a ffserver.conf file
HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 200
MaxClients 100
MaxBandWidth 500000
CustomLog -
<Feed camera.ffm>
File /tmp/camera.ffm
FileMaxSize 200M
</Feed>
<Stream camera.mjpeg>
Feed camera.ffm
Format mpjpeg
VideoFrameRate 15
VideoIntraOnly
VideoBitRate 4096
VideoBufferSize 4096
VideoSize 640x480
VideoQMin 5
VideoQMax 51
NoAudio
Strict -1
</Stream>
2.run the server by command :
ffserver -f ffserver.conf
3.run the ffmpeg to open the camera
ffmpeg -f video4linux2 -s 640x480 -r 15 -i /dev/video0 http://localhost:8090/camera.ffm
It seems that it works good. However, the official wiki of ffmpeg says the ffserver is deprecated but I'm difficult to find the alternative way to make it work (without ffserver). Do I still need the ffserver.conf file? Or I just need some pure command with ffmpeg?