1
UNIVERSAL MEDIA PLAYER (UMP)™ Unity Plugin © 2016 Unity Direction Kit
UMP
User Manual
Version 1.3
2
UNIVERSAL MEDIA PLAYER (UMP)™ Unity Plugin © 2016 Unity Direction Kit
INTRODUCTION
UMP (Universal Media Player) is cross platform universal media framework for Windows, Linux, OSX, Android,
iOS that based on VLC and FFmpeg native libraries:
Platforms
CPUs
Library
Checked platforms/Graphic API
Windows
x86/x86_64
VLC
Windows 7+ (D3D9, D3D11, OpenGL)
Linux
x86/x86_64/Universal
VLC
Ubuntu 12.04.5 LTS+ (OpenGL)
OSX
x86_x64
VLC
10.10 Yosemite+ (OpenGL)
Android
armeabi-v7a/x86
VLC
Android API level 14+ (Android 4.0+)
(OpenGLES 2.0 or 3.0)
iOS
arm64, armv7
FFmpeg
iOS 6+ (OpenGLES 2.0 or Metal)
Fully compatible with Unity Editor in different modes (fast native texture updates).
Supported main video file formats playback: 3GPP, AVI, FLV, SWF, M4V, Matroska, Ogg Video, QuickTime File
Format, WebM, Windows Media Video and streaming media protocols: HTTPS, HTTP, HLS, RTSP, RTMP.
Supported main video player events: Opening, Buffering, Playing, Paused, Stopped, Ended, Error.
Supported full logging system from native library in Unity Editor for more debugging possibility with different
depth: Warning, Debug.
Supported main video player features, like: play, pause, mute, playback rate, rewind, snapshot and other.
IMPORTANT
Please note that this package contains pre-compiled binaries for libvlc which are licensed under LGPL. Also this
package contains not all of the libVLC modules, because some of them are licensed under GPL, so they has
removed.
VLC native library source code used in this package is available: Winsows, OSX, Linux.
3
UNIVERSAL MEDIA PLAYER (UMP)™ Unity Plugin © 2016 Unity Direction Kit
INSTALLATION
1. Import the UMP package from the AssetStore. You should now have a folder named UMP with
the following structure in your Unity project:
Figure 2.1: package structure
Plugins: All the native dlls and shared libraries;
Editor: Custom Editor/build script;
Materials: Custom materials that used in example scenes that based on custom shaders;
Prefabs: Special UMP prefab that used for easy setup your project with UMP asset;
Scenes: Demo scenes that's show all components in a ready setup and how work with some
additional features of UMP asset;
Scripts: C# classes that show how to work with UMP;
Shaders: Custom shaders that can be used for dynamic aspect handling and for video with
transparent channel.
2. When updating an existing UMP installation you should delete the old UMP and Plugins folder
(don't forget to store your custom plugins) before importing. If you had entered the play mode
from Unity once in your editor session you have to close Unity and restart it. Otherwise the
native dlls will be cached from Unity and could not be updated properly.
3. UMP asset consists of two parts: UMP (Win, Mac, Linux) - Standalone and UMP (Android, iOS)
- Mobile, so if you bought only mobile version it's will not work in Unity Editor mode and you
will see this message in Unity Console:
o Don't support video playback in Unity Editor without UMP (Win, Mac, Linux)
package!!!
So if you wanna editor support you need to buy also UMP Standalone.
4
UNIVERSAL MEDIA PLAYER (UMP)™ Unity Plugin © 2016 Unity Direction Kit
USAGE
1. You need to find the special UMP prefab in "Prefabs" folder that give you possibility to manage
all media player functionality and move it to your Unity scene:
Figure 3.1: add new UMP instance
2. When you select the UMP instance in your hierarchy window you can manage it with the
component inspector:
Figure 3.2: UMP inspector view
5
UNIVERSAL MEDIA PLAYER (UMP)™ Unity Plugin © 2016 Unity Direction Kit
3. Rendering GameObjects: Simple array that consist with Unity “GameObjects” that have "Mesh
Renderer" with some material or "Raw Image" component:
Figure 3.3: UMP rendering objects
4. Path to video file: url link or local path to your video. Both of this “path” will be work correctly
and you don't need to worry about video file location. You can change the videoPath and press
a "Play" button at every time. For local files you can specify an absolute path with the file:///
sheme on all supported platforms. For remote files or streams you just use your url link.
Examples:
o file:///myVideoFile.mp4 -> StreamingAssets\myVideoFile.mp4;
o file:///C:\MyFolder\Videos\video1.mp4 -> C:\MyFolder\Videos\video1.mp4;
o C:\MyFolder\Videos\video1.mp4 -> C:\MyFolder\Videos\video1.mp4;
o rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov
If you want to load video file on Android platform from an external sdcard you have to use a
path like this (for "StreamingAssets" folder you can use previous example):
o file:///DCIM/100ANDRO/MyVideo.mp4 ->
/storage/emulated/0/DCIM/100ANDRO/MyVideo.mp4
So you don't need to use in your path root name of device sd card, because on some Android
devices it can be different, also don't forget to set 'Write Access' to 'External (SDCard) in your
player settings.
If you want to load video file on iOS platform from an external memory you need to download
the special "MobileMediaPlayer.framework", that contains all possible supported codecs (also
file reading protocols) and replace to old one that located in "Plugins\iOS" folder. This updated
framework not contains by default, because he has very big size for "Assets Store" and you
should download it separately.
Link to download: MobileMediaPlayer.framework
5. Additional properties:
o Autoplay: Start playback automatically after video is buffered;
o Looping: When the playback reaches the end position it jumps to the start and plays
again;
o Mute: Set mute status for current video playback;
o Advanced: Special properties that give you possibility to have additional setup for
your video playback (file, live capture, disc and network caching).
6. Player properties:
o Play: Start video playback;