您好我正在尝试使用vlc在局域网内广播UDP流,使其像电视频道一样。
我使用命令行启动VLC,然后vlc可以运行=
cvlc --repeat filename.avi --sout '#standard{access=udp,mux=ts,dst=239.255.12.42:8001}
问题是它适用于某些网络,我在没有路由器的网络上接收它有问题!
问题:地址“239.255.x.x”有什么神奇之处?除交换机和电缆外,UDP广播需要什么样的网络硬件?无线可以接受UDP广播吗?
感谢您的回答!
答案 0 :(得分:3)
239.255.x.x地址是多播地址空间的一部分,范围从224.0.0.0到239.255.255.255(并且有一些特定用途区域)。
您已正确注意到没有路由器它无法正常工作。这是因为基本IP堆栈仍然想知道如何路由这些地址以确定将它们发送到哪个接口。您可以为多播添加静态路由(该地址或所有多播地址),也可以放入默认网关。
答案 1 :(得分:0)
Read about using command line options here.
更具体的答案:
standard (alias std)
Sends a stream.
Options:
access: how to send: file, udp, rtp, http.
mux: which muxer (ie, which format) will be used. It can be one of avi (for AVI format) ogg (for OGG format) ps (for MPEG2-PS format) ts (for MPEG2-TS format).
url: if you use the file access, it will be the location where to store the stream; if you use another access, it will be the unicast or multicast IP address where you want to stream.
sap: if you use the udp or rtp accesses, use this option to announce your stream, using SAP/SDP.
name! This option contains the name under which you want to announce the program.
slp: like sap, but use the SLP protocol. You need to have libslp on your system.
sap_ipv: if you use the sap option, use this option to specify if you want to send the SAP announces in IPv4 or IPv6. The value of this option is 4 or 6.