从ffmpeg向ffserver发送2个不同的摄像头源

时间:2015-04-28 19:24:53

标签: ffmpeg streaming ffserver

我目前正在一个项目中工作,我必须通过TCP连接将2个网络摄像机流从计算机流式传输到另一个,我可以顺畅地传输1个:

使用

ffserver.conf:

            HTTPPort 8090
            HTTPBindAddress 0.0.0.0
            MaxClients 40
            MaxBandwidth 30000

            CustomLog -
            NoDaemon

            <Stream status.html>
            Format status
            ACL allow localhost
            ACL allow 192.168.0.0 192.168.255.255
            </Stream>

           #feed for camera 1
           <Feed webcam1.ffm>
           File /tmp/webcam1.ffm
           FileMaxSize 100M
           </Feed>

           #feed for camera 2
           <Feed webcam2.ffm>
           File /tmp/webcam2.ffm
           FileMaxSize 100M
           </Feed>

          #stream for feed 1
          <Stream webcam1.mjpeg>
          Feed webcam1.ffm
          Format mjpeg
          VideoSize 1280x720
          VideoFrameRate 30
          Preroll 0
          NoAudio
          Strict -1
          </Stream>

          #stream for feed2
          <Stream webcam2.mjpeg>
          Feed webcam2.ffm
          Format mjpeg
          VideoSize 1280x720
          VideoFrameRate 30
          Preroll 0
          NoAudio
          Strict -1
          </Stream>

命令运行ffserver:

          ffserver /etc/ffserver.conf

命令提供ffserver:

         ffmpeg -v 2 -r 20 -f video4linux2 -i /dev/video0 http://localhost:8090/webcam1.ffm

它完美无缺,但当我尝试运行其他Feed:

         ffmpeg -v 2 -r 20 -f video4linux2 -i /dev/video1 http://localhost:8090/webcam2.ffm

我只能看到第二个流,第一个流不再有效。 一些想法?

0 个答案:

没有答案