unity3d UMP插件报错 Can‘t load libvlccore library: 126

如果出现以上错误(pc测试.exe,其它平台打包出后报错也差不多,修改这个脚本里对应的平台方法),检查打包目录xxxx_data/Plugins是否与下图目录一样

解决办法:打开UMPPostBuilds.cs脚本修改 public static void BuildWindowsPlayer64(string path, UMPSettings settings)这个方法

 public static void BuildWindowsPlayer64(string path, UMPSettings settings)
    {
        string buildPath = Path.GetDirectoryName(path);
        string dataPath = buildPath + "/" + Path.GetFileNameWithoutExtension(path) + "_Data";

        if (!string.IsNullOrEmpty(buildPath))
        {
            if (!settings.UseExternalLibs)
            {
                CopyPlugins(settings.AssetPath + "/Plugins/Win/x86_64/plugins/", dataPath + "/Plugins/plugins/");
                string[] files = Directory.GetFiles(dataPath + "/Plugins/x86_64/");
                foreach (string str in files)
                {
                    string file = Path.GetFileName(str);
                    Debug.LogError(file);
                    File.Copy(str, dataPath + "/Plugins/" + file);
                }
                Directory.Delete(dataPath + "/Plugins/x86_64/", true);
            }
            else
            {
                if (File.Exists(dataPath + "/Plugins/" + UMPSettings.LIB_VLC_NAME + ".dll"))
                    File.Delete(dataPath + "/Plugins/" + UMPSettings.LIB_VLC_NAME + ".dll");

                if (File.Exists(dataPath + "/Plugins/" + UMPSettings.LIB_VLC_CORE_NAME + ".dll"))
                    File.Delete(dataPath + "/Plugins/" + UMPSettings.LIB_VLC_CORE_NAME + ".dll");
            }
        }
        Debug.Log("Standalone Windows (x86_x64) build is completed: " + path);
    }

应该就可以了,我用的是ump2.0.2(已改为2.0.3),unity版本2019.3

打包路径不要有中文

目前2.0.3也没有问题,我是用win7打包出来放在win10播放是没有问题的,而w10打包放在win7播放就会出现上述文件路径出错

还有一点如果不想卡死或者闪退的最好使用2.0.3版本,其他版本多次播放或者切换视频地址会出现闪退的问题

如果不考虑在win7上不放监控或者视屏,可以考虑使用AVPro Video这个插件

!!!如果没有修改它的配置文件以及路径设置,目录UniversalMediaPlayer一定要放在Asset目录下

  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 12
    评论
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.

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值