icecast - IceCast 的远程流服务器
问题描述
我试图在 IceCast 服务器中重现视频流,所以我想在 icecast.xml 服务器中配置它。我有以下问题:
- 在安装部分如何配置视频流以读取输入。我想读取以下类型的流:
rtsp://************************/Streaming/Channels/101?transportmode=unicast
其实我刚刚配置了下面的iceCast.xml文件:
<icecast>
<limits>
<clients>1000</clients>
<sources>42</sources>
<threadpool>5</threadpool>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<burst-on-connect>1</burst-on-connect>
<burst-size>65535</burst-size>
</limits>
<authentication>
<!-- Sources log in with username 'source' -->
<source-password>hackme</source-password>
<!-- Relays log in username 'relay' -->
<relay-password>hackme</relay-password>
<!-- Admin logs in with the username given below -->
<admin-user>admin</admin-user>
<admin-password>hackme</admin-password>
</authentication>
<hostname>localhost</hostname>
<listen-socket>
<port>8000</port>
</listen-socket>
<relay>
<server>rtsp://172.31.8.44/Streaming/Channels/101?transportmode=unicast</server>
<port>8000</port>
<mount>/test.ogg</mount>
<on-demand>0</on-demand>
<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
</relay>
<mount type="normal">
<mount-name>/test.ogg</mount-name>
<username>othersource</username>
<password>hackmemore</password>
<max-listeners>1</max-listeners>
<dump-file>/test.mp4</dump-file>
<burst-size>65536</burst-size>
<fallback-mount>/etc/icecast2/test.mp4</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<intro>/etc/icecast2/videoDAT.mp4</intro>
<hidden>1</hidden>
<no-yp>1</no-yp>
<stream-url>rtsp://172.31.8.44/Streaming/Channels/101?transportmode=unicast</stream-url>
<on-connect>sh /home/stream-start.sh</on-connect>
</mount>
<fileserve>1</fileserve>
<paths>
<basedir>/usr/share/icecast2</basedir>
<logdir>/var/log/icecast2</logdir>
<webroot>/usr/share/icecast2/web</webroot>
<adminroot>/usr/share/icecast2/admin</adminroot>
<alias source="/" dest="/status.xsl"/>
</paths>
<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>10000</logsize> <!-- Max size of a logfile -->
</logging>
<security>
<chroot>0</chroot>
</security>
</icecast>
- 我如何配置它以读取 mp4 文件?
解决方案
Icecast 无法中继 RTSP 流。您只能中继兼容的 HTTP 渐进式流(即 Icecast 和 SHOUTcast 等流服务器服务。)
Icecast 也不会解码您的 MP4。
您需要使用 FFmpeg 之类的工具来中继到 Icecast。就像是...
ffmpeg -i <your RTSP URL> icecast://example.com/stream
推荐阅读
- ios - iOS 14.5 中的 CoreML 内存泄漏
- direct3d - D3D 从计算着色器写入纹理
- python - 使用python从列表中获取字符串
- compilation - 不鼓励在构建 openssl 时使用 no-asm 选项吗?
- c++ - 在钳位信号 .0-1 DSP 上使用 pow() 或类似的可调节曲线的 C++ 高效输入控制?
- scrapy - 我如何使用带有scrapy的旋转代理?
- python - 在 Python 中实现 LinkedList - leetcode 错了吗?
- html - 如何编辑基础站点框架的scss变量并重新编译CSS?
- javascript - 如何在同一行中获取嵌入字段标题和值
- php - 在 Foreach 语句 (PHP) 中的 X 数量结果后进行换行