AVPro Video is a multi-platform Unity plugin for advanced video playback
This Github page is primarily for:
For more information and documentation visit the AVPro Video Developer Portal
AVPro Video is a multi-platform Unity plugin for advanced video playback
Home Page: https://www.renderheads.com/products/avpro-video/
AVPro Video is a multi-platform Unity plugin for advanced video playback
This Github page is primarily for:
For more information and documentation visit the AVPro Video Developer Portal
Description
Hello,
we are currently using the AVPro Video plugin for a Unity project. In this project we are using .m3u8 playlists to stream video content. While fetching all streams from the playlist, I noticed that there is a minor bug when reading the width and especially the height from the playlist.
In our case we have multiple video streams with different resolutions, for example 3840 x 2160. When reading this information from the playlist, the resulting Stream object contains the width and height properties, whereat the width property is correct (3840) but the height property is not. For this example it has the value 216 instead of 2160. Since this is the case for each video stream we have in the playlist, we currently use a workaround by multiplying the value by 10 to get the correct value for the height.
The problem occurs in the HLSStream.cs file in line 138 (latest version from the Asset Store). In this line the length of the actual resolution string is calculated. For example when having the resolution of 3840x2160 in the playlist, this line should calculate a length of 9 because there are 9 characters. In the current version the result of this calculation is only 8 and furthermore the last character is cut when applying these information to the width and the height. The result is, that we get the correct value for the width but an incorrect one for the height. It is reproducible with other resolutions we have in the playlist, for example 1920x1080, 1280x720, etc.
Setup
How to reproduce
HLSStream hlsStream = new HLSStream("uri");
foreach (Stream stream in hlsStream.GetAllStreams()) { }
In our case the playlist file looks like this:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=5720000,RESOLUTION=3840x2160
chunklist_w910779299_b5720000_slDE.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=3320000,RESOLUTION=1920x1080
chunklist_w910779299_b3320000_slDE.m3u8
--------- beginning of crash
03-10 17:08:07.771 4322-4322/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.fmssb.csi, PID: 4322
java.util.NoSuchElementException
at java.util.ArrayDeque.removeFirst(ArrayDeque.java:264)
at com.google.android.exoplayer2.ExoPlayerImpl.updatePlaybackInfo(ExoPlayerImpl.java:682)
at com.google.android.exoplayer2.ExoPlayerImpl.handlePlaybackInfo(ExoPlayerImpl.java:622)
at com.google.android.exoplayer2.ExoPlayerImpl.handleEvent(ExoPlayerImpl.java:567)
at com.google.android.exoplayer2.ExoPlayerImpl$1.handleMessage(ExoPlayerImpl.java:109)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7002)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
Crashed happen when start to play video
I'm working on a phone app that uses AVPro to stream Vimeo videos. I have it working in Android/Windows, but when I transfer the project to a Mac, none of the interface controls (pause, seek, etc) are being called. For example, I'm using the "OnPauseButton()" method in VCR to pause a video, and the call to "PlayingPlayer.Control.Pause" is reached, but the Pause method in OSXMediaPlayer is not being called, even though PlayingPlayer.Control.getType() returns "OSXMediaPlayer".
Do you have any idea what could be causing this?
Describe the bug
OOM after switching videos many times
Your Setup (please complete the following information):
To Reproduce
Note, we are using two instances of AVPro, which alternate playback of videos. With each video playback, memory utilization increases until an OOM crash. See the log message below indicating a file is opened but not closed at:
com.RenderHeads.AVProVideo.AVProVideoMediaPlayer.OpenVideoFromFileInternal(AVProVideoMediaPlayer.java:259)
Logs
01-25 14:05:10.713 12771-12781/com.picovr.vrlauncher I/art: Background partial concurrent mark sweep GC freed 12031(744KB) AllocSpace objects, 18(292KB) LOS objects, 39% free, 2MB/4MB, paused 660us total 265.592ms
01-25 14:05:10.787 12771-12779/com.picovr.vrlauncher E/StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'close' not called
at dalvik.system.CloseGuard.open(CloseGuard.java:180)
at java.io.FileInputStream.<init>(FileInputStream.java:78)
at java.io.FileInputStream.<init>(FileInputStream.java:103)
at com.RenderHeads.AVProVideo.AVProVideoMediaPlayer.OpenVideoFromFileInternal(AVProVideoMediaPlayer.java:259)
at com.RenderHeads.AVProVideo.AVProVideoPlayer.OpenVideoFromFile(AVProVideoPlayer.java:645)
at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
at com.unity3d.player.UnityPlayer.c(Unknown Source)
at com.unity3d.player.UnityPlayer$e$2.queueIdle(Unknown Source)
at android.os.MessageQueue.next(MessageQueue.java:392)
at android.os.Looper.loop(Looper.java:135)
at com.unity3d.player.UnityPlayer$e.run(Unknown Source)
Screenshots
If applicable, add screenshots to help explain your problem.
Videos
If applicable, add a copy of your video or the URL
Describe the bug
A clear and concise description of what the bug is.
Your Setup (please complete the following information):
To Reproduce
Steps to reproduce the behavior:
Logs
If applicable, add error logs to help explain your problem.
Screenshots
If applicable, add screenshots to help explain your problem.
Videos
If applicable, add a copy of your video or the URL
Describe the bug
Showing only white Screen.
Your Setup (please complete the following information):
To Reproduce
1.
2.
3.
Logs
If applicable, add error logs to help explain your problem.
Screenshots
If applicable, add screenshots to help explain your problem.
Videos
If applicable, add a copy of your video or the URL
Instead email the link to us [email protected]
This is a test issue...
Describe the bug
The video is paused on the final frame and I want a button that rewinds to the start and automatically starts playing. If the video is already playing (i.e. in the middle) then this works fine but if it is at the end (i.e. paused on the final frame) the video rewinds to the beginning but doesn't play.
I've tried using:
MediaPlayer.Rewind(); MediaPlayer.Play();
Then I thought it was probably because seeking wasn't finished before calling Play(), so I tried calling Rewind() and then waiting for seeking to finish then calling Play() but it still doesn't reliably play. Even using the MediaPlayer Event for seeking finished then calling Play() doesn't seem to work 100% of the time.
Your Setup (please complete the following information):
To Reproduce**
I find that on ios we still have some mem allocated by AVPro when we are definitely not playing any video.
The first screenshot is what I found with xcode instrument after playing a 1min in game video, the next is what I found after playing a logo video(around 10 seconds), all two are mp4 format.
I don’t have much experience with iossurface but it seems to me that AVPro is holding some rendertarget internally even after the video is done? Can I have those released to save some mem?
The way we play video is to have an Object with a MediaPlayer Component on it, and destroy it when it is done.
Hi, I'm building an application on iOS.
I am streaming a video from my own server(http).
I want to implement progressive streaming, so that after 4-5 seconds when video starts playing once it plays continuously. The internet is good.
There is some form of fine-grain control over how much of the video buffers before playback?
I will really appreciate the help.
Describe the bug
I'm testing AVPro integration for one of our mobile AR apps, I'm using the trial version. If QA passes we'll acquire the iOS and Android licenses.
Our QA team was testing the app for a few hours, when all of a sudden no videos displayed anymore on that specific device. They load, audio plays, but the display surface is black (we're using the Display UGUI component). Other Android devices still work, only that specific one consistenly fails, despite reinstallation.
No errors are registered on the console.
Your Setup (please complete the following information):
To Reproduce
Steps to reproduce the behavior:
Logs
None!
Videos
https://player.vimeo.com/external/246530089.hd.mp4?s=09bf3bcde56e5bc8e63445070936a03f3dea3c17&profile_id=174
Happens on other videos with similar parameters.
Hello
I am using the AVPro test version (1.9.8)
I am using AVPro to play a video processed by FFmpeg
the video is obtained from the device gallery and then processed by FFmpeg
The code used for video processing is:
-i imputFile -preset ultrafast -vf scale='min(540,iw)':'min(348,ih)' outputFile.mp4
any idea why the first 2 seconds do not show in iOS?
it happened on an iPhone 6
Note: in android this does not happen
can you help us
we are facing a problem with the AVPro Player that has come up in the forums as well: Mpeg dash video streaming doesn't work for Android 9.
• This happens with all Android 9 devices (Huawai p20, Google Pixel 2, OnePlus 5T)
• with an older version of AvPro the problem occured
• with the AvPro Version 1.9.10 from January we are still experiencing the problem
• we are using Unity 2018.2.17f1
• no other Android devices besides the Android 9 ones show the error.
• no iOS devices with HLS streaming show the error
The videos we are using are MPEG-DASH files encoded on the azure media services.
Can you help us out with this issue?
Describe the bug
We are currently using this plugin for a tight deadline project and have run into some issues regarding video performance over a certain amount of time specifically when looping the video. Over a few loops, there is a lag at the end of the video before it loops again and this happens after a few runs. We noticed changing the Android videoapi from Exoplayer to Mediaplayer helps but we can't get this to work with your Playlist component. Any help?
Your Setup (please complete the following information):
To Reproduce
Describe the bug
I have a bit of a problem with the exoplayer on android.
The Player works perfectly for a while but at some point it randomly stops playing the movie.
This problem persists until I restart the phone. Restarting the app does not solve the problem.
Your Setup (please complete the following information):
To Reproduce
Logs
AndroidPlayer([email protected])</i> [AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources.
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: Playback error.
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: com.google.android.exoplayer2.ExoPlaybackException
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.throwDecoderInitError(MediaCodecRenderer.java:450)
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:437)
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:929)
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:506)
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:566)
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:518)
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:301)
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: at android.os.Handler.dispatchMessage(Handler.java:98)
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: at android.os.Looper.loop(Looper.java:154)
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: at android.os.HandlerThread.run(HandlerThread.java:61)
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.Exynos.avc.dec, Format(1, null, video/avc, -1, null, [2880, 2880, -1.0], [-1, -1])
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: ... 9 more
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: Caused by: java.lang.IllegalArgumentException
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: at android.media.MediaCodec.native_configure(Native Method)
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: at android.media.MediaCodec.configure(MediaCodec.java:1882)
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.configureCodec(MediaCodecVideoRenderer.java:453)
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:427)
03-31 21:20:11.526 5827 6767 E ExoPlayerImplInternal: ... 8 more
Describe the bug
The bug happens only on iOS devices or iOS simulators. This is not reproducible in the editor.
If a DisplayUGUI is a child of a Mask
component, its colors will be heavily distorded.
(Rect2DMask
however are safe)
Your Setup :
To Reproduce
Mask
, Image
, and MediaPlayer
components to the canvas root.DisplayUGUI
component to the child.Screenshots
On the left, the DispalyUGUI as it should appear. On the right, the DisplayUGUI under a Mask component.
Videos
This is reproduced with the examples videos provided with AvPro.
We want to stream high speed videos (120 fps & 240 fps) from a server, but as we noticed while debugging: the plugin will always buffer 5 seconds regardless of the frame rate. For a 120 fps and 240 fps 5s is a lot of data to process, which causes slow buffering times. We only allow a max playbackrate of 0.5X for 120 fps videos and 0.25X for 240 fps video.
A parameter to change the min buffer size (to start/continue playing) in code would be useful. We have 3 video types we are using in our app:
30 fps: min buffer can stay at 5s (max playbackrate is 1X)
120 fps: min buffer should be half, so 2.5s (max playbackrate is 0.5X)
240 fps: min buffer should be quarter, so 1.25s (max playbackrate is 0.25X)
Unity version: 2018.2.20
AVPro version: 1.9.12
I am trying to sync an animation or timeline to a video, but it is jittering due to inconsistent frame reads.
I need a way to ensure an animation stays frame locked to the video that is playing. Playable director has allows DSP control, so that could be one way to keep it locked.
We have attempted to drive an animator by getting the current milliseconds and converting it to a frame number, but that seems to be inconsistent. It will be off by a frame for long enough to see it jump.
Describe the bug
A clear and concise description of what the bug is.
Problem: Buffer range not accurate
I opened 02_Demo_imGui and switched to like http://some.com/mss.mp4. AVPro will try to buffer. If you seek to the buffered time point, sometimes it cant play at all. Web player like youtube is more accurate, i mean if you seek to the buffered range, it can play immediately. But with avpro, if you get some buffered range like 10secs, you cant play freely in the range.
Your Setup (please complete the following information):
To Reproduce
Logs
If applicable, add error logs to help explain your problem.
No err.
Screenshots
If applicable, add screenshots to help explain your problem.
Videos
If applicable, add a copy of your video or the URL
some mp4 onlie video will be ok.
or you can test with some long and high bitrate mp4 videos by http progressive streaming
Instead email the link to us [email protected]
Now no more needs for buffer range. You can do more tests to verify the problem.
We don't currently find support documented for playing video streams over WebSocket (WebRTC). We are currently streaming video over Wowza which offers ultra-low latency using websockets, or a HLS fallback which has a prohibitively greater delay for our purpose. Can you tell us if Websocket support exists in the current version of AVPro or is in the roadmap? Any assistance in finding this feature, or otherwise optimizing HLS playback is appreciated. Thanks.
Description
I have about 7-8 spheres with 360 4K videos in my project. It's fine works on PC but on Android sometimes these videos are not loading therefore not playing but sometimes it works fine.
I created a test project to catch this bug. I placed 6 spheres with these videos on a scene. It works fine on PC but on Android two videos are not playing.I brought the logs on the PC and on the Android. I think a problem is insufficient system resources.
I'm going to play ten 8K videos at the same time on AV Pro Video Media Player in two months but it doesn't work with 4K videos...
My Setup
To Reproduce
Steps to reproduce the behavior:
Any video export setting that is set, ends up creating a video file that is unplayable on my Windows 10 computer. Maybe it has something to do with the free version, as I am trying to decide whether or not to purchase.
I am a user of the Whirligig VR video player - best VR player on Windows, in my opinion. Its developer said he uses this plugin to drive the video playback. It works 100% alright for the usual case of one GPU, using the Media Foundation path.
If the user has a secondary GPU, currently it is ignored. Would it be technically feasible to adjust this plugin so that it tried to use all decoding engines available? (Not at the same time, but, if one failed, it could try the next one). I don't know if MF would accommodate that.
In some tests using DirectShow with LAV Filters, using the decoding engine on a secondary GPU seems to work, but the performance was very bad for high resolution videos (> 5500 x 5500), while using that GPU directly with MF had flawless performance. For 2D videos, DirectShow and LAV Filters work alright, and even FFmpeg can be used to encode and decode using the secondary GPU, leaving the main one free for other tasks.
The main benefit of implementing that change would be convenience for the user, as it would not need to manually change HDMI cables of the VR headset and monitor to another GPU every time he needed to watch something (and change it back once done). The target audience would mostly be users of AMD cards that are powerful for 3D engine, but have weak decoding engines, and that used a cheap NVIDIA card for decoding. Probably not a very large group, so it would be totally understandable if this feature were passed over for more pressing ones.
I have read talks about viewport tech, in which a video would be broken down in multiple smaller videos and the player would select some of them to decode and display, depending on the direction the user was facing. So maybe in the future using multiple decoding engines in parallel may prove to be a very interesting option too.
Bug on Android (can't test on iOS yet)
Run on Android
Expected Results:
Actual Results:
New Results:
The First frame of the video should is shown.
Unity version: Unity 2018.3.9f1 (64-bit)
AVPro Video version: AVPro: Version 1.9.12 - 18 January 2019
Operating system version: Android
Device model: Samsung S8+
Video specs (resolution, frame-rate, codec, file size): Any
I am playing normal videos (not 360) in VR, and I get some weird artefacts. Please see the video below.
This only happens on Android (Gear VR), but not on Oculus Go. It happens with all videos. I also play 360 videos and they are fine. This seems to happen only when using OES. If I just disable OES, and use a non-OES shader, it works just fine.
The video is displayed on a mesh (Quad). I tried other meshes (plane, cube) but the results are similar (or worse).
Is your feature request related to a problem? Please describe.
As far as I am aware there is no current method exposed that allows for saving streamed video(fragments) to local storage so it can be replayed from local storage at a later time, without having to be streamed again.
Describe the solution you'd like
Have a method exposed (or overloaded) that allows for saving streamed data to a local path.
I would imagine something like:
//The original OpenVideoFromFile method overloaded with a destination
public bool OpenVideoFromFile(FileLocation location, string path, bool autoPlay = true, string destination = "")
That is called like this
MediaPlayer.OpenVideoFromFile(MediaPlayer.FileLocation.AbsolutePathOrURL, "http://192.168.0.1:8080/foobar.m3u8, true, Application.PersistentDataPath + "/Downloads/");
Preferred this would be done on a seperate thread so it doesn't block the stream. However I can imagine this may be a problem for some devices, so this should probably be optional.
Writing to file can be done using the standard FileStream
class.
Describe alternatives you've considered
Currently I am redirecting all video requests through a HttpListener so I can catch and create a copy of the streamed data to be used for local storage, before sending the stream back to AVPro/mediaplayer using the HttpListener.Response.
The events
Seem to not be called on Android devices when using either MediaPlayer or ExoPlayer. No error or warning is displayed either.
If this isn't implemented yet it would be nice to see it in AVPro video 2.0.
Playing videos using HLS streams.
edit:
It appears that the buffering events on Android are not called when a playback first starts. When playback stops (e.g when MediaPlayerEvent.EventType.Stalled
event was raised) it will trigger the MediaPlayerEvent.EventType.StartedBuffering
event.
This behaviour seems to differ from the editor where MediaPlayerEvent.EventType.StartedBuffering
is raised when playback starts for the first time, and MediaPlayerEvent.EventType.FinishedBuffering
is raised when all fragments have been downloaded. And the same events being raised after a video has stalled.
Using AVPro 1.9.12
Describe the bug
In Android, call CloseVideo() then next time video not play. (only sound play)
Using ApplyToTextureWidgetNGUI, I found that "_mediaPlayer.TextureProducer.GetTexture()" return null in TryUpdateTexture().
That's why I call CloseVideo(), Some android devices can play only 1 video at once. (If no CloseVideo() then crash occurs.)
Your Setup (please complete the following information):
To Reproduce
Steps to reproduce the behavior:
Logs
If applicable, add error logs to help explain your problem.
Screenshots
If applicable, add screenshots to help explain your problem.
Videos
If applicable, add a copy of your video or the URL
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
I am trying to use a 360 video for a skybox but it keeps showing up upside down. I have a Skybox/Panoramic material, latlong layout, 360 image type. I have looked at the ApplyToMaterial script and tried inverting the y scale, but it has no effect.
Describe the bug
We are currently working on an application that uses Unity and AVPRO. Specifically we have HLS Streams that we are viewing using AVPRO. We have our HLS master file set up to handle different resolutions and bandwidth, and AVPRO is able to switch between them. The problem we are running into is that AVPRO always starts with the lowest resolution possible regardless of the connection of the user and it takes about 10 seconds into the video before it starts increasing. When we load a new video the process starts all over again, and it starts at the lowest resolution for a while before updating. As a result, our client's app always shows an unclear video until it slowly steps up to an appropriate resolution. As you can imagine the client is unwilling to accept that, which is delaying our ability to launch.
We tried changing the order of the #EXT-X-STREAM-INF lines in the metadata as we are unsure in what order they are processed. We also tried specifying different values for #EXT-X-VERSION.
We have been looking inside the code, on forums, and the documentation, but we have not found a solution. Is there a way to indicate AVPRO which resolution to start with and if there is not, could we have it remember what was the last resolution used so it doesn't have to start from scratch every time.
Your Setup (please complete the following information):
We have seen this response in a forum: https://forum.unity.com/threads/released-avpro-video-complete-video-playback-solution.385611/page-59#post-3938638
It says that the problem does not occur in Android, but we are currently facing the same issues on Android devices.
When trying the demo scene in Unity 2019 using HDRP I am getting a hard crash.
The end of the Editor Log says the following
(Filename: Assets/AVProVideo/Scripts/Internal/Interfaces.cs Line: 605)
Unsupported D3D format 0x58
(Filename: C:\buildslave\unity\build\Runtime/GfxDevice/d3d11/TranslateD3D11.cpp Line: 252)
Not able to get 180 Video in sphere with Stereo (L/R) and Transparency (T/B) working on the Oculus GO, Seems to work in the editor, although still some issue, e.g. seemed part of the 180 is replicated,
Link to the video we crafted for testing is below in link section
Unity 2018.2.10, and your latest avpro release (1.9.12).
Using your 180 demo scene, but changing the Stereo and transparency settings in the player
Videos
If applicable, add a copy of your video or the URL
https://rg-drop-bucket.s3.us-west-2.amazonaws.com/Outgoing/out.mp4?AWSAccessKeyId=AKIAJYMY3I5B4GYELG5A&Expires=1584856650&Signature=KQTUNIXmpx5vw6WjFsJlmykyu1Q%3D
Dear RenderHeads Support,
we are working with AVPro Movie Capture for quite some time now but for a new project we need to get a .mp4 movie not .avi anymore.
Previously we were using the x264 codec (https://sourceforge.net/projects/x264vfw/) so we could control the quality and the size of the movie pretty easily but the plugin does not allow use to switch to mp4.
Using the Microsoft H264 and mp4, there is no control on the quality and the bitrate, which does not work for us as the move is way too big with default settings.
1 - is there a possibility to change the bitrate and the quality with Media Foundation h264 in the very close future?
2 - is there an alternative to get mp4 with x264vfw ?
Thank you for your help and time !
In the Android player, the video always starts automatically, disregarding the value of the autoPlay parameter in MediaPlayer.OpenVideoFromFile
Steps: (Android player)
Describe the bug
Sometimes with the same video
-Show the first frame of the video but it is freeze
-The video is shown but it is not heard
-The video is heard but not shown
-Sometimes AVPro works correctly
Details
-We have the videos uploaded to our server, the videos are provided as resources (we do not use Streaming in the server)
-The video is played during the augmented reality of Vuforia
-During playback, we record a video of what is shown on the screen
-For the video recording we use (NatCorder)
-For the recording of the audio we use the native microphone of Unity
-We do not compile with (Metal) in PlayerSettings
-We are using the following function of AVPro (mediaPlayer.Control.SetPlayWithoutBuffering(true);)
-We use FFmpeg to process the video before uploading to the server
->For video processing with FFmpeg we use the following command line
(-i input.mp4 -preset ultrafast -vf scale='min(320,iw)':'min(400,ih)' output.mp4)
-In Android, so far we don't have these problems
Note: We have activated Multithreaded Rendering
the logs do not show relevant information
Hello, is there a way to output the unity screen to the video card of Aja?
Describe the solution you'd like
There are already builds for UWP x86, x64 and ARM platforms. With Unity 2019 there is an option of UWP ARM64. DLL for this platform is missing. Is it possible to build the plugin for UWP ARM64 as well?
Describe the bug
Video playing consumes over 100 MB for very little video (51 KB).
And that memory never released.
But using internal Unity VideoPlayer, memory released after closing video.
Your Setup (please complete the following information):
To Reproduce
Logs
If applicable, add error logs to help explain your problem.
Screenshots
If applicable, add screenshots to help explain your problem.
Videos
If applicable, add a copy of your video or the URL
Instead email the link to us [email protected]
Describe the bug
Using AVPro Video for splash scene.
Quit app and restart app quickly then "Failed to create player".
Your Setup (please complete the following information):
To Reproduce
Logs
[AVProVideo] Failed to create player instance
UnityEngine.Logger:Log(LogType, Object)
RenderHeads.Media.AVProVideo.AndroidMediaPlayer:.ctor(Boolean, Boolean, VideoApi, Boolean, Audio360ChannelMode, Boolean)
RenderHeads.Media.AVProVideo.MediaPlayer:CreatePlatformMediaPlayer()
RenderHeads.Media.AVProVideo.MediaPlayer:Initialise()
RenderHeads.Media.AVProVideo.MediaPlayer:Start()
[AVProVideo] Initialising AVPro Video (script v1.9.12 plugin v1.9.10) on Adreno (TM) 509/OpenGL ES 3.2 V@269.0 (GIT@a1355e2, I141a912644) (Date:04/18/18) (MT True) on Android
UnityEngine.Logger:Log(LogType, Object)
RenderHeads.Media.AVProVideo.MediaPlayer:Initialise()
RenderHeads.Media.AVProVideo.MediaPlayer:Start()
[AVProVideo] Opening jar:file:///data/app/com.test.app-jOTKGt8J8Fpxlbv1qx4j1Q==/base.apk!/assets/video/downloaded_from_google_play.mp4 (offset 0)
UnityEngine.Debug:Log(Object, Object)
RenderHeads.Media.AVProVideo.MediaPlayer:OpenVideoFromFile()
<PlayCoroutine>d__8:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
[AVProVideo] m_Video is null!
UnityEngine.Logger:Log(LogType, Object)
RenderHeads.Media.AVProVideo.AndroidMediaPlayer:OpenVideoFromFile(String, Int64, String, UInt32, UInt32, Int32)
RenderHeads.Media.AVProVideo.MediaPlayer:OpenVideoFromFile()
<PlayCoroutine>d__8:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
[AVProVideo] Failed to open jar:file:///data/app/com.test.app-jOTKGt8J8Fpxlbv1qx4j1Q==/base.apk!/assets/video/downloaded_from_google_play.mp4
UnityEngine.Debug:LogError(Object, Object)
RenderHeads.Media.AVProVideo.MediaPlayer:OpenVideoFromFile()
<PlayCoroutine>d__8:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
Instead email the link to us [email protected]
One important feature for our application is video clock synchronization in order to create a user-editable video timeline (very simple but similar to Adobe Première or any other video editing software).
What we need to accomplish (with just a couple of calls (setClock()) in DirectShow on Windows) is that different media on different player will share the same clock while playing, that is not just for starting them at the same time, they can also be started later like in a timeline, but to ensure their advancement is handled by the same clock.
It seems Unity VideoPlayer has some support for it:
https://docs.unity3d.com/ScriptReference/Video.VideoPlayer-externalReferenceTime.html
https://docs.unity3d.com/ScriptReference/Video.VideoPlayer-timeSource.html
Can we expect such a function in your asset too?
Or are there interfaces to use in order to code the sync ourselves?
I have a video that AVPro can play without issues on Android, Mac but does not work on PC, iOS! I cannot share the video, but here are some info that might help
Video Codec: H.264
Resolution : 2160x2160
Bitrate: 12031kbps
I suspect the bitrate might be the culprit.
Tested using latest version of AVPro 1.9.10
On Android... throws the following error when running on ARM64 with IL2CPP which is a requirement from Google Play store starting from 1 August 2019 all releases must be compliant with the Play 64-bit requirement.
05-01 11:33:12.901 14728 14801 E Unity : AndroidJavaException: java.lang.NoClassDefFoundError: com.RenderHeads.AVProVideo.AVProMobileVideo
05-01 11:33:12.901 14728 14801 E Unity : java.lang.NoClassDefFoundError: com.RenderHeads.AVProVideo.AVProMobileVideo
05-01 11:33:12.901 14728 14801 E Unity : at java.lang.Class.classForName(Native Method)
05-01 11:33:12.901 14728 14801 E Unity : at java.lang.Class.forName(Class.java:453)
05-01 11:33:12.901 14728 14801 E Unity : at java.lang.Class.forName(Class.java:378)
05-01 11:33:12.901 14728 14801 E Unity : at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
05-01 11:33:12.901 14728 14801 E Unity : at com.unity3d.player.UnityPlayer.c(Unknown Source:0)
05-01 11:33:12.901 14728 14801 E Unity : at com.unity3d.player.UnityPlayer$e$2.queueIdle(Unknown Source:72)
05-01 11:33:12.901 14728 14801 E Unity : at android.os.MessageQueue.next(MessageQueue.java:395)
05-01 11:33:12.901 14728 14801 E Unity : at android.os.Looper.loop(Looper.java:181)
05-01 11:33:12.901 14728 14801 E Unity : at com.unity3d.player.UnityPlayer$e.run(Unknown Source:32)
05-01 11:33:12.901 14728 14801 E Unity : Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.LighthouseGamesStudio.ChallengeStars-m8qVikusn872Di8r-NwmyA==/base.apk"],nativeLibraryDirectories=[/data/app/com.LighthouseGamesStudio.ChallengeStars-m8qVikusn872Di8r-NwmyA==/lib/arm64, /data/app
Bug description
I need to switch my 360 videos without having black frames in the middle, to do so I am saving a texture from the TextureProducer and showing it on a mesh during the time the new video is loading. It works quite well in the Unity Edito, on iOS (VR Cardboard mode) and it works on Android using Media Player but it does not work using ExoPlayer on Oculus Go (Android 7.1.2). Using ExoPlayer the shown texture is black (but not null).
My setup:
To Reproduce
Load a 360 video and show it on a sphere (VR mode)
Run the following code to switch to another video
// Get a reference to the current frame as Texture2D. Texture2D currentFrame = (Texture2D)mediaPlayer.TextureProducer.GetTexture(); // Blit the pixels on texture to the RenderTexture Graphics.Blit(currentFrame, TransitionRenderTexture); // Set the Texture on the Transition Screen Mesh Renderer Material transitionScreenMeshRenderer.material.SetTexture("_MainTex", TransitionRenderTexture);
The render texture is black
I am using AVProVideo for my project to display 360 videos on Unity Editor on windows platform. After every Mouse click, I am switching the videos and I have observed the time taken from changing the video file path to the first frame of the video becoming ready to play is almost 40 ms.
I want to get it by less than 16 ms. Is there any way or configuration to increase the number of threads or using direct GPU acceleration to decrease the video switching and playing time?
FYI, I have a 4096*2048 360 video which contains only one I frame. I will be happy to answer you if u have any further questions. Any help on this regard will be highly helpful.
Dear renderheads,
Unfortunately, we have a strange problem in one of our apps using AVPro for video playback.
We have an idleMode in our app, where 5 different videos are constantly and randomly shown, but sometimes (3-4 hours after starting the app), we have a strange error and no video is played anymore.
Attached you can find the snippet from our log where the error occurs. Unfortunately we didn’t log the error code so far, which we implemented now. But since there is only "loading fail" and "decode fail", maybe you already have an idea what might be the problem? As soon as there is a user input (see at the end of the log), normally one of the main videos should be played – but we get an error instantly. The only solution is to restart the app. Until the error occured, the videos were played without any problems for 65 times (see „video count“). Sometimes the app runs the whole day without any problems (around 600 plays).
LogErrors.txt
Our Setup:
Do you have any idea, what we can do/test?
Best regards,
Chris
Describe the bug
Setup:
Subtitle file
KOR.zip
Any help is greatly appreciated. Opening the file via Microsoft Word is fine, texts are correctly shown . I have tried using various Korean font, setting font import setting in Unity to Dynamic/Unicode - no dice.
I am using the AVPro MediaPlayer to play my own H.264 encoded 360 video stream in Unity on Windows Platform. But while playing that video files it's showing me the following errors.
Errors :
[AVProWindowsMedia] Movie failed to load - do you have the required codecs installed?
[AVProWindowsMedia] For MP4 files you need an MP4 splitter such as Haali Media Splitter or GDCL.
[AVProWindowsMedia] For HIGH profile H.264 videos you need to install an external H.264 decoder.
Can u please tell me what are additional things I have to install and add to make the H.264 encoded videos work with AVPro?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.