Closed CoolKid404 closed 4 years ago
Hi Robert,
Thanks for getting in touch.
We don't officially support YouTube streams, but I can try to offer some advice.
First of all, I wonder if it is just the editor component that is showing a cached duration, and actually if the duration is queried it will return the correct value?
So for example, if you attach a DebugOverlay component to your scene, it should show a preview of the video properties in the top-left corner of your screen - is the duration correct in that case?
Hi Andrew,
Thanks for the quick reply! I just finished testing it with the DebugOverlay script, unfortunately the issue persists. I'll attach another gif of what it looks like for you.
Thanks!
Out of interest - why are you using the DirectShow API?
DirectShow behaviour will be inconsistent and depend on which 3rd party codecs you have installed..
What happens if you switch to Media Foundation API?
One of the primary reasons we went ahead with purchasing AVPro was its DirectShow support. A lot of the testing we do is with Windows 7, and it seems there is some resolution limitations using Windows Media Foundation on Windows 7. Using DirectShow seems to have caused all those limitations to no longer be an issue.
This Error Is Not in AVPro, But Will Show With a 1080p+ Video Using Unity's Built In Video Player Component (Just Showing For Example):
WindowsVideoMedia error 0x80070057 while reading (Video URL Here) Context: MFCreateSourceReaderFromURL Error details: The parameter is incorrect.
On my system running Windows 10, trying the same link using shown in the previous gifs throws this error when using Media Foundation.
[AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources. UnityEngine.Debug:LogError(Object) RenderHeads.Media.AVProVideo.MediaPlayer:UpdateErrors() (at Assets/AVProVideo/Scripts/Components/MediaPlayer.cs:1740) RenderHeads.Media.AVProVideo.MediaPlayer:Update() (at ?Assets/AVProVideo/Scripts/Components/MediaPlayer.cs:1105)
But the same video will play fine using DirectShow (minus this issue with showing the video duration). For clarity I will another gif on this message so you can see a demonstration.
Thanks for your continued help on this.
Interesting!
Well I see that internally we are caching the duration in our DirectShow player, so it's only read once at the start. I can try not caching it to see if that solves it. It may be that the duration increases as more of the video is downloaded. Is there a way I can get the URL you are using for testing? I presume the URL expires after a short time?
Thanks,
I see, but I can try to provide it but they do expire some time after generating them.
Youtube Link: https://www.youtube.com/watch?v=LXb3EKWsInQ
If that link expires by the time you see this here is a way you can generate one yourself:
4.) Two links should be printed, one with audio, one with video. Top link is usually the video link, 5.) You can then just fill that link into AVPro, and the video should play
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This should be fixed now in version 2.0 which will be released in a near future. Thanks again for reporting this issue.
I keep having an issue when inputting a link from a non-local URL (I am generating links from Youtube videos that are converted to stream into AVPro Video), the plugin has the time incorrect, usually indicating the video is only a few seconds long.
Though it plays fine past the video length indicated in the inspector, it causes major instability when trying to seek, often times causing the editor to crash. It seems the only work around I can find at the moment is re-loading the video URL in AvPro over and over until the video time is correct.
Setup
To Reproduce
Screenshots If applicable, add screenshots to help explain your problem.![TimeIssue](https://user-images.githubusercontent.com/51421517/58987362-55cb7580-87ad-11e9-9aa2-00e65f261e47.gif)