bash Avconv 广播视频流

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21856089/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 09:36:32  来源:igfitidea点击:

Avconv broadcasting video stream

linuxbashstreamingvideo-streamingavconv

提问by Luca Davanzo

I'm doing some test for broadcasting a video stream.

我正在做一些广播视频流的测试。

I try with:

我尝试:

 avconv -i video.mov -c:v libx264 -f mpegts udp://[destinationIP]:1234

And from "destinationIP" I can play the stream.

从“destinationIP”我可以播放流。

But, how can I specify a range of IPand not a single IP?

但是,如何指定IP 范围而不是单个 IP?

采纳答案by Luca Davanzo

I found the solution searching on web, especially reading this page.

我在网上找到了解决方案,尤其是阅读此页面

For transmit video:

对于传输视频:

avconv -i video.mov -c:v libx264 -f mpegts udp://224.0.0.100:1234

From any client in the lan:

从局域网中的任何客户端:

mplayer udp://224.0.0.100:1234

The trick is to trasmit to the multicast group with the ip range:

诀窍是使用 ip 范围传输到多播组:

. from 224.0.0.0   
. to   239.255.255.255

'1234' is the port used to stream.

“1234”是用于流式传输的端口。