Ffmpeg 通过HAProxy的视频流

Ffmpeg 通过HAProxy的视频流,ffmpeg,html5-video,gstreamer,haproxy,Ffmpeg,Html5 Video,Gstreamer,Haproxy,我想流视频从我的网络摄像头到许多客户端(所有客户端使用HTML5视频播放器) 现在我有这个: 服务器: sudo gst-launch-0.10 tcpserversrc port = 1234 ! oggparse ! tcpserversink port = 1235 sudo gst-launch-0.10 tcpserversrc port = 1234 ! oggparse ! tcpserversink port = 1235 发件人: ffmpeg -f video4linux

我想流视频从我的网络摄像头到许多客户端(所有客户端使用HTML5视频播放器)

现在我有这个:

服务器:

sudo gst-launch-0.10 tcpserversrc port = 1234 ! oggparse ! tcpserversink port = 1235
sudo gst-launch-0.10 tcpserversrc port = 1234 ! oggparse ! tcpserversink port = 1235
发件人:

ffmpeg -f video4linux2 -s 320x240 -i /dev/mycam -f alsa -i hw:1 -codec:v libtheora -qscale:v 5 -codec:a libvorbis -qscale:a 5 -f ogg http://localhost:1234
ffmpeg -f video4linux2 -s 320x240 -i /dev/mycam -f alsa -i hw:1 -codec:v libtheora -qscale:v 5 -codec:a libvorbis -qscale:a 5 -f ogg http://localhost/stream_input
接收人:

<video width="320" height="240" autoplay>
  <source src="http://localhost:1235" type="video/ogg">
  Your browser does not support the video tag.
</video>
<video width="320" height="240" autoplay>
  <source src="http://localhost/stream_output" type="video/ogg">
  Your browser does not support the video tag.
</video>
服务器:

sudo gst-launch-0.10 tcpserversrc port = 1234 ! oggparse ! tcpserversink port = 1235
sudo gst-launch-0.10 tcpserversrc port = 1234 ! oggparse ! tcpserversink port = 1235
发件人:

ffmpeg -f video4linux2 -s 320x240 -i /dev/mycam -f alsa -i hw:1 -codec:v libtheora -qscale:v 5 -codec:a libvorbis -qscale:a 5 -f ogg http://localhost:1234
ffmpeg -f video4linux2 -s 320x240 -i /dev/mycam -f alsa -i hw:1 -codec:v libtheora -qscale:v 5 -codec:a libvorbis -qscale:a 5 -f ogg http://localhost/stream_input
接收人:

<video width="320" height="240" autoplay>
  <source src="http://localhost:1235" type="video/ogg">
  Your browser does not support the video tag.
</video>
<video width="320" height="240" autoplay>
  <source src="http://localhost/stream_output" type="video/ogg">
  Your browser does not support the video tag.
</video>

您的浏览器不支持视频标记。
但是,在本例中,HTML5视频播放器没有显示任何内容

如果我将接收器更改为:(即使用localhost:1235而不是localhost/stream\u输出)


您的浏览器不支持视频标记。
它起作用了。有人能帮我吗