We are trying to send live stream from two webcams as below :
ffmpeg -f video4linux2 -i /dev/video0 -f video4linux2 -i /dev/video1 http://127.0.0.1:8090/feed1.ffm
We want to play both the streams using any players available. When we use VLC, to open the stream, we get only one stream( from /dev/video0). The command is as below:
vlc http://127.0.0.1:8090/test.mpg
Here I am running ffserver in my machine and trying to access as localhost. My ffserver config is as below :
Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -
NoDaemon
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 1G
ACL allow 127.0.0.1
</Feed>
<Stream test.mpg>
# coming from live feed 'feed1'
Feed feed1.ffm
Format mpeg
VideoBufferSize 40000
VideoSize 1280x720
VideoCodec mpeg1video
NoAudio
ACL ALLOW 127.0.0.1
</Stream>
<Stream stat.html>
Format status
# Only allow local people to get the status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
</Stream>
# Redirect index.html to the appropriate site
<Redirect index.html>
URL http://www.ffmpeg.org/
</Redirect>
If we try the below command to save two streams onto the file, we are getting two instances of VLC player and both Streams can be seen :
ffmpeg -f video4linux2 -i /dev/video0 -f video4linux2 -i /dev/video1 /home/2Streams.mpg
Its a strange behavior I am able to save two Video Streams as a file but I am unable to send Two Video Streams in one Single feed. Kindly help me out in achieving the same.
Regards