Search Unity

[Released] AVPro Video - complete video playback solution

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

  1. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    173
    hi, i am full v1.0 version,i want to buy new but can you add ultra edition for window only, i dont need andriod and ios.thanks.

    i only need :
    1.Hap codec support on Windows now supports Media Foundation API, with faster non-blocking loading
    2.New 10-bit NotchLC codec support on Windows


    i have other question. The discount is time-limited. I want to know the expiration date of the discount. Although there is currently a 25% discount, the $600 is not a small amount for individual developers.Thanks again
     
    Last edited: Feb 7, 2021
  2. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    I believe this issue was fixed in one of the 2.0.x updates - try getting the latest version of the plugin if you're still having issues.

    Thanks,
     
  3. AndrewRH

    AndrewRH

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

    We're considering it but having per-platform editions of core means 3 more packages and there are already a lot to juggle. The more editions we have the more testing we have to do and the longer releases take. We'll have to see.

    Currently the discount is not time limited, however we may remove the discount in the future, but I don't see this happening any time soon.

    Thanks,
     
    LostPanda likes this.
  4. AndrewRH

    AndrewRH

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

    AVPro Video version 2.0.6 has just been released!

    Changes include:

    iOS / tvOS

    • #613 Fixed issue with media player instances no longer producing textures after a scene reload
    Windows
    • Added
      • Added native support for 24-bit audio to the audio grabber which allows beyond 32 channels of PCM audio in MOV containers in the Ultra edition
    • Fixed
      • Fixed regression introduced in 2.0.3 that caused Facebook Audio 360 to not work
    Download Links

    Editions
    On the Unity Asset Store we've made several editions of AVPro Video available so you can pick the one that's best for your project:
    Core Edition
    Ultra Edition
    • Enterprise Edition (contact us for multi-site licensing / support options)​
    You can read this page to learn more about the features, pricing and upgrades for the different editions.

    DOWNLOAD THE FREE TRIAL VERSION HERE

    Thanks to everyone who reported bugs or feature requests! We're looking forward continuing to support this product into the future and adding more features.

    Thanks,
     
  5. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    Hi @barbelot

    There are a number of ways to solve this depending on your hardware and requirements:
    1. If you have a powerful pc and memory isn't a concern, using multiple MediaPlayer components each with a preloaded video is advisable
    2. You could check out the PlaylistMediaPlayer component which uses two MediaPlayer components (one to load and one to play/display)
    3. Alternatively, you could combine all the videos together and then seek to the position of the 'next' video
    Hope this helps, let us know how you get on!
     
  6. mhusseini

    mhusseini

    Joined:
    Jul 12, 2019
    Posts:
    6
    I'm experiencing a similar issue. What does "setting packing none in Media properties" exactly mean?
     
  7. m4lumm

    m4lumm

    Joined:
    Nov 15, 2012
    Posts:
    15
    Hello. I just resent the email to that address. Thanks.
     
  8. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    HI @mhusseini, not too sure what you mean by this, could you provide some more information please?
     
  9. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    @m4lumm still can't find the videos, what subject line did you use in the email?
     
  10. Jeff_rey

    Jeff_rey

    Joined:
    Nov 26, 2017
    Posts:
    19
    @TerryRH
    I have a question about the error that av movie pro throws when a video cannot be loaded. Is there a straight forward way to have a backup url incase the first doesn't load? Currently: user starts video, if the video cannot be loaded the error is thrown. [[AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources.] then a error message i integrated pops up saying to check your internet connectivity.

    What I would like to integrate: user starts video, if the video cannot be loaded it will then try the second link if that one fails THEN the error is thrown and my code then runs to show my message saying to check internet connectivity.

    I am trying to integrate a backup link so the user has minimal down time for watching videos.

    Additional note is I am using VideoManager.OpenVideoFromFile(VideoManager.m_VideoLocation, VideoManager.m_VideoPath, VideoManager.m_AutoStart); so I will be loading my links from the internet, not from the streaming assets folder. Thank you and any help would be appreciated! Also If I am posting in the wrong place please shoot me a link to the appropriate place to post.
     
    Last edited: Feb 13, 2021
  11. m4lumm

    m4lumm

    Joined:
    Nov 15, 2012
    Posts:
    15
    Hi. The subject of the email is "HAP Alpha files play in slow-motion on Windows (Direct Show)".

    The issue is fixed in v2.0.5/6 when using Media Foundation. However, it still occurs when using Direct Show. Also, Hap Alpha files seem to stream/buffer very slowly when using Media Foundation.

    Thanks.
     
  12. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    Still don't see the email in our inbox. Could you try sending it again? We're getting loads of other emails, so not sure why yours isn't coming through.

    Could you provide some more info about what you mean by slow-motion, and what you mean by buffer slowly? How big is the video you're trying to stream?

    There are some big improvements coming for HAP support very soon - some will be included in version 2.0.7 over the next few days, and some more will feature in the 2.1.0 release; so there's a chance that this will fix your issue!
     
  13. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    Hey @Jeff_rey

    There's no out-the-box solution but there's an event called GetLastError() you could use to see if there is an error thrown, and if there is, you could play the backup video. It would look something like this:

    ErrorCode error = mediaPlayer.Control.GetLastError();
    if (error != ErrorNode.None)
    {
    mediaPlayer.OpenVideoFromFile(...);
    }

    Let us know if that helps?
     
  14. Jeff_rey

    Jeff_rey

    Joined:
    Nov 26, 2017
    Posts:
    19
    @TerryRH Thank you for the reply! I Figured out a workaround! For anyone with the same problem I have this is what I did. Since I have multiple videos but only one media player, my m_VideoPath is set whenever that specific video is clicked on.
    I just store my backup URL for that specific video loaded in a private string and return the name of that backup and declare my m_VideoPath = //my back up video in the event that an error is thrown. since I only have one backup, I made a counter that would increment by 1 if an error is thrown. if that counter is = 1 load back up video as my m_VideoPath and if it is 2 then load my error screen saying to check internet connectivity. Then setting the int and string back to null. if only one error has been thrown then I start my coroutine to start my second video. like this:
    Code (CSharp):
    1. public IEnumerator PlaybackUpVideo(string backupVideo)
    2.         {
    3.            
    4.             VideoManager.m_VideoPath = backupVideo;
    5.             VideoManager.OpenVideoFromFile(VideoManager.m_VideoLocation, VideoManager.m_VideoPath, VideoManager.m_AutoStart);
    6.             while (Application.isPlaying && (VideoIsReady(VideoManager) || AudioIsReady(VideoManager)))
    7.             {
    8.                 yield return null;
    9.              
    10.             }
    11.          
    12.             VideoManager.Play();
    13.             Debug.Log("Playedbackup");      
    14.                      
    15.          
    16.             backUpVideo = null;
    17.             backUpVideoCounter = 0;
    18.         }
    it seems to work nicely.
     
    seabits likes this.
  15. AndrewRH

    AndrewRH

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

    AVPro Video version 2.0.7 has just been released!

    Changes include:

    Windows

    • Improvements
      • Better Hap decoding performance due to updating Snappy library and splitting CPU and GPU workloads
      • Better NotchLC decoding performance due to updated LZ4 library, splitting CPU and GPU workloads, and reducing GPU copy
    macOS / iOS / tvOS
    • Fixed
      • #624 Fixed issue with texture flickering when using multiple media players
    macOS
    • Fixed
      • Fixed issue with standalone builds using Unity 2019 and later where the video player texture would stop updating whilst there was input from the mouse or keyboard

    Download Links

    Editions
    On the Unity Asset Store we've made several editions of AVPro Video available so you can pick the one that's best for your project:
    Core Edition
    Ultra Edition
    • Enterprise Edition (contact us for multi-site licensing / support options)​

    You can read this page to learn more about the features, pricing and upgrades for the different editions.

    DOWNLOAD THE FREE TRIAL VERSION HERE

    Thanks to everyone who reported bugs or feature requests! We're looking forward continuing to support this product into the future and adding more features.

    Thanks,
     
  16. draky

    draky

    Joined:
    Nov 24, 2016
    Posts:
    12
    Hey!

    I was wondering if its possible to load videos from a byte array on windows 10? I read earlier that windows 10 doesnt use DirectShow API, which is needed for OpenVideoFromBuffer()?

    Thanks!
     
  17. m4lumm

    m4lumm

    Joined:
    Nov 15, 2012
    Posts:
    15
    Our test Hap Alpha video is 824MB. When streaming it with Media Foundation, it buffers way more often than other file types of the same size. When streaming with Direct Show, the audio sounds distorted.

    It looks like Hap streaming was optimized in the latest version. I will test and let you know if it is fixed.
     
    seabits likes this.
  18. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    Hey @draky,

    Yeah, you're correct in that you'd need to use Direct Show API. It does however work on Windows 10, it just is quite old and has limited support.

    Would be interested to hear how it goes if you try it!
     
  19. Serhii-Horun

    Serhii-Horun

    Joined:
    Apr 12, 2015
    Posts:
    151
    Hi, AVPro Team!

    Could you please explain what is going on in our case with tcp connections?
    We are working on app with video feed(similar to TikTok). We "prewarm" few video before current video and after to be able play next video without pause. We got an issue with one phone cell provider in Sweden(Telia): SocketExceptions. We started investigate our network traffic and notice that device opens a lot of tcp connections during video streaming and close it in ~1 min after we have closed video(invoked MediaPlayer.CloseVideo).
    We tried to use http header Connection:close, but it does not help.

    Do you have any idea why it keeps all connections active for ~1min even though we have closed all video? Platform iOS, we use Xcode profiler

    UPDATE: if we stay on our feed screen for 4-5 minutes they are being closed. Instead of 30+ active connections we have only 4-5. During that time we have 1 streamed video + 10 video in buffer.
    We've tried to destroy video playing related game objects/components, but it also does not close all active connections immediate.
    All our requests via HTTPClient to our servers(not related to video streaming) are being closed immediate
     
    Last edited: Feb 22, 2021
  20. oumur

    oumur

    Joined:
    Sep 12, 2013
    Posts:
    11
    I am recording the camera inside the scene as mp4 file and the video that I play with avpro plays faster in the rendered end product. Is there a option to sync the video to the framerate that I am recording with the avpro ?
     
  21. SteenPetersen

    SteenPetersen

    Joined:
    Mar 13, 2016
    Posts:
    104
    Hi, I am working with Pico G2 4K headsets and I am quite sure that is possible to view 8k videos on them using something like Visbit. Is this something that is possible with this application?

    I have downloaded the trial version, rendered a 20 second 8k (7680x3820@29,97), and brought it into unity, I then use the demo scene with the Pico SDK cameras. I attach the correct video in the "MediaPlayer" gameobject and press play.

    It works fine in the editor but when I build the scene onto the headset all I see is this:

    upload_2021-2-21_15-5-35.png

    Anything I'm missing, anyone tried using g24k for watching 8k videos?
     
  22. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    Hey @oumur

    Not sure exactly what you mean by this or which version of AVPro Video you're using.

    If the issue is with AVPro Video 2.x, there's a feature "TimeScale Support", which enables you to slow down the video to match Unity capture time: https://www.renderheads.com/content/docs/AVProVideo/articles/feature-video-capture.html.

    What capture software are you using?
     
  23. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    Hey @SteenPetersen,

    We don't have a Pico headset to test with so are unable to guarantee it could be played, but would assume it could seeing as though it works on other players.

    1) Are you using the OES mode? It uses less memory so is better for higher res videos.
    2) Which version of AVPro are you using? Definitely a better chance of it working in the latest versions.

    You're welcome to send your log files to unitysupport@renderheads.com and we could take a closer look.
     
  24. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    Hey @Serhii-Horun

    Not sure what's going wrong from your description, could you please supply the following information:

    1) What version of AVPro are you using?
    2) Which device are you testing this on?
    3) Which videos are you trying to play back (HLS or MP4)?
     
  25. Serhii-Horun

    Serhii-Horun

    Joined:
    Apr 12, 2015
    Posts:
    151
    1) AVPro 1.11.3
    2) Which device are you testing this on? - iPhone X/12/XS. Basically it happens on any iOS devices what we use(iPhone X and higher)
    3) HLS (we stream via .m3u8)
     
  26. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    @Serhii-Horun all we can really suggest is to check to make sure the MediaPlayer instances are being destroyed, as we would expect the connections to be dropped at this point - but haven't investigated this. We have no control over what AVFoundation does under the hood. Would be interested to hear your progress on this.
     
  27. Serhii-Horun

    Serhii-Horun

    Joined:
    Apr 12, 2015
    Posts:
    151
    Yeah, we tried to destroy immediate all MediaPlayers, but it didn't close connections immediate(still requires few minutes). But our connection is being closed immediate at the moment we dispose HttpClient object. Ok, we will continue investigate. Will let you know if we found how to fix that or at least know the reason of that
     
    seabits likes this.
  28. barbelot

    barbelot

    Joined:
    Jul 18, 2017
    Posts:
    38
    Hi ! Thank you for your answer.

    An update on how I did it : The first option did not seem realistic with our hardware and number of videos (~30).
    The playlist media player was close to what I needed but having to add all videos manually as playlist items was pretty tedious so I ended up doing something similar manually with 2 mediaplayers components. It worked really well and also allowed some transitions between the videos which the 3rd option does not allow.
     
    seabits likes this.
  29. draky

    draky

    Joined:
    Nov 24, 2016
    Posts:
    12
    How would you go about swapping over the API?
     
  30. trojant

    trojant

    Joined:
    May 8, 2015
    Posts:
    89
    Hi!
    CODE:
    MediaPlaylist.MediaItem mediaItem = new MediaPlaylist.MediaItem();
    mediaItem.filePath = "TV" + ID + "/" + name;
    mediaItem.isOverrideTransition = true;
    _playlistMediaPlayer.Playlist.Items.Add(mediaItem);

    PS:I generate items in the playlist media player(BETA) at run time,and when mediaItem.isOverrideTransition = true, It made this error.it can not play.
    Thank you very much!
    ERROR:
    NullReferenceException: Object reference not set to an instance of an object
    RenderHeads.Media.AVProVideo.PlaylistMediaPlayer.OpenVideoFile (RenderHeads.Media.AVProVideo.MediaPlaylist+MediaItem mediaItem) (at Assets/Plugins/AVProVideo/Scripts/Components/PlaylistMediaPlayer.cs:469).
     
    Last edited: Feb 25, 2021
  31. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    On the Media Player component, navigate to Platform Specific > Windows > Video API and select the Direct Show option from the drop-down list.
     
  32. Bemersive

    Bemersive

    Joined:
    Oct 19, 2020
    Posts:
    1
    Hi,

    I am migrating a project from 1.xxx to 2.07 on Unity3D.
    I can't find the "m_StereoPacking" attribute on the MediaPlayer, where is it now ?

    Also, is there a migration web page somewhere in order to know exactly how things have changed between version 1 and 2 ?

    Thanks,
    Best regards,
    Jamal B.
     
  33. Askeladde

    Askeladde

    Joined:
    Jan 5, 2020
    Posts:
    2
    Hi, Question 1: When the player is streaming the video with a fixed length from an URL, and looping is enabled, does the player consume bandwidth each loop, or is the streaming video cached and repeated each time from the cache?

    Question 2: If the streaming URL link is changed, and a new fixed length video is streamed, is the previously cached video discarded and the new video is cached instead?
     
  34. AndrewRH

    AndrewRH

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

    Check the new manual here which shows how to script stereo packing:
    https://www.renderheads.com/content/docs/AVProVideo/articles/feature-arvrxr.html#manually-specifying

    It can be set on the MediaPlayer (as in 1.x), or assigned to the new MediaReference asset type. Stereo metadata is now supported on Windows so in most cases it should be auto-detected.

    Good idea with the migration guide. There are so many changes that we haven't managed to go through and document this. We will write some notes in the documentation soon.

    I hope this helps you.

    Thanks,
     
  35. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Which version of AVPro Video are you asking about?

    1) On Windows if the video is a MP4 file then it shouldn't redownload it on each loop. If it is a HLS/DASH stream, then it might be the file is large. I'm not sure what happens on macOS / iOS / Android - which platform are you interested in?

    2) On Windows I believe there is some sort of operating system level caching for the lifespan of the application, so as long as the files aren't too large they should be cached. I think the lifespan of the caching may depend on the server settings. This is not something we have tested though so this is just my best guess. On other platforms (again I don't know which platform you're asking about, since they all have slightly different behaviours) I'm not sure, but I know that internally we have some new caching features being worked on for Android, iOS and macOS which will be released in version 2.1.0

    Thanks,
     
  36. AndrewRH

    AndrewRH

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

    I believe the issue may be that you need to set the easing type. Try adding:

    mediaItem.overrideTransitionEasing = new Easing();

    Does that solve it?

    Thanks,
     
  37. AndrewRH

    AndrewRH

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

    AVPro Video version 2.0.8 has just been released!

    Changes include:

    General
    • Fixed
      • Fixed visual timeline overrun in MediaPlayerUI demo
      • Rotated sphere in 360Stereo scene 180 degrees to fix the forward-facing direction
    Windows
    • Improvements
      • Minor performance improvements of Hap and NotchLC decoders (major ones will come in 2.1.0)
      • Added new method GetAudioBufferedSampleCount which returns the number of audio samples held by the plugin when using Unity as the audio output mode. The AudioOutput inspector uses this to show the amount of bufferd audio in milliseconds.
    macOS / iOS / tvOS
    • Improvements
      • #636 Added support for Open-Seek-Play approach to starting playback at a specific time
    macOS
    • Fixed
      • #637 Fixed failure to update texture when opening media in quick succession
    iOS / tvOS
    • Fixed
      • #643 Fixed crash when force closing application
    iOS
    • Fixed
      • #640 Fixed crash when removing headphones after a scene reload

    Download Links

    Editions
    On the Unity Asset Store we've made several editions of AVPro Video available so you can pick the one that's best for your project:
    Core Edition
    Ultra Edition
    • Enterprise Edition (contact us for multi-site licensing / support options)​

    You can read this page to learn more about the features, pricing and upgrades for the different editions.

    DOWNLOAD THE FREE TRIAL VERSION HERE

    Thanks to everyone who reported bugs or feature requests! We're looking forward continuing to support this product into the future and adding more features.

    Thanks,
     
  38. RiccardoAxed

    RiccardoAxed

    Joined:
    Aug 29, 2017
    Posts:
    119
    Hi, I'm sure it has already been asked but I cannot find any trace about it: does AVPro Video (Core Edition) support URP and HDRP?
     
  39. Serhii-Horun

    Serhii-Horun

    Joined:
    Apr 12, 2015
    Posts:
    151
    Hi, Terry!
    Seems we've found the issue. And it is not related to AVPro. It was a mistake on our side. AVPro works perfect! Thanks for support!
     
    MorrisRH and seabits like this.
  40. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    Hey @RiccardoAxed

    Effectively yes it does - Unity can convert all the custom AVPro shaders except the lit one - so it will work fine unless you want to use lit materials. Hope that helps?
     
  41. RiccardoAxed

    RiccardoAxed

    Joined:
    Aug 29, 2017
    Posts:
    119
    Yes, thanks for the reply, I already downloaded and installed the trial version and the shaders can be easily converted for URP indeed. Having a go with AVPro :)
     
    seabits likes this.
  42. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    Hi @trojant

    Here's a replacement script with a fix for you, as we're unlikely to do an update of version 1.x.

    Hope this helps!
     

    Attached Files:

  43. RiccardoAxed

    RiccardoAxed

    Joined:
    Aug 29, 2017
    Posts:
    119
    Hi, I just bought the Core Edition, may I ask you the cleaner way to replace the trial version in a project? Maybe could I simply import the package and it will cleanly replace the trial version, or should I first delete the "AVProVideo" trial folder from the Assets and import the bought package from scratch?
     
  44. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    447
    You can just import the package over the trial version. It will replace it.
    The only thing you may have to do is restart unity first and then immediately import the new package. If you don't do this, and have been using the MediaPlayer component then the DLL file may become locked and it will not update correctly.

    The installation/upgrade steps are documented here:
    https://www.renderheads.com/content/docs/AVProVideo/articles/install.html

    Thanks,
     
    RiccardoAxed likes this.
  45. trojant

    trojant

    Joined:
    May 8, 2015
    Posts:
    89
    Thank you for you reply, and it has been solved.
    add this : mediaItem.overrideTransitionEasing = new PlaylistMediaPlayer.Easing();
    I will use new PlaylistMediaPlayer script, Thank you!
     
    seabits likes this.
  46. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    Hi Jamal

    Just wanted to point you to the notes on updating from AVPro Video 1.x to 2.x - we've updated the docs and it can be viewed here: https://www.renderheads.com/content/docs/AVProVideo/articles/upgrading-from-avpro-video-1x.html.
     
  47. alittleredpanda

    alittleredpanda

    Joined:
    Oct 5, 2019
    Posts:
    1
    Hey, I've downloaded the most recent free trial and I'm having trouble adding subtitles to the Demo_MediaPlayer scene

    I've made an SRT file, which I've added to the mediaplayer by adding it "relative to streaming assets folder"
    I get the debug message that the subtitles are opening.
    But they don't appear, nothing is in the text box. In the scene (in play mode) I clicked on the little cog to see subtitle options, I see "Text Tracks: 0" and in the inspector, in Media Info, I can see Video Tracks and Audio Tracks options, but no Text Tracks.

    Is there something super obvious that I'm missing when setting this up? Thanks
     
  48. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    Hi @alittlepanda

    If the 'Sideload Subtitles' box is checked, and the subtitles are opening debug is happening - then it's likely that there is some mistake with the formatting of the SRT file. Feel free to upload it here or send it to unitysupport@renderheads.com if you'd like us to take a look at it for you.
     
  49. VRS3DGuru

    VRS3DGuru

    Joined:
    Sep 21, 2017
    Posts:
    14
    Your team is forcing existing AVPro license holders to purchase a new license to have continued support, which was not the expressed license of the original purchase made for AVPro in 2018. I still have the original document. You are intentionally forcing all existing license holders to re-purchase and using some naming/deprecation claims trickery to do so. This is NOT good business. Shame shame.

     
  50. trojant

    trojant

    Joined:
    May 8, 2015
    Posts:
    89
    Hi,I have a lot of playlistMediaPlayer in scene,but I can't control their muteaudio function.I used These methods,and the audio will still play.What shall I do? Thank you.

    (1)playlistMediaPlayer.m_Muted = true; (invalid)
    (2)playlistMediaPlayer.Control.MuteAudio(true); (invalid)