如何使用http中的VLC将视频流传输到其他计算机 [英] How to stream Video using VLC in http to other computer

查看:73
本文介绍了如何使用http中的VLC将视频流传输到其他计算机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 vlc 中的 http 将视频从计算机流式传输到另一台计算机.我已经从这里阅读了如何进行视频流传输的步骤

如您所见,这里有 0%个数据包丢失.

现在,在检查您现在能够 ping 系统以流式传输视频后,请执行以下步骤:

  1. 打开您的VLC应用程序.

  2. 现在单击菜单中的媒体",然后从菜单列表中选择流".现在您将看到如下所示的对话框

  3. 现在单击添加,然后选择要流式传输的视频,然后单击底部的 STREAM 按钮.现在它将显示以下屏幕.

  4. 现在单击下一步.

  5. 现在,您必须在此处选择流传输方法,以便根据需要选择 http ,但是在这里,为了方便起见,我将使用 UDP 并在在本地显示按钮.

  1. 现在单击 Add ,将为您提供选项,输入您要进行流传输的系统的 IP 地址和端口numbwe.我在此处提供我的本地 ip 和默认端口号,但是您需要输入目标系统 IP ,并且可以选择任何端口,但我会首选使用默认端口.

  1. 现在单击下一步,选择您的流媒体编解码器,我将使用默认选项.

  1. 现在单击下一步,它将显示一些字符串,所以现在单击 Stream ,现在您正在将视频流式传输到目标IP

现在成功执行上述步骤后,现在在目标系统中.您需要执行以下步骤:

  1. 打开 VLC 应用程序.
  2. 从菜单栏中单击 Media ,然后单击 Open Network Stream .
  3. 现在,您需要输入 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:

  1. Opening the VLC player
  2. Clicked on stream from media menu.
  3. Selected the file to stream.
  4. 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 the IP 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:

  1. Open your VLC application.

  2. Now click on the Media from menu and then Stream from the menu list. Now you will see the same dialog as below

  3. 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.

  4. Now click Next.

  5. Now here you have to select the streaming method so you choose http as you want but here I will use UDP for my convenience and also tick the display locally button.

  1. Now click on Add and you will be given option to enter the IP address of the system where you wanted to do the streaming and the port numbwe. I am giving my local ip here and the default port number but you need to enter your destination system IP and can choose any port but I will preferred to use the default one.

  1. Now click on next and choose your codecs of streaming I am just going with the default options.

  1. 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:

  1. Open the VLC application.
  2. Click on Media from the MENU bar and the Open Network Stream.
  3. Now you need to enter the URL to receive the stream. As I used the UDP so I will write it as udp://@:1234 here 1234 is the port number where I want my VLC to listen for the stream. Now click on play 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆