【问题标题】:HELP: UDP broadcast vlc stream weirdness!帮助:UDP 广播 vlc 流怪异!
【发布时间】:2011-01-25 08:31:41
【问题描述】:

您好,我正在尝试使用 vlc 在 LAN 内广播 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广播吗?

感谢您的回答!

【问题讨论】:

  • cvlc 是另一个命令,控制台 vlc,它通过 X11 不启动 GUI,我认为它相当于 vlc -I dummy

标签: command-line udp broadcast vlc multicast


【解决方案1】:

239.255.x.x 地址是多播地址空间的一部分,范围从 224.0.0.0 到 239.255.255.255(其中有一些特定用途的区域)。

您已经正确地指出,没有路由器它就无法工作。这是因为基本 IP 堆栈仍然想知道如何路由这些地址以确定将它们发送到哪个接口。您可以为多播添加静态路由(该地址或所有多播地址),或放入默认网关。

【讨论】:

    【解决方案2】:

    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.
    

    【讨论】:

    • 您好 Charles Ray,感谢您的回答。我确实已经多次阅读手册。但是多播在某些网络环境中不起作用。
    • 您是否确保在连接的接收端打开端口?可能有许多不同的可能性。
    • 是的,打开,相同的机器(服务器,客户端),在一个新的网络中,变得不可用。只有 diff = 缺少路由,ip 地址是手动设置的。 UDP广播是否需要路由器或网关才能正常工作?
    • 是的,需要路由器,看我的回答。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-04-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-07
    • 2016-02-25
    • 2013-05-15
    相关资源
    最近更新 更多