Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[Released] AVPro Video - complete video playback solution

Discussion in 'Assets and Asset Store' started by AndrewRH, Feb 12, 2016.

  1. Twil75

    Twil75

    Joined:
    Aug 30, 2012
    Posts:
    22
    Hello

    I used seek function on some platform and i have a problem on android.
    I built a video witch display timecode to be sure.

    My app display video and provide a button witch do Seek to exactly 26279 ms.

    On Windows:
    The seek is goog, video display 26:05 (26 seconds and 5 frames = 26200ms)
    and GetCurrentTimeMs after the seek say 26279

    On Android:
    The seek is bad of some frames !! video display 26:10 (26 seconds and 10 frames = 26400ms)
    but GetCurrentTimeMs after the seek say too 26279

    On android the seek is done 5 frames after the same seek on windows and it's a problem for me :(

    It's normal ?

    AVpro 1.6.12
    Unity 5.6.1
     
  2. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    447
    Hi,

    Please update to the latest version of AVPro Video: 1.6.12 - that should solve your issue.

    Thanks,
     
  3. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    447
    Okay that's strange.. I suspect it could be a bug in 2017.1 but we'll take a look. Does it happen even without SLI? I don't have an SLI rig here to test with...

    Thanks,
     
  4. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    447
    I'm afraid the seeking on Android is only to the closet keyframe. The next version of Android (Android "O") will have more accurate seeking options. For now the only option is to add more keyframes to your video.

    Thanks,
     
    Twil75 likes this.
  5. Twil75

    Twil75

    Joined:
    Aug 30, 2012
    Posts:
    22
    Thanks for your reply,
    But i have another video where the offset is 3 seconds ! it's strong !
    these 2 test videos are not render with the same soft then probably not exactly same setings (first with after effect, second with ffmpeg).

    I will search where give keyframe to ffmpeg command line .... if you know ... :)
     
  6. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    use -g 30 to set the keyframe every 30 frames.
     
    Twil75 likes this.
  7. Twil75

    Twil75

    Joined:
    Aug 30, 2012
    Posts:
    22
    Thanks, i wil try it !!
     
  8. Cambesa

    Cambesa

    Joined:
    Jun 6, 2011
    Posts:
    119
    Hi all,

    Experiment
    I'd like to say that thanks to experimenting with my own video server I found out that(On both Windows and Android) the videos are downloaded once and then looped instead of clearing the memory from the previous frames and downloading the next. It's also downloading as much as it can with it's current download speed.
    I tested this by streaming videos and turning off the video server while keeping the app running and it turned out the the videos kept looping! I also tested out turning off the server the moment the app started and thanks to quick download speeds, the complete video was already downloaded within the first half a second and kept looping!

    Question
    I also have a question, Is it possible to start buffering videos in an easy way?
    I want to implement dynamic buffering so the next video will start downloading when the current video is downloaded far enough(about 10 seconds in the future). I want to do this because the users have the ability to skip and I want to start the next video as quick as possible without waiting for the ping.

    Service
    I have access to a Samsung S8+ so I could try playing the 4k x 4k video(or other resolutions) if you can send me a link to the video.

    Kind regards,

    Cambesa
     
  9. Twil75

    Twil75

    Joined:
    Aug 30, 2012
    Posts:
    22
    Perfect it work for me !
    Thanks
     
  10. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
  11. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    Anyone getting error messages with AVPro Video on iOS using Unity 4.x, please use the attached script to replace the one that's included with version 1.6.12. The file must be copied into "Assets/AVProVideo/Scripts/Internal" folder.

    We will include this bug fix in the next version.

    Thanks,
     

    Attached Files:

  12. lXg_99

    lXg_99

    Joined:
    Dec 15, 2015
    Posts:
    12
    Hi,

    i'm having a "last displayed frame from previous selected video"-Issue i can't get my head around.I select Videos in a main menu from thumbnails from which i then switch to different player environments simply via GameObject.SetActive to eliminate loading times. Whenever i leave a Player either via pressing BACK or when the video has finished playing i execute a mediaplayer.Control.CloseVideo() in the hope that the asset is being unloaded from memory and the mediaplayer sits again in a virgin state.
    When i select and start another clip i will see the last displayed frame of the previous video flashing right before the selected clip starts. I'm sure i am doing something wrong here, can anyone point my error out to me please?

    I tried to change ApplyMapping(_defaultTexture) in Apply.ToMesh.cs to true in OnDisable, but that didn't help.

    using AVPro Video 1.60 with Unity 5.5.0f3 for deployment on Android (GearVR)
     
  13. TacticalSpace

    TacticalSpace

    Joined:
    Aug 14, 2012
    Posts:
    3
    Hi Guys,

    Thanks for the awesome product. I'm having a weird problem on IOS: I am listening for video events, and in particular for an play error, so that I can fall back on a lower res video if the device doesn't support it.

    On IOS, I get standard video events, and also load errors (if I use an incorrect URL) but not a play error.

    Code (CSharp):
    1. // add my listener function
    2. mp.Events.AddListener(OnVideoEvent);
    3.  
    4. ...
    5.  
    6.     // Callback function to handle events
    7.     public void OnVideoEvent(MediaPlayer mp, MediaPlayerEvent.EventType et, ErrorCode ec)
    8.     {
    9.         Debug.Log ("video event detected: " + et.ToString ());
    10.         if (et == MediaPlayerEvent.EventType.Error) {
    11.             if (useFallback == 0)
    12.             {
    13.                 Debug.Log(et.ToString() + ec.ToString());
    14.                 Debug.Log("Error playing video " + videofile + " trying fallback");
    15.                 useFallback = 1;
    16.                 startVideo(true, true);
    17.             }
    18.             mp.Events.RemoveListener(OnVideoEvent);
    19.         }
    20.     }
    This works fine on Android, but on IOS instead of throwing my function an error, I just get "Player xxx: Failed to play movie" in the realtime debug console.

    Any ideas why the error event isn't working in IOS?
     
    Last edited: Jul 24, 2017
  14. Tom-Goethals

    Tom-Goethals

    Joined:
    Mar 6, 2015
    Posts:
    102
    Hi AVPro Team,

    I've tried the new Oculus feature to stream from the GearVR to Chromecast. For some reason the videos are not playing when you do that. (not in the headset and not on the TV)

    I should test a bit more but i'm using 2 cameras, 1 for VR and another with some smoothing for the second display.
    (using Unity 5.6.1p2 and AVPro version 1.6.6)

    Another app where i'm using AVPro in combination with an older Unity (so with OES enabled) and a single camera is working perfect with the Chromecast.

    Testing this functionality is maybe something that can be included in your pre-release tests?
     
    Last edited: Jul 24, 2017
  15. Tom-Goethals

    Tom-Goethals

    Joined:
    Mar 6, 2015
    Posts:
    102
    Anyone tested Patch 5.6.2p4 or the release of 2017 for the OES rendering path?
     
  16. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    Not yet, but I've checked the release notes for both and can't see a mention of the bug fix / issue number. Maybe it's coming in the _NEXT_ patch, or maybe they forgot to add it to the notes.. Will try test though.
     
  17. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    hi,

    Are you able to reproduce this issuing using any of our demo scenes?
    Could you try with the latest version of the plugin (1.6.12)?
    Are you using OES mode (it's in the Android settings of MediaPlayer)?

    Anyway, I think a better way than using SetActive to turn on/off your MediaPlayers+ApplyToMesh scripts, is to simply have a single ApplyToMesh script, and change it's MediaPlayer field dynamically. And leave all of your MediaPlayer instances active. On Android though I wouldn't have more than 2 MediaPlayer instances, and if you're loading high resolution videos, then only 1 should really be used.

    If you're trying to get seamelss switching you may want to look at our demo scenes as some of them demonstrate this.

    Thanks,
     
  18. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    Thanks for reporting this - it looks like a mistake - let's continue this chat in PM. Thanks,
     
  19. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    Thanks for reporting this. Now we have to get a Chromecast :) We'll investigate. Please let us know if you have any more findings.
    Thanks,
     
  20. zvasconcelos

    zvasconcelos

    Joined:
    Jul 22, 2014
    Posts:
    2
    I need to play a video sequence. I have, for example, ten videos of 1 minute each, and as soon as one ends, I play the next. I see that it can work well using the "multiple" demo scene as a base, but it would still need some work time spended to do the seek bar and video time work well considering all videos in the folder as one single object. Exemple: If I drag the seek in the bar to 75% of the slider, it would start the video 7 at 30s. If the videos were heavy, probably it would have a delay to start the next in the row, what would be solved with a "pre-load" to the sequencial videos. For a non-sequencial, the delay would be no problem.

    Anyway, it would be very usefull to have a video player with this funcionality.

    Can we have it? o/
     
  21. Airnauts

    Airnauts

    Joined:
    Dec 20, 2016
    Posts:
    1
    Hi,
    We have purchased the full license for AVPro and are using it in a product we are building for Rift & Gear VR.
    Unfortunately we have a big issue with HLS streams - basically they refuse to be rendered correctly. They load from time to time but usually there is nothing. The log shows that the player is ready to play and shortly after that playback has started (no errors). However - nothing happens. We're @ Unity 5.5; example test stream:
    Could you advise?
     
  22. ibompuis

    ibompuis

    Joined:
    Sep 13, 2012
    Posts:
    99
    Hi,

    I'v some trouble to use ffmpeg to packed alpha video, I use your example:

    Here we show two examples using ffmpeg to convert to an alpha packed format:
    Left-right alpha packing:

    ffmpeg -i /Users/infostrates_demo_2/Desktop/IMMO2_alpha.mov -vf "split [a], pad=iw*2:ih , [a] alphaextract, overlay=w" -y /Users/infostrates_demo_2/Desktop/IMMO2_color.mov.mp4

    My file is IMMO2_alpha.mov and IMMO2_color.mov I tried to replace %1 but I have some error.

    Another problem I'v tested HAP alpha but not work too, file are correctly encoded tested with another solution (demolition hap on store...) with AVPro the movie is streched and not correctly displayed :

    https://screencast.com/t/zmdJmahuQv

    Thanks for help

    Code (Boo):
    1. ffmpeg -i /Users/infostrates_demo_2/Desktop/IMMO2_alpha.mov -vf "split [a], pad=iw*2:ih [b], [a] alphaextract, [b] overlay=w" -y /Users/infostrates_demo_2/Desktop/IMMO2_color.mov.mp4
    2. ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
    3.   built with Apple LLVM version 8.1.0 (clang-802.0.42)
    4.   configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
    5.   libavutil      55. 58.100 / 55. 58.100
    6.   libavcodec     57. 89.100 / 57. 89.100
    7.   libavformat    57. 71.100 / 57. 71.100
    8.   libavdevice    57.  6.100 / 57.  6.100
    9.   libavfilter     6. 82.100 /  6. 82.100
    10.   libavresample   3.  5.  0 /  3.  5.  0
    11.   libswscale      4.  6.100 /  4.  6.100
    12.   libswresample   2.  7.100 /  2.  7.100
    13.   libpostproc    54.  5.100 / 54.  5.100
    14. Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/infostrates_demo_2/Desktop/IMMO2_alpha.mov':
    15.   Metadata:
    16.     major_brand     : qt
    17.     minor_version   : 537199360
    18.     compatible_brands: qt
    19.     creation_time   : 2017-07-25T08:08:51.000000Z
    20.   Duration: 00:00:10.00, start: 0.000000, bitrate: 4890 kb/s
    21.     Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 800x1200, 4883 kb/s, SAR 1:1 DAR 2:3, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)
    22.     Metadata:
    23.       creation_time   : 2017-07-25T08:08:51.000000Z
    24.       handler_name    : Apple Alias Data Handler
    25.       encoder         : H.264
    26.       timecode        : 00:00:00:00
    27.     Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    28.     Metadata:
    29.       creation_time   : 2017-07-25T08:08:59.000000Z
    30.       handler_name    : Apple Alias Data Handler
    31.       timecode        : 00:00:00:00
    32. Stream mapping:
    33.   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    34. Press [q] to stop, [?] for help
    35. [Parsed_alphaextract_2 @ 0x7fe4f6503c00] Requested planes not available.
    36. [Parsed_alphaextract_2 @ 0x7fe4f6503c00] Failed to configure input pad on Parsed_alphaextract_2
    37. Error reinitializing filters!
    38. Failed to inject frame into filter network: Invalid argument
    39. Error while processing the decoded data for stream #0:0
    40. Conversion failed!
     
    Last edited: Jul 25, 2017
    suraj_voxxeltek likes this.
  23. ibompuis

    ibompuis

    Joined:
    Sep 13, 2012
    Posts:
    99
    I'v resolved HAP problem by setting packing none in Media properties
     
    Last edited: Jul 25, 2017
  24. Kingtem

    Kingtem

    Joined:
    Jun 19, 2011
    Posts:
    18
    Problem description:

    I need to embed a video file into the assetbundle,
    so I make the video file as TextAsset, then use mediaPlayer.OpenVideoFromBuffer(movieFile.bytes, false) to load it.
    But the media player told me that "[AVProVideo] Failed to open buffer".


    Device (which devices are you having the issue with - model, OS version number):

    Windows Editor 64bit

    Media (tell us about your videos - number of videos, resolution, codec, frame-rate, example URLs):

    1 file.
    1280 * 1440
    mp4v
    25


    System Information:

    AVPro Video: plugin v1.6.12 scripts v1.6.12
    Target Platform: iOS
    Unity: v5.6.2f1 WindowsEditor
    OS: Desktop - Alienware 17 (Alienware) - Windows 10 (10.0.0) 64bit - English
    CPU: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz - 8 threads - 16311KB
    GPU: Emulated GPU running Metal - Emulated - Metal [emulated] - 4063KB - 4096
     
  25. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    I can't see a reason why it wouldn't be better to join those videos into a single video?
     
  26. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    We're looking into it....Perhaps you could try a lower resolution stream to see if that makes a difference? It seems to handle the lower resolution streams, but when it gets to the one that is 4096 wide it fails...
     
  27. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    Glad to hear you solved it :) Let us know if you have any other problems.

    Thanks,
     
  28. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    Thanks for using the build-in issue reporting system :)

    The OpenVideoFromBuffer() method is not available for iOS I'm afraid. There is currently no way to load a video from AssetBundle on iOS. OpenVideoFromBuffer() currently supports Windows desktop (using DirectShow only), and for UWP we have OpenVideoFromFile(IRandomAccessStream ras...)

    We will look into adding the ability to load from memory in iOS but it might not be possible.

    Thanks,
     
    Kingtem likes this.
  29. zvasconcelos

    zvasconcelos

    Joined:
    Jul 22, 2014
    Posts:
    2
    If I could have smaller pieces of a video running in sequence, I could have a fast decrypt for each one of these videos. Let's consider as if I have a video in a single file with 500mb that is encripted in an user's folder and I will just decrypt it when the user plays the video... it would be slow and the user would have to wait the full decryption proccess before loading the video.

    But if I break the video into smaller pieces, I can fast decrypt each small part and play in sequence even when the user drag the seek to another position. And then decoding the next video in the sequence and encode the previous one.

    I can decrypt a 20mb file in 4 seconds (an OK time to wait), but a 500mb file would be boring.

    And it needs to work offline, that is why a HLS is not an option....
     
    Last edited: Jul 25, 2017
  30. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,844
    @AndrewRH
    Any update on playing video in landscape if game is in fixed portrait orientation?
     
  31. 265lutab

    265lutab

    Joined:
    Sep 15, 2014
    Posts:
    155
    I'm creating an android app that is using AVPro and I need to use an APK Expansion File as my app with the movie is more than 100mb, The movie is not playing when I build using a split binary in unity. Do I need to do something in AVPro to support split binary or point it to the correct location of the video file?
     
    Davonafe likes this.
  32. nwxp

    nwxp

    Joined:
    Apr 4, 2017
    Posts:
    19
    Hello,

    I'm using your plugin for 2 month now and I have to say it's wonderful, it never stop to amaze me.
    But now that ambisonic and spatialized song are coming to Facebook and Youtube, I think it would be a great addition.

    Do you have an ETA or any idea if and when if will be available ?
    From 2 days of research I have found nothing on earth that can play 360 video with ambisonic sound. I think it would give an excellent reason to buy your plugin.

    Thank again for you excellent job,
    Nicolas Léotier
     
  33. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    We're actively working on adding this, hopefully it will be available in a version or two. Thanks,
     
    Davonafe likes this.
  34. IEOPC1

    IEOPC1

    Joined:
    Jan 31, 2017
    Posts:
    13
    Hello,

    I am developing for Android and using the following code to open a video file:

    Code (CSharp):
    1. mediaPlayer.OpenVideoFromFile (MediaPlayer.FileLocation.RelativeToStreamingAssetsFolder, mediaFile, true);
    However, even though this works during runtime in the editor it does not appear to work on an Android device. If I check the "Override Path" under Android settings it works; but I need to change the video file during runtime.

    How do I execute the above code while considering the Android path during runtime?

    Thanks
     
  35. lXg_99

    lXg_99

    Joined:
    Dec 15, 2015
    Posts:
    12
    Thanks for the reply,

    The demo scenes switch while the player is active, this is a different scenario from mine..I am entering and leaving the "players", different settings for different media (VR Equi Full Sphere, Flat Screen in an environment, cubic media..), just like you would by loading it as it's own scene. Due to very long loading times i went for the "Set Active"-Approach which is generally nice and snappy. I only use one MediaPlayer instance which is being fed by different control scripts. The MediaPlayer sits in the root of the project and is not a part of the SetActive switching. Every environment has it's own ApplyToMesh of course.
    Because it's an ongoing, older project, i am a bit reluctant to update stuff in there but i will of course try with the latest version. I am not using OES.

    But in general i'd like to understand where this last frame is stored. I tried to force load a short piece of black video after unloading the original clip but this led to some irrational behavior and i quickly skipped it again. I'd more like to understand why and how this happens to maybe directly address it.
     
  36. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,844
    @AndrewRH
    Today when i tried to work on an existing project which uses AVPro, it doesnt raise any video started, first frame ready etc events? Which is a show stopper for me as i show a loading screen and hide it when i get video started event.
    What could be the reason that it just stopped working?
     
  37. hema_dubal

    hema_dubal

    Joined:
    Oct 27, 2016
    Posts:
    6
    @AndrewRH
    I am currently working on a very urgent VR project and I am stuck with one issue. I would really appreciate it if you are able to help me with it.

    I am creating a Gear VR app in which I have to display a video on a sphere. Currently I m using the trail version of AV Pro. I do not wish to put the video in the Streaming Assets folder for Security reasons. I would like it to be placed at Assets/Videos. Now placing it there, and with OES selected on, the video doesn't appear in android build. I read the documentation which said that I will need to create a build outside unity and copy the video manually. These instructions are quite vague. I exported the project to Android studio. But I am totally unsure where to put the video and how to set its reference. Please help me with this. I use Unity 5.6.0p4.

    Hoping to hear back from you soon. Thanks in advance :)
     
  38. hema_dubal

    hema_dubal

    Joined:
    Oct 27, 2016
    Posts:
    6
    Hey, did you find a workaround for this problem yet? I am facing the same issue.
     
  39. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    422
    Couple of naive questions from a prospective customer, hope you don't mind...

    What advantages are there to using AVPro Video over EasyMovie Texture? It seems to be your main competitor but much cheaper.

    Secondly, with the new Video Player component introduced in Unity 5.6, how long will this asset continue to be useful? What does it do that the new player can't handle?
     
  40. Tom-Goethals

    Tom-Goethals

    Joined:
    Mar 6, 2015
    Posts:
    102
    I've quickly tested 2017.1.0p2 for OES rendering, It's different from before, no more pink but black. :-(

    Arround the time the video starts i get this in the debug log.

    Assertion failed: <i>AndroidPlayer(samsung_SM-G920F@172.22.10.176)</i> OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_ENUM: enum argument out of range
    (Filename: ./Runtime/GfxDevice/opengles/GfxDeviceGLES.cpp Line: 370)
     
  41. Xuejia

    Xuejia

    Joined:
    Aug 2, 2017
    Posts:
    7
    Hi,i am using your Unity package and there is a problem confusing me.A video whose dimension is 1920*540(The potPlayer told me) but your package told me it's 960*540(Show on your Debug GUI) and another video whose dimension is alse 1920*540 but on the Debug GUI it is 1020*1080.I think this cause the wrong resolution of the texture.How can i solve this issue?
    i am using the Unity 5.6.0
    upload_2017-8-2_11-16-53.png
    upload_2017-8-2_11-17-38.png
     
    Last edited: Aug 2, 2017
  42. dmunsigned

    dmunsigned

    Joined:
    Jul 3, 2016
    Posts:
    2
    Hello, I have an issue playing 360 videos in Unity 2017.1

    Problem description:

    EntryPointNotFoundException: GetRenderEventFunc_WaitForNewFrame
    RenderHeads.Media.AVProVideo.WindowsMediaPlayer.InitialisePlatform () (at Assets/AVProVideo/Scripts/Internal/WindowsMediaPlayer.cs:91)
    RenderHeads.Media.AVProVideo.MediaPlayer.CreatePlatformMediaPlayer () (at Assets/AVProVideo/Scripts/Components/MediaPlayer.cs:1286)
    RenderHeads.Media.AVProVideo.MediaPlayer.Initialise () (at Assets/AVProVideo/Scripts/Components/MediaPlayer.cs:379)
    RenderHeads.Media.AVProVideo.MediaPlayer.Start () (at Assets/AVProVideo/Scripts/Components/MediaPlayer.cs:423)

    Also get an error when importing package copying file to /Plugins/x86_64/AVProVideo.dll

    System Information:

    AVPro Video: plugin v1.6.0 scripts v1.6.12
    Target Platform: Android
    Unity: v2017.1.0f3 WindowsEditor
    OS: Desktop - Windows 7 Service Pack 1 (6.1.7601) 64bit - English
    CPU: Intel(R) Core(TM) i7-5930K CPU @ 3.50GHz - 12 threads - 32693KB
    GPU: Emulated GPU running OpenGL ES 3.0 - Emulated - OpenGL ES 3.0 [emulated] - 4009KB - 4096
     
  43. Tom-Goethals

    Tom-Goethals

    Joined:
    Mar 6, 2015
    Posts:
    102
    Feel like i'm missing an event for when the Control.Stop() or Pause() functions are called. Would like an event inside the events handler.
     
  44. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    I think the plugin didn't update properly to the new version (see plugin version is 1.6.0 and script is 1.6.12, they should be the same). Sometimes this can happen if you try to upgrade with the plugin already run (causing the DLL native plugin file to become locked by Unity).

    You should try upgrading to that latest version again following these steps:
    1) Close all Unity instances
    2) Open a new instance of Unity
    3) Without clicking on any GameObjects or running the scene, import the unitypackage

    Please let me know if it still doesn't work.
     
  45. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    Okay I see. Well, this is quite far beyond the scope of our plugin and is very specific to your own needs. This is a customisation that should be possible via scripting though.

    Thanks,
     
  46. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    Hi JohnGate,

    Are you using our uGUI component for display? If the video is landscape it will play in landscape mode, even if the screen is in portrait orientation. If this isn't working for you please send us a reproductible case, including your AVPro Video version number and Unity version.

    Thanks,
     
  47. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    Hi,
    The split binary option in Unity we've actually found to be quite buggy. It seems to sometimes return a path to the APK instead of the OBB file when using Application.StreamingAssetsPath which we do to resolve the location of the video files.
    We found that it works better using newer versions of Unity (like 5.6.1), and requires you to make each app build with a new version number and to a new APK file.
    If it doesn't work for you then may I recommend instead hosting your videos in the cloud and downloading them in your app to the persistent data folder. We've seen a number of projects work this way and it seems to work a lot better than the split application binary option in Unity.

    Thanks,
     
  48. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    Thanks for the kind words. We're working on ambisonics now, but we don't yet have a timeline we can announce. Hopefully more information soon :) Thanks,
     
  49. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    Hi, you're right - this isn't ideal!

    If you're overriding the Android path, then you need to set this value before you open the video, eg:

    MediaPlayer mp;

    Code (CSharp):
    1.  
    2. mediaPlayer.OptionsAndroid.location = MediaPlayer.FileLocation.RelativeToStreamingAssetsFolder;
    3. mediaPlayer.OptionsAndroid.path = mediaFile;
    4. mediaPlayer.OpenVideoFromFile (MediaPlayer.FileLocation.RelativeToStreamingAssetsFolder, mediaFile, true);
    We'll make sure to improve this API.

    Thanks,
     
  50. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,805
    If you call:

    applyToMesh.Player = null;

    It should then show whatever texture is in the Default Texture slot of the ApplyToMesh component.

    When a MediaPlayer doesn't yet have the video loaded, it returns "null" texture, so there is nothing to display in between video loads. No last frame is stored by the MediaPlayer, so it is up to you to make a copy of the last frame (eg via Graphics.Blit to another RenderTexture) if you wish to hold it on screen.

    I hope that helps.

    Thanks,