Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adaptive Video doesn't work with AVPro Video on Windows #56

Closed
AndrewRH opened this issue Dec 3, 2018 · 8 comments
Closed

Adaptive Video doesn't work with AVPro Video on Windows #56

AndrewRH opened this issue Dec 3, 2018 · 8 comments
Labels
Milestone

Comments

@AndrewRH
Copy link

AndrewRH commented Dec 3, 2018

Describe the issue

When selecting the adaptive option and using AVPRo Video on Windows, the stream doesn't open (may be PC configuration / OS version specific).

It seems to be related this method GetAdaptiveVideoFileURL() which returns an HLS stream for Apple, and a DASH stream for everything else (Windows and Android mainly).

A possible fix

Perhaps there should be an option to rather expose the HLS stream for Windows+Android? They both have pretty good HLS support and it would be very handy to be able to select either. HLS probably even has better support as it is more widely used, so it could be the default.

    public string GetAdaptiveVideoFileURL() 
    {
        switch (Application.platform)
        {
            case RuntimePlatform.Android:
            case RuntimePlatform.WindowsPlayer:
            case RuntimePlatform.WindowsEditor:
            case RuntimePlatform.OSXPlayer:
            case RuntimePlatform.OSXEditor:
            case RuntimePlatform.IPhonePlayer:
            case RuntimePlatform.tvOS:
                return files["hls"]["link"];

            default:
                return files["dash"]["link"];
        }
    }  
@caseypugh
Copy link
Contributor

Thanks for filing this @AndrewRH - this is a known issue on Windows and is a problem with the way Vimeo has structured its DASH manifest files. We are working on a fix.

And that is probably a good idea re: exposing HLS & DASH. We just wanted to make it simple for people to not have to worry about which adaptive type to select.

@caseypugh
Copy link
Contributor

FYI, we added new methods to support fetching whatever kind of adaptive stream you want: #61

@vector3
Copy link

vector3 commented Dec 29, 2018

FYI, we added new methods to support fetching whatever kind of adaptive stream you want: #61

This doesn't actually fix the issue of adaptive streams not working on Android and Windows, correct?
At least it didn't work for me when I tested it.

As I need to evaluate video solutions for a project, is there any quick/dirty fix to this problem?

@caseypugh
Copy link
Contributor

Hi @vector3 - correct, it does not fix it.

After doing more debugging with the AVPro team, we discovered that the issue is with AVPro which is using a very old Windows library for adaptive playback. AVPro mentioned that they have a new version being released (soon, I think) which will fix the issue.

If you need a quicker fix, I'd suggest trying some other Unity plugins for adaptive playback. Unfortunately, I don't have any recommendations, yet.

@AndrewRH
Copy link
Author

AndrewRH commented Feb 6, 2019

This seems to happen due to URL redirection, which is currently confusing our Windows Media Foundation and Android implementation. A fix should come soon to either the Vimeo Unity plugin or our AVPro Video plugin. In the meantime something like the following code can be added inbetween Vimeo and AVPro Video to resolve the URL and then pass it on for playback:

IEnumerator ResolveAndPlay(string url)
{
    using (UnityWebRequest www = UnityWebRequest.Head(url))
    {
        yield return www.Send();        // TODO: change this to SendWebRequest in newer Unity versions

        if (!www.isError)       // TODO: change this to isNetworkError in newer Unity versions
        {
            _mediaPlayer.OpenVideoFromFile(MediaPlayer.FileLocation.AbsolutePathOrURL, www.url, true);
        }
    }
}

Thanks,

@caseypugh
Copy link
Contributor

FYI, we are resolving this issue in PR #77

juniorxsound added a commit that referenced this issue Feb 12, 2019
**What?**

* Adding an `Unfurl` coroutine to the Vimeo Player so that when it gets adaptive streams from the API it unfurls them to the right manifest destination. Fixes #56
* Adding basic tests to check that `Unfurl` is unfurling when it should/should not

Tested against:

* Unity 2018.2.18f1
* Unity 2017.4.16f1
* Unity 2017.1.5f1
@AStopher
Copy link

This seems to be an issue again with the latest SDK and Unity 2019.3.4 in Windows (maybe 10% of the time it'll work, but most of the time it'll just get stuck on Opening.
Using the SDK in conjunction to AVProVideo.

@francescocalculli
Copy link

This seems to be an issue again with the latest SDK (2.4.1) and Unity 2020.3.29f in Windows.
Using the SDK in conjunction to AVProVideo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants