Search Unity

[Released] AVPro Video - complete video playback solution

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

  1. rolliefingez

    rolliefingez

    Joined:
    Apr 4, 2013
    Posts:
    23
    thanks for the reply I increased and there is no ill effects that I can see. Just one other thing Im currently testing on a gearVR and when I hit the touch button while viewing a video it adjusts the view (snaps) does anyone else have this and is there a way to disable?

    Thanks
     
  2. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    I believe that is a feature of the GeaVR to recenter the view? I don't know of a way to disable it...
     
  3. rolliefingez

    rolliefingez

    Joined:
    Apr 4, 2013
    Posts:
    23
    I found it! I thought that too but its actually in the sphere demo cs
     
    AndrewRH likes this.
  4. CastryGames

    CastryGames

    Joined:
    Oct 1, 2014
    Posts:
    77
    please help, I use your avprovideo Android plugin and this error occurs to me, it does not expand completely

     
  5. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi Luba,

    I haven't seen this sort of issue before. Could you please give us more information to work with? For example:

    1) Which version of AVPro Video? (the latest is 1.8.7)
    2) Unity version?
    3) Which component are you using to display the video? (eg ApplyToMesh, DisplayIMGUI etc)
    4) What is the format of your video?
    5) What Android device and version are you deploying to?
    6) Are you using the OES Path for Android? (its an option in MediaPlayer > Platform Specific > Android)
    7) Are you using the MediaPlayer or ExoPlayer video API for Android? (its an option in MediaPlayer > Platform Specific > Android)

    Thanks,
     
  6. aronfels

    aronfels

    Joined:
    Feb 5, 2014
    Posts:
    1
    For a VR experience I'm working on I'm trying to use the "FinishedPlaying" event to start an animator in the scene + disabling the 360 sphere with the AVPro video (along with some other functions).

    While playing the experience in the editor everything runs fine, however when i build my project the video sphere keeps showing the first frame of the video when its finished playing and doesn't disable the sphere.
    All the other scripts keep running because if i wait long enough for the animator to finish it loads the next scene.

    My C# skills aren't the best so i have no idea if i did something wrong in my code. I used the SimpleController.cs script as a reference.

    My code:
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using RenderHeads.Media.AVProVideo;
    5.  
    6. namespace RenderHeads.Media.AVProVideo.Demos
    7. {
    8. public class VideoIsFinished : MonoBehaviour {
    9.  
    10.     public MediaPlayer player;
    11.     private MovieControllerHorse horsestarter;
    12.     public GameObject VRvideo;
    13.  
    14.     private void Start()
    15.     {
    16.         player.Events.AddListener(OnMediaPlayerEvent);
    17.         horsestarter=(MovieControllerHorse)GameObject.Find("Horse(L)").GetComponent(typeof(MovieControllerHorse));
    18.  
    19.     }
    20.  
    21.         public void OnMediaPlayerEvent(MediaPlayer player, MediaPlayerEvent.EventType et, ErrorCode errorCode)
    22.     {
    23.             switch (et) {
    24.             case MediaPlayerEvent.EventType.FinishedPlaying:
    25.                 horsestarter.OnMovieFinished ();
    26.                 Finished ();
    27.                 break;
    28.             }
    29.     }
    30.    
    31.  
    32.         void Finished(){
    33.             Destroy (VRvideo);
    34.         }
    35. }
    36. }
    37.  
     
  7. ibps13

    ibps13

    Joined:
    Oct 6, 2012
    Posts:
    113
    Hi,

    I use AVProMovieCapture last version with unity 2017.4.2f2 on windows 10
    I instanciate a prefab with AVProMovieCapture component on it
    When I instantiate the first time, videocapture works fine, but when I destroy prefab and instanciate again, I have this error:

    Code (CSharp):
    1. [AVProMovieCapture] Failed to create recorder
    2. UnityEngine.Debug:LogError(Object)
    3. RenderHeads.Media.AVProMovieCapture.CaptureBase:PrepareCapture() (at Assets/Plugins/RenderHeads/AVProMovieCapture/Scripts/Internal/CaptureBase.cs:1019)
    4. RenderHeads.Media.AVProMovieCapture.CaptureFromScreen:PrepareCapture() (at Assets/Plugins/RenderHeads/AVProMovieCapture/Scripts/Components/CaptureFromScreen.cs:56)
    5. RenderHeads.Media.AVProMovieCapture.CaptureBase:StartCapture() (at Assets/Plugins/RenderHeads/AVProMovieCapture/Scripts/Internal/CaptureBase.cs:1051)
    6. RenderHeads.Media.AVProMovieCapture.CaptureBase:Start() (at Assets/Plugins/RenderHeads/AVProMovieCapture/Scripts/Internal/CaptureBase.cs:356)
    Thanks for help !

    Setup: https://screencast.com/t/THFm3SIH5Gij
     
    Last edited: May 29, 2018
  8. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi Ilan,

    Thanks for getting in touch and for reporting this issue. We will investigate this tomorrow and get back to you.

    Could you show me the code you're using for the instantiation and destroy?

    Also, which version of AVPro Movie Capture are you using?

    Thanks,
     
  9. ibps13

    ibps13

    Joined:
    Oct 6, 2012
    Posts:
    113
    Hi Andrew,

    I use the last assets store version of AVProMovieCapture.

    for instantiate AVProMovieCapture component:
    Code (CSharp):
    1. _mainCameraRegister = (GameObject)Instantiate(Resources.Load("MainCameraRegister"));
    Complete Class:



    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using RenderHeads.Media.AVProMovieCapture;
    5. using RenderHeads.Media.AVProLiveCamera;
    6. using RenderHeads.Media.AVProVideo;
    7. using DG.Tweening;
    8.  
    9. public class VideosController : MonoBehaviour
    10. {
    11.     private StatesManager statesManager;
    12.     private GameObject mainCam;
    13.     public GameObject[] mediaplayers;
    14.     public CanvasGroup canvas;
    15.     public GameObject aVProVideouGUI;
    16.     public GameObject aVProMediaPlayer;
    17.     public GameObject aVProComponent;
    18.     GameObject _mainCameraRegister;
    19.     string tmp;
    20.    
    21.     void OnEnable()
    22.     {
    23.         statesManager = GameObject.Find("StatesManager").GetComponent<StatesManager>();
    24.         mainCam = GameObject.Find("MainCamera");
    25.        
    26.         canvas.alpha = 1f;
    27.         aVProVideouGUI.SetActive(true);
    28.         aVProMediaPlayer.SetActive(true);
    29.     }
    30.    
    31.     void Awake()
    32.     {
    33.         tmp = GetSetData.instance._videoName;
    34.         StartCoroutine(Init());
    35.     }
    36.    
    37.     IEnumerator Init()
    38.     {
    39.         yield return new WaitForSeconds(0.2f);
    40.         aVProMediaPlayer.GetComponent<MediaPlayer>().Control.Rewind();
    41.         aVProMediaPlayer.GetComponent<MediaPlayer>().Control.Play();
    42.        
    43.         switch (tmp)
    44.         {
    45.         case"01":
    46.             mediaplayers[0].SetActive(true);
    47.             break;
    48.         case"02":
    49.             mediaplayers[1].SetActive(true);
    50.             break;
    51.         case"03":
    52.             mediaplayers[2].SetActive(true);
    53.             break;
    54.         case"04":
    55.             mediaplayers[3].SetActive(true);
    56.             break;
    57.         }
    58.         if(statesManager != null)
    59.             statesManager.uIStates.SetActive(false);
    60.            
    61.         yield return new WaitForSeconds(4f);
    62.         DOTween.To(x => canvas.alpha = x, 1, 0, 0.5f);
    63.         aVProVideouGUI.SetActive(false);
    64.         aVProMediaPlayer.SetActive(false);
    65.         aVProComponent.SetActive(true);
    66.        
    67.         _mainCameraRegister = (GameObject)Instantiate(Resources.Load("MainCameraRegister"));
    68.         mainCam.SetActive(false);
    69.     }
    70.    
    71.     IEnumerator OnRecordFinished ()
    72.     {
    73.         yield return new WaitForSeconds(20f);
    74.         foreach (var item in mediaplayers)
    75.         {
    76.             if(item.activeInHierarchy)
    77.             {
    78.                 if(item.GetComponent<MediaPlayer>().Control.IsPlaying())
    79.                     item.GetComponent<MediaPlayer>().Control.Stop();
    80.             }
    81.         }
    82.        
    83.         _mainCameraRegister.GetComponent<CaptureFromScreen>().OnDestroy();
    84.         Destroy(_mainCameraRegister);
    85.        
    86.         if(mainCam != null)
    87.             mainCam.SetActive(true);
    88.  
    89.         statesManager.uIStates.SetActive(true);
    90.         statesManager.Init_State("MenuVideoChoose");
    91.         Destroy(this.gameObject);
    92.     }
    93.    
    94.     IEnumerator ScreenShotCountDown()
    95.     {
    96.         yield return new WaitForSeconds(8f);
    97.         _mainCameraRegister.GetComponent<ScreenShotManager>().MakeScreenShot();
    98.     }
    99.    
    100.     // Callback function to handle events
    101.     public void OnMediaPlayerEvent(MediaPlayer mp, MediaPlayerEvent.EventType et, ErrorCode errorCode)
    102.     {
    103.         switch (et)
    104.         {
    105.         case MediaPlayerEvent.EventType.ReadyToPlay:
    106.             switch (tmp)
    107.             {
    108.             case"01":
    109.                 mediaplayers[0].GetComponent<MediaPlayer>().Control.Rewind();
    110.                 mediaplayers[0].GetComponent<MediaPlayer>().Control.Play();
    111.                 break;
    112.             case"02":
    113.                 mediaplayers[1].GetComponent<MediaPlayer>().Control.Rewind();
    114.                 mediaplayers[1].GetComponent<MediaPlayer>().Control.Play();
    115.                 break;
    116.             case"03":
    117.                 mediaplayers[2].GetComponent<MediaPlayer>().Control.Rewind();
    118.                 mediaplayers[2].GetComponent<MediaPlayer>().Control.Play();
    119.                 break;
    120.             case"04":
    121.                 mediaplayers[3].GetComponent<MediaPlayer>().Control.Rewind();
    122.                 mediaplayers[3].GetComponent<MediaPlayer>().Control.Play();
    123.                 break;
    124.             }
    125.             break;
    126.         case MediaPlayerEvent.EventType.Started:
    127.             StartCoroutine(OnRecordFinished());
    128.             StartCoroutine(ScreenShotCountDown());
    129.             break;
    130.         case MediaPlayerEvent.EventType.FirstFrameReady:
    131.             break;
    132.         case MediaPlayerEvent.EventType.MetaDataReady:
    133.             break;
    134.         case MediaPlayerEvent.EventType.FinishedPlaying:
    135.             break;
    136.         }
    137.     }
    138. }
    139.  
    Thanks
     
  10. philipd

    philipd

    Joined:
    Apr 15, 2016
    Posts:
    7
    Hi

    This is a general question about playing large files on Android. Now I'm aware that the StreamingAssets folder can't be read in the same way which limits the video size you can have. I've been trying to find a work around for this. The closes I've got is creating a HTTP server of the Streamingassets folder and then reading the file from that. When I say the furthest I've got the truth is I've not managed to get it to work. But it seemed have the most promise. The advice I found was from here:
    https://stackoverflow.com/questions/45580717/playing-large-video-files-in-gear-vr-in-unity-project

    I was hoping that someone here might have a better understanding of this than me and be able to help, maybe by just pushing me in the right direction. Oculus now has a larger file limit to their store and would really like to take advantage of it.

    Any advice would be gratefully received.

    Regards

    Phil
     
  11. ibps13

    ibps13

    Joined:
    Oct 6, 2012
    Posts:
    113
    Hi,
    I'v created GearVR app with large video (> 1go) etc... the better way and working, is to use vimeo for streaming and manage download via AWS with h265 for user want download content...
    The downloaded content are in persistentdatapath and works very well (S6 - S7 - S8 tested)
     
  12. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    I've attached here a new version of the CaptureBase.cs file - just copy this over the old one. I think it will fix the issue for you. If it does then we will include this fix in the next version of the plugin.

    Thanks,
     

    Attached Files:

  13. ibps13

    ibps13

    Joined:
    Oct 6, 2012
    Posts:
    113
    Hey Andrew,

    As I said in my email, not work too:

    Code (CSharp):
    1. [AVProMovieCapture] Failed to create recorder
    2. UnityEngine.Debug:LogError(Object)
    3. RenderHeads.Media.AVProMovieCapture.CaptureBase:PrepareCapture() (at Assets/Plugins/RenderHeads/AVProMovieCapture/Scripts/Internal/CaptureBase.cs:1032)
    4. RenderHeads.Media.AVProMovieCapture.CaptureFromScreen:PrepareCapture() (at Assets/Plugins/RenderHeads/AVProMovieCapture/Scripts/Components/CaptureFromScreen.cs:56)
    5. RenderHeads.Media.AVProMovieCapture.CaptureBase:StartCapture() (at Assets/Plugins/RenderHeads/AVProMovieCapture/Scripts/Internal/CaptureBase.cs:1064)
    6. RenderHeads.Media.AVProMovieCapture.CaptureBase:Start() (at Assets/Plugins/RenderHeads/AVProMovieCapture/Scripts/Internal/CaptureBase.cs:366)
     
  14. robotpapier

    robotpapier

    Joined:
    Mar 10, 2015
    Posts:
    2
    Hi,
    can someone tell me where we can get support?
    I encounter a bug when trying to diplay video on a plane using a tranparent material as in the demo.
    Some of my video displays correctly but others don't display at all.
    I have to reload the matrial in the plane so I can see my video.... :/

    Working on unity 2018.1.0f2 / win10 64bits / geforce gtx 950

    thanks!
     
  15. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    You can get support here, or at http://www.renderheads.com/contact :)

    Which version of AVPro Video are you using?
    Perhaps you could send us more information about what is happening?

    Thanks,
     
  16. Idlepenguin

    Idlepenguin

    Joined:
    Jan 27, 2013
    Posts:
    2
    Hey Guys,

    I'm mid way through developing a VR Video app for iOS and Android and your plugin has helped make the entire process far easier. I was using the unity video player until recently. I do have one question however;

    I was using VP8 2048x1024 videos for iPhone 5 with the default player and I was managing to get (Albeit it quite choppy and inconsistent) it working on the system. Your plugin has improved the choppiness and other issues across every other platform marvelously, but I was somewhat disheartened to see AVPro doesn't support VP8 on iOS devices.

    I'm not asking that you to suddenly add support for this format, but I just wanted to ask why VP8 hasn't been supported on iOS? The performance difference between h264 and VP8 on older iOS devices is seemed fairly drastic when I originally used the codec.

    Also if you have any additional advice (Besides whats already in the manual) for optimizing h264 to get a higher res then 1920x1080 I'd appreciate it. Though using that res on such a tiny screen isn't really that big of a deal and honestly VR on an iPhone 5 is just silly. But the better I can make it the happier the client

    Thanks :)
     
  17. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes..very large files can be a problem. I would really recommend downloading the large files while the app is running to the persistentData folder. You can make a download script that can resume download in case it stops.. It's no different than bundling it with the app because they will have to download that data at some point anyway...
    I guess you could also have the option to stream it directly from the server during playback - if they have a fast enough connection.

    Thanks,
     
  18. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Just a note here that we solved this issue via email. It turned out to be a bug in VideoPlayer and was solved by using the VideoPlayer transcode option instead of playing the native webm files.

    Thanks,
     
  19. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Just a note that we solved this issue via email. Thanks,
     
    ibps13 likes this.
  20. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    We generally prefer to support formats that have hardware decoding ability. iOS doesn't support decoding VP8 on hardware. This means we would have to decode it on the CPU which would be very slow, so for us it was not work implementing. We recommend H.265 or H.264 in general, as they both have great hardware decoding support on all platforms.

    Yes the iPhone 5 runs at 1136 x 640 pixels so I don't see the point in playing high resolution videos unless you're doing VR. The device is very old though so it's not really suitable for VR. According to Apples technical notes, the device can only do a maximum of 1920x1080 for H.264 decoding and doesn't support H.265 (only iPhone 7 and above using iOS 11).

    https://support.apple.com/kb/sp655?locale=en_US
    "Video formats supported: H.264 video up to 1080p, 30 frames per second, High Profile level 4.1"

    That said, we have in the past found that some of these specs aren't accurate and that they do support higher resolutions if you're careful.

    You might be able to get 2048x1080 for example, or 2880x1440.. The key thing is to keep the bitrate as low as possible. These devices only have limited decode capabilities and if the bitrate of the video is too high they will not be able to decode. Another possible option could be to use 180 videos instead as this will automatically give you double the resolution...

    Thanks,
     
  21. Lou12331

    Lou12331

    Joined:
    Mar 30, 2017
    Posts:
    2
    Hi, I have some issues here.
    I want to make a VR app that playback 4K video to play forward or backward.
    if I adjust the value of "playback rate" to "-1" (which is how you do the reverse playback according the manual), it will heavily influence and drops my video framerate significantly. Since using the playback rate to change the playback backwards in not practical in this case. Therefore, I made two videos, one plays normally and the other one plays backwards with the -1 playback rate setting so I can switch them out with MediaPlayer.Control.Seek function. But when I call out MediaPlayer.Control.Seek function, I discovered it does not work on android platform.

    My question is, does the function MediaPlayer.Control.Seek supported in Android platform and is there any alternative for video to play backwards.

    BTW we are using
    Unity 2017.2.2p2
    AVPro Video (Android) 1.8.7
     
  22. philipd

    philipd

    Joined:
    Apr 15, 2016
    Posts:
    7
    Thanks for the reply.

    We have a few options now. one is to split the video into chapters which seems to offer about 800mb per file. Still playing around to see what works best. Downloading is an option but we would prefer not to host it.

    I do have another problem. I'm working with video with 12 audio tracks in it. I want to swap between the track on the Android device. This seems to work ok on the PC but when built to Android it struggles. The first one you switch too kind of mucks up the video for a while. Then after that it seems random whether it will change to another audio track or not.
    I'm muxing and converting the audio in ffmpeg, here's the code:

    "Q:\Resources\NSC Creative Tools\Bat Scripts\Video Makers\Tool\Programs\ffmpeg.exe" -i "Z:\Projects\2018\WASGO\Audio\master\stereo\WAS No tracks.mp4"^
    -i "Z:\Projects\2018\WASGO\Audio\master\stereo\English.wav"^
    -i "Z:\Projects\2018\WASGO\Audio\master\stereo\French.wav"^
    -i "Z:\Projects\2018\WASGO\Audio\master\stereo\Spanish.wav"^
    -i "Z:\Projects\2018\WASGO\Audio\master\stereo\Flemish.wav"^
    -i "Z:\Projects\2018\WASGO\Audio\master\stereo\Korean.wav"^
    -i "Z:\Projects\2018\WASGO\Audio\master\stereo\Cantonese.wav"^
    -i "Z:\Projects\2018\WASGO\Audio\master\stereo\Japanese.wav"^
    -i "Z:\Projects\2018\WASGO\Audio\master\stereo\Latin_Spanish.wav"^
    -i "Z:\Projects\2018\WASGO\Audio\master\stereo\Mandarin.wav"^
    -i "Z:\Projects\2018\WASGO\Audio\master\stereo\Ukrainian.wav"^
    -i "Z:\Projects\2018\WASGO\Audio\master\stereo\German.wav"^
    -i "Z:\Projects\2018\WASGO\Audio\master\stereo\Russian.wav"^
    -c:v copy -map 0:0^
    -map 1^
    -map 2^
    -map 3^
    -map 4^
    -map 5^
    -map 6^
    -map 7^
    -map 8^
    -map 9^
    -map 10^
    -map 11^
    -map 12^
    -disposition:a:0 default^
    -acodec mp3 -ac 2 -ab 160k -ar 44100 -strict -2^
    "WAS.mp4"

    Is there anything that would make this better. A different codec maybe?

    Thanks for your help, it's much appricated.

    Phil (NSC Creative)
     
  23. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Maybe try using AAC instead of MP3?

    Also, try using the ExoPlayer API instead of the MediaPlayer one?

    Let me know how these work for you.
     
  24. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes, most videos are encoded for optimal forward playback only, so backwards playback doesn't work well with them. You need to encode videos with ideally only keyframes (no P or B frames) to get good results with reverse playback.
    Another option could be to create a second video that is encoded backwards (all the frames are in backwards order), and then when your users need to go backwards it switches to this video, which actually still plays forward but looks backwards...But on platforms like Android where resources are limited this approach might not be useful. So it might just be better to encode the video with all key-frames and have a single video.

    Android should be able to seek. There are a few different supported features:

    1) Android using the MediaPlayer API before version Android API 26 can only seek to the closest keyframe
    2) Android using the MediaPlayer API after version Android API 26 can seek to closest keyframe (SeekFast()) or to the exact frame
    3) Android using the ExoPlayer API can only seek to the exact frame

    You can switch which API use using on the MediaPlayer component in the Platform Specific > Android section.

    I hope this helps you.
    Thanks,
     
  25. GCCooper

    GCCooper

    Joined:
    Apr 25, 2018
    Posts:
    19
    Are there any plans to allow loading still images? It wouldn't be too hard to do this myself but it would be nice if this was a one-stop-shop media player. I'm mostly thinking about using it to view stereo 180 and 360 images.
     
  26. rolliefingez

    rolliefingez

    Joined:
    Apr 4, 2013
    Posts:
    23
    Hi guys, is here best for support or the email address?
     
  27. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Either is good :) See http://www.renderheads.com/contact/ for our Unity Support email address.

    Thanks,
     
  28. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Do you mean just PNG and JPG or exotic formats?

    We've had basic image support on our long term roadmap for quite a while, but it's not a high priority for us, and not many people have requested it....
     
  29. rolliefingez

    rolliefingez

    Joined:
    Apr 4, 2013
    Posts:
    23
    Thanks
    Thanks Ive re-emailed my query, it may have been missed.
     
  30. pvr_akeybl

    pvr_akeybl

    Joined:
    Jan 19, 2018
    Posts:
    1
  31. risto_aa

    risto_aa

    Joined:
    Apr 3, 2018
    Posts:
    12
    Hi folks,
    I am in a pretty tight spot with schedules, so I'm asking a little scripting advice. I have a GearVR project with main menu set up with Play Video and Exit App options and they work fine. All I need for this project to be finished is the short esc press that would return from video to this main menu. Simple script, I am sure, but I am just a simple artist :)

    Thanks in advance.

    Edit.

    Addition, that after the video is finished it would return to the main menu..

    Edit2.

    Scratch this one. Solved. :)

    Edit3.

    Just FYI, there is a bug in the OVR version 1.24 in the GearVR back button handling. Update to the latest and you're good to go.
    Here's instruction how to update:
    https://forums.oculusvr.com/developer/discussion/63273/gear-vr-back-button-to-confirm-quit-menu
     
    Last edited: Jun 13, 2018
  32. eovento

    eovento

    Joined:
    Feb 22, 2018
    Posts:
    38
    We are very interested in this Asset. For our project, we need to render 3840x3840 Sterescopic videos that use 265 HEVC, AAC codecs. We've been trying all possible tools and it never runs smoothly on Editor and when built it just give us a solid black screen. Do you think your assets would save us? ;)
     
  33. risto_aa

    risto_aa

    Joined:
    Apr 3, 2018
    Posts:
    12
    This works like a charm. I suppose I went trough all the steps you are going. AVPro simply does the job. Amazing and worth every cent.
     
    AndrewRH likes this.
  34. OwlBoy-

    OwlBoy-

    Joined:
    Dec 11, 2015
    Posts:
    24
    Hello!

    I ran across a comment in here mentioning someone had AC3 audio going to separate Unity Audio Sources. (But then they mentioned it was broken by an AVPro update).

    Can anyone advise me on the feasibility of using AVPro to send all 6 channels of an AC3 5.1 audio file to discrete Unity Audio Sources? I currently can't get it to work in Unity 5.6.3p1. Stereo works (Left and Right) but not the other channels.

    Reference:
     
    Last edited: Jun 13, 2018
  35. GCCooper

    GCCooper

    Joined:
    Apr 25, 2018
    Posts:
    19
    I'm only requesting JPEG and PNG for now, but exotic formats would be welcome at some point :)
     
  36. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Okay cool - well we'll see what we can do :) Maybe in a couple of versions.
     
  37. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hmm... Do you have your Windows audio configured to 5.1? I think you need to do this....

    We have written a system to grab audio and send it to audio sources - The AudioOutput component and you need to set the MediaPlayer > Platform Specific > Windows audio setting to Unity. It should work in theory, but there are so many formats and configurations out there that it's hard to test everything.

    If you're still having trouble please send us your video with the AC3 5.1 audio and we'll take a look.

    Thanks,
     
  38. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yup it should work just fine. There is a free trial version you can download - so maybe give that a try first.

    Let me know if you run into any issues.

    Thanks,
     
  39. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Glad you managed to solve your issue :) Not bad for "just a simple artist" :)
     
  40. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    No we don't include that extension. You can see the extensions we include - they're in the Plugins/Android folder. I'm not sure actually how the extension loading works - whether you can just copy them in there or whether we need to build with them. This isn't something we've looked at before...

    Also - we're about to release a new version of AVPro Video which will be upgraded to the latest ExoPlayer version (2.8.1)

    And no - we don't modify ExoPlayer code base.

    Thanks,
     
    pvr_akeybl likes this.
  41. IsaGDC

    IsaGDC

    Joined:
    Jan 8, 2017
    Posts:
    6
    HI @AndrewRH,

    I am Isabel García and I have written you two emails with some doubts about displaying 3D 360 videos but the further I get, the more confused I am. To let you know, we are using Oculus Rift for watching them.
    First of all, I have downloaded two 360 3D videos from the following webpage: http://photocreations.ca/3D/ Specifically, the ones with the highest resolutions.
    When displaying using Unity 5.6.5 and AvPro Video 1.8.7 and following the steps in the documentation (360 Sphere, InsideSphere Unlit, and Stereo Packing Top Bottom...) we find some problems with the video. It swithches between Left and Right eye when we move the headset to left and to the right. We are not able to see both eyes at the same time. Moreover, thanks to the Debug Eye Tint, we are sure that sometimes we see just Left eye (green) and others, Right eye (pink).
    Furthermore, we have also tested erasing the metadata from the video, as it is explained in the documentation FAQ #8 but without success.
    Can you help us with this? Could you please send or provide some Unity Example displaying a 3D 360 Video?
    Thank you very much in advance,
    Best regards,
    Isa.
     

    Attached Files:

    Last edited: Jun 14, 2018
  42. SpingDeveloper

    SpingDeveloper

    Joined:
    Nov 21, 2017
    Posts:
    13
    Hi we've been using the AVPro plugin for some time and we really love it! We are now in the middle of adding translations to our project and i'd like to now what's the easiest way to switch audiotracks via the AVPro at runtime? I saw that the baseplayer has an option to set the audiotrack but how do I reach that since I only got the mediaplayer object?

    Is it also possible to load in an mp3 file as seperate audio and use the audiooutput prefab to play the audio (while muting the video audio)?
     
  43. muldercnc

    muldercnc

    Joined:
    Jun 22, 2013
    Posts:
    15
    Hi - I am using your plugin for an application where I am providing the built IOS project wrapped as a framework. This has worked successfully in the past, but since adding the AVPro plugin, I can build a working Unity app, but can't get my Framework target to compile. I get the following Error:

    Undefined symbols for architecture arm64:
    "_UnityEndCurrentMTLCommandEncoder", referenced from:
    _AVPPluginUnityRegisterRenderingPlugin in libAVProVideoiOS.a(AVProPlugin.o)

    I believe that the UnityEndCurrentMTLCommandEncoder function does not exist anymore, and from what i see in the code I don't think this call would be required except for legacy versions of Unity. So maybe this is a quirk bought on since I am compiling a Framework. If you have any idea as to what might help me solve the issue i would appreciate it. Even if its possible to pay you to compile a version of libAVProVideoiOS.a that doesn't have that issue when converting a Unity project to a Framework?

    I am using Unity 2018.1.0f1 currently
     
  44. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
    Sorry to pile on the requests, but is there any way to fetch the audio and video codecs in the src file?

    I need to check to see if 2 files use the equivalent codec's.
     
  45. muldercnc

    muldercnc

    Joined:
    Jun 22, 2013
    Posts:
    15
    I solved this problem by just defining a "UnityEndCurrentMTLCommandEncoder" function with empty body. Seems to have solved my issue. I expect it never gets called, but the linker was throwing a problem since it couldn't find a definition.
     
  46. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Thanks for reporting this. We have replicated this error. It seems that in Unity 2018.1 they changed some interfaces. We will be releasing AVPro Video 1.8.8 with a fix for this shortly.

    Thanks,
     
  47. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes our fix is similar :) Thanks!
     
  48. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    For the record, this was solved via email support
     
  49. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yes you can switch audio tracks in the script, here is some pseudocode:

    public MediaPlayer _mp;

    public void SwitchTrack()
    {
    int trackCount = _mp.Info.GetAudioTrackCount();
    _mp.Control.SetAudioTrack(1);
    int trackIndex = _mp.Control.GetCurrentAudioTrack();
    }

    As for loading an mp3 - this might be possible on some platforms...But the AudioOutput prefab is only supported on Windows... Besides you shouldn't need the AudioOutput prefab to do this , as you would just need to play the audio.... But having the audio tracks embedded in the video should work a lot easier.

    I hope this helps you.

    Thanks,
     
  50. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    This is currently not possible. You would need to parse the video file to find the codec information. We may add a helper class to do this in the future, but we would only start by supporting the most common video container files (like .MP4)

    Thanks,