Is there anyone who can successfully run real time streaming with ffserver?
I also try this for video and audio but neither the video nor the sound could be established.
HttpPort 8090
RtspPort 8554
HttpBindAddress 0.0.0.0
MaxClients 1000
MaxBandwidth 10000
NoDefaults
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 5M
ACL allow 127.0.0.1
</Feed>
<Stream test>
Feed feed1.ffm
Format rtp
#VideoCodec libx264
#VideoFrameRate 25
#VideoBufferSize 80000
VideoBitRate 4000
VideoSize 1920x1080
AudioCodec aac
Strict -2
AudioBitRate 8000
AudioChannels 2
AudioSampleRate 44100
AVOptionAudio flags +global_header
</Stream>
But by adding the "Noaudio", only the video is playing. How to fix the problem؟
Please refer to following links:
- Simple video streaming with ffserver
- Live video streaming from Ubuntu (the link is broken)
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!