Is there anyone who can successfully run real time streaming with ffserver?

Potato picture Potato · May 24, 2016 · Viewed 17.4k times · Source

I hope to stream my video camera and audio mic. using ffserver.

ffserver says it could do such, but I just can't find any working source?

If someone knows, could you please show me how it's done?

Answer

Murad Tagirov picture Murad Tagirov · May 24, 2016

Please refer to following links:


Following is configuration of my test env:

ffserver configuration [/etc/ffserver.conf]

HttpPort 8090 
RtspPort 5554
HttpBindAddress 0.0.0.0 
MaxClients 1000 
MaxBandwidth 10000 
NoDaemon 

<Feed feed1.ffm> 
File /tmp/feed1.ffm 
FileMaxSize 5M 
</Feed> 

<Stream test.mpeg4>
Feed feed1.ffm
Format rtp
VideoCodec mpeg4
VideoFrameRate 15
VideoBufferSize 80000
VideoBitRate 100
VideoQMin 1
VideoQMax 5
VideoSize 352x288
PreRoll 0
Noaudio
</Stream>

Run ffserver like following:

ffserver -d

Start video capture from web camera:

ffmpeg -r 25 -s 352x288 -f video4linux2 -i /dev/video0 http://localhost:8090/feed1.ffm

Now you can play your stream using any rtsp client. In my example I use ffplay:

ffplay "rtsp://localhost:5554/test.mpeg4

I just tested this configuration on my laptop. And it works fine!