如何使用http中的VLC将视频流传输到其他计算机 [英] How to stream Video using VLC in http to other computer
问题描述
我想使用 vlc
中的 http
将视频从计算机流式传输到另一台计算机.我已经从这里阅读了如何进行视频流传输的步骤
如您所见,这里有 0%
个数据包丢失.
现在,在检查您现在能够 ping
系统以流式传输视频后,请执行以下步骤:
-
打开您的VLC应用程序.
-
现在单击菜单中的媒体",然后从菜单列表中选择流".现在您将看到如下所示的对话框
-
现在单击添加,然后选择要流式传输的视频,然后单击底部的
STREAM
按钮.现在它将显示以下屏幕. -
现在单击
下一步
. -
现在,您必须在此处选择流传输方法,以便根据需要选择
http
,但是在这里,为了方便起见,我将使用UDP
并在在本地显示
按钮.
- 现在单击
Add
,将为您提供选项,输入您要进行流传输的系统的IP
地址和端口numbwe.我在此处提供我的本地ip
和默认端口号,但是您需要输入目标系统IP
,并且可以选择任何端口,但我会首选使用默认端口.
- 现在单击下一步,选择您的流媒体编解码器,我将使用默认选项.
- 现在单击下一步,它将显示一些字符串,所以现在单击
Stream
,现在您正在将视频流式传输到目标IP
现在成功执行上述步骤后,现在在目标系统中.您需要执行以下步骤:
- 打开
VLC
应用程序. - 从菜单栏中单击
Media
,然后单击Open Network Stream
. - 现在,您需要输入
URL
来接收流.当我使用UDP
时,我将其写为udp://@:1234
这里的1234
是我的VLC
用来侦听流的端口号.现在,点击播放
,几秒钟后,您将在此处看到流式传输的视频.瞧,您已成功将视频流式传输到Internet上存在的另一个系统.
I want to stream a video from my computer to another computer using http
in vlc
. I have read the steps of how to do the streaming of the video from here
https://wiki.videolan.org/Documentation:Streaming_HowTo_New/
But here they have explain how you can stream from the PC and use the same one to receive the video but I want to stream to the other computer.
Here what steps I have followed till now:
- Opening the
VLC
player - Clicked on
stream
frommedia
menu. - Selected the file to stream.
- Now it is showing me the full path of the video so I clicked on next.
5.Now in the destination setup window I choosed
http
from drop down menu and click on Add but here the problem is it is only giving me the option to choose the port number and giving some path but not giving the option of entering theIP
address of the receiver side.
If I didn't give any IP so how it will know where to stream, If in the above step I just click on next after choosing port number it will show me to choose codec
If i choose the codec then in the next screen it will give me the stream string output
, Now in this stream string output
which is given below
:sout=#transcode{vcodec=hevc,acodec=mpga,ab=128,channels=2,samplerate=44100,scodec=none}:duplicate{dst=http{mux=ffmpeg{mux=flv},dst=:8080/},dst=display} :no-sout-all :sout-keep
It is clearly visible that the dst=:8080
but it didn't mention on which IP it should stream. I just want to know how can I add the IP so that destination will look like dst= myReceiverIP:port
.
You just can't send the packets to any computer in the internet as they won't receive it because the routers will decline the packets coming from unknown resources so even if the VLC
application in your system is showing that you are sending the stream properly it doesn't mean that it is reaching to the destination properly.
So then how can you send the stream to the PC available in the internet, First you have to make sure that whatever system you are sending the stream to should be present in the public sub net, It simply means you should be able to ping that system from your system, to check whether are you able to ping
a system or not open your terminal in Ubuntu and then run the following command
ping destination_ip_address
if it is receiving the ping
successfully that means you can stream your video to that ip
.
For example, I am showing you by ping
to my own system.
As you can see there is 0%
packet loss here.
Now after you check that you are able to ping
the system now to stream the video follow the below steps:
Open your VLC application.
Now click on the Media from menu and then Stream from the menu list. Now you will see the same dialog as below
Now click on ADD and choose the video which you wanted to stream and click on
STREAM
button on bottom. Now it will show you the below screen.Now click
Next
.Now here you have to select the streaming method so you choose
http
as you want but here I will useUDP
for my convenience and also tick thedisplay locally
button.
- Now click on
Add
and you will be given option to enter theIP
address of the system where you wanted to do the streaming and the port numbwe. I am giving my localip
here and the default port number but you need to enter your destination systemIP
and can choose any port but I will preferred to use the default one.
- Now click on next and choose your codecs of streaming I am just going with the default options.
- Now click on next and it will show you some string, So now click on
Stream
and now you are streaming your video to the destination IP
Now After performing the above steps successfully, Now in your Destination system. You need to do the following steps:
- Open the
VLC
application. - Click on
Media
from the MENU bar and theOpen Network Stream
. - Now you need to enter the
URL
to receive the stream. As I used theUDP
so I will write it asudp://@:1234
here1234
is the port number where I want myVLC
to listen for the stream. Now click onplay
and after some seconds you will see your streamed video there. Voila you successfully streamed the video to the another system present on internet.
这篇关于如何使用http中的VLC将视频流传输到其他计算机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!