Unity使用UMP插件播放网络视频流(rtsp、rtmp、onvif)

1.新建场景,将Assets\UniversalMediaPlayer\Prefabs\UniversalMediaPlayer.prefab拖入到场景中。

 

2.在UI的Canvas下创建RawImage,并添加ARVideoCanvasHelper组件。
在RawImage组件中,将Material设为为ARVideoCanvasMaterial。
在ARVideoCanvasHelper组件中, 将MediaPlayer设为UniversalMediaPlayer

3.选中UniversalMediaPlayer,在UniversalMediaPlayer组件中,设置Renddering GameObjects数组,个数为1,Elelement 0为RawImage。填入Path to video file为播放地址。

  • 2
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
UMP is universal Media Framework plugin for Unity that based on Video LAN Codec (libVLC) native libraries. Support E-mail: unitydirectionkit@gmail.com Try: Demo (Win64) Demo (Mac64) Important: - Please read user manual before start use UMP; - For possibility to use external/installed VLC libraries you should install the regular VLC player (Unity 64-bit Editor == VLC player 64-bit); - Doesn't support Android & iOS platforms without UMP Pro (Android, iOS); - For correct work with UMP Pro (Android, iOS) package at first import UMP Pro (Android, iOS) package and after it import UMP Pro (Win, Mac, Linux) package in your project; Main features: + Included full C# source code; + Full compability with UMP Pro (Android, iOS); + Supported platforms: * Windows (x86, x86_64); * Mac (x86_64); * Linux (x86, x86_x64, Universal); * WebGL (experimantal) - supported media formats and browser compatibility Checked on next OS: Win - 7, 8, 8.1, 10; Mac - 10.10 Yosemite, 10.11 El Capitan; Linux - Ubuntu 16.04 LTS; WebGL - Firefox, Chrome. + Supported possibility to use external VLC libraries; + Supported possibility to easy switch subtitles (SPU) and audio tracks; + Supported Unity Audio Source component (only Win, Mac & Linux); + Supported transparent videos; + Supported possibility to get pixels of current video frame; + Supported video hosting services: * Youtube (don't support: everything private (private videos, bought movies, ...), don't support "Youtube Live Streams"); + Full compatibility with Unity Editor on supported platforms in different modes (fast native texture updates): Direct3D9, Direct3D11 and OpenGL; + Supported local video file playback, main formats (only for Win, Mac & Linux): 3GPP (.3gp), AVI (.avi), FLV (.flv), SWF (.swf), M4V (.m4v), Matroska (.mkv), Ogg Video (.ogg), QuickTime File Format (.mov, .qt), WebM (.webm), Windows Media Video (.wmv). + Supported main streaming media protocols (only for Win, Mac & Linux): HTTPS, HTTP, HLS, RTSP, RTMP.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值