How to stream video to your android phone 如何将视频远程传输至你的android手机?

任务:

在手机上接收PC的广播或单播视频流,简单而言,就是当我想看电影了,那么不需要将电影转存至手机,直接边传边看,当然,也可以使用多播,几个手机同时可以看。

mission: PC stream video to android phone , why we do that? Coz we do not need to copy movie to sd card to see instead we just seeing and pc transferring。   

必备条件:

prepare for test

1 android phone  2 PC (linux  , windows) 3 VLC  4  Wifi


测试设备:
My test enviroment 

 DROID RAZR ,ICS(Android 4.04) ,XP & UBUNTU ,VLC Towflower(2.02) ,NETGEAR Router

开始:
Now we start:

1 VLC -> 媒体Media ->流Stream

2 选择文件choose file -> 添加媒体文件 add media file -> 串流 press stream

3 目标设置 Stream output ->设置RTSP->设置路径setting output ,如果播放失败,添加'test.sdp',If fails,append 'test.sdp'


4 点击串流Stream

5 接下来就是掏出手机了,下载一个最新的VLC 应用,或者自己写一个简单的videoview应用,输入上述的rtsp://Server_IP:8554/test.sdp,然后,我们就可以看到电脑上传输的视频啦。

now we could download vlc from google play to our android phone ,or u could also write a videoview app to receive stream. Input the stream address ,like rtsp://Server_IP/test.sdp, then we could see the show in PC.


后话:

PS:

昨天在找vlc的时候,发现了个VLC remote ,结果发现竟然是在手机上远程控制PC端的VLC的,把手机当成电脑VLC播放器的遥控器。。。太geek了。。。

yesterday ,when I try to find vlc player ,I also find a app named 'vlc remote' ,which turns out a tool that could remote control the vlc in pc ,like play,stop or play list, so fun ,so geek... 





  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
To freeze the video from a video stream in GStreamer, you can use the "tee" element to split the video stream into two branches. One branch continues to display the video normally, while the other branch is passed through a "queue" element to buffer frames. When you want to freeze the video, you can use the "valve" element to stop the flow of frames from the first branch, and then use the "valve" element on the second branch to allow a single frozen frame to be displayed. Here is an example pipeline: ``` gst-launch-1.0 videotestsrc ! tee name=t \ t. ! queue ! valve name=v1 ! videoconvert ! autovideosink \ t. ! valve name=v2 ! videoconvert ! autovideosink ``` In this pipeline, the "videotestsrc" element generates a test video stream. The "tee" element splits the stream into two branches, named "t". The first branch continues to display the video normally, while the second branch is passed through a "queue" element to buffer frames. The "valve" elements are used to control the flow of the streams. The "v1" valve allows the first branch to flow normally. The "v2" valve is initially closed, which prevents the frozen frame from being displayed. To freeze the video, you can send a message to the "v1" valve to close it, which stops the flow of frames from the first branch. Then, you can send a message to the "v2" valve to open it, which allows a single frozen frame to be displayed. Here is an example command to freeze the video: ``` gst-launch-1.0 -e --gst-debug-level=3 \ videotestsrc ! tee name=t \ t. ! queue ! valve name=v1 ! videoconvert ! autovideosink \ t. ! valve name=v2 ! videoconvert ! autovideosink \ && sleep 5 \ && gst-launch-1.0 -e --gst-debug-level=3 \ valve name=v1 drop=true ! fakesink \ && gst-launch-1.0 -e --gst-debug-level=3 \ valve name=v2 drop=false ! fakesink ``` This command runs the pipeline and displays the video normally. After 5 seconds, it sends a message to the "v1" valve to close it, which stops the flow of frames from the first branch. Then, it sends a message to the "v2" valve to open it, which allows a single frozen frame to be displayed. Finally, it sends messages to both valves to drop all remaining frames and stop the pipeline.
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值