Search Unity

[Released] AVPro Windows Media

Discussion in 'Assets and Asset Store' started by AndrewRH, Jul 4, 2012.

  1. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    What GPU are you using fastcall?
     
  2. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    173
    hi, I have a problem with AVPro Windows Media last viesion。When check Resizeable windows (Player setting) and run drag windows application is crash ! And at ALt+Enter ,crash!

    Unity4.0.1f2
    Windows7 64bit
    AVPro Windows Media 2.22.
    Very worried, please as soon as possible. Thank you !
     
  3. AndrewRH

    AndrewRH

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

    What GPU are you using?
     
  4. hitking100

    hitking100

    Joined:
    Oct 4, 2011
    Posts:
    75
    Hi Andrew,

    My coder ran into a very serious problem yesterday. It seems that you are forced to put the video's in their naked form into the folders in order for it to work. My coder claims he can't embed them, since the dll calls it like that and there's nothing he can do to fix it. According to him, players can just double click on all the video's and watch them without even playing the game. Surely that can't be the idea ? That would ruin everything, for games like mine or cutscenes from other games ? Surely there must be a way to protect these video's from public view once the game is installed ?
     
  5. AndrewRH

    AndrewRH

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

    Yes that's right - the plugin can currently only play files from disk. You could rename the file extension to something like ".dat". At least that would stop 99% of users from finding the videos...

    Otherwise, we do have plans in the near future to add 'play from memory' option. With this option you'll be able to store your video files any way you want to, as long as you can load them into memory. This could be the solution you're ultimately looking for...
     
  6. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    173
    @ Anderw RH:Thanks to replay! In order to use, I had to compile the 32 bit mode and select fullscreen play mode:neutral:
     
  7. AndrewRH

    AndrewRH

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

    I can replicate the crash bug using 64-bit version of the plugin. What GPU are you using? Is it Intel based GPU?

    Thanks
     
  8. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi AVPro users :)

    We've just released version 2.3 of the AV Pro Windows Media plugin!

    + Added Unity 4.1 non-pow2 texture support - optimisation
    + Added new demo that plays multiple videos simultaneously
    + Added frame rate display to inspector
    + Added IsFinishedPlaying property
    + Fixed lost texture bug when pausing and dragging windows
    + Fixed 64bit crash bug on window resize
    + Added new FAQs to documentation

    Enjoy and don't forget to post comments/rating on the Unity asset store :)

    Thanks,
     
  9. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Thanks for reporting this issue. It has now been fixed in version 2.3
     
  10. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Thanks for reporting this issue! It has now been fixed in version 2.3.
     
  11. AndrewRH

    AndrewRH

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

    I'm please to announce the release of a new version of AVPro Windows Media plugin! New in this release:

    + Added support for playing videos from memory, so now you don't need to expose your video files to your users and have have them safely hidden away somewhere.
    + Added new frame extract demo
    + Improved internal frame buffering
    + Improved instance handle recycling
    + Fixed some bugs

    We have an updated demo on the website which shows off the loading from memory and the frame extraction. As usualy you can find the asset on it's Unity Asset Store page

    Thanks,
     
  12. David_W

    David_W

    Joined:
    Jun 19, 2013
    Posts:
    1
    I have the similar error:
    Assets/AVProLiveCamera/Scripts/Wrapper/AVProLiveCameraPixelBuffer.cs(56,94): error CS1061: Type `UnityEngine.Texture2D' does not contain a definition for `GetNativeTexturePtr' and no extension method `GetNativeTexturePtr' of type `UnityEngine.Texture2D' could be found (are you missing a using directive or an assembly reference?)
    Assets/AVProLiveCamera/Scripts/Wrapper/AVProLiveCameraPixelBuffer.cs(56,39): error CS1502: The best overloaded method match for `AVProLiveCameraPlugin.SetTexturePointer(int, int, System.IntPtr)' has some invalid arguments
    Assets/AVProLiveCamera/Scripts/Wrapper/AVProLiveCameraPixelBuffer.cs(56,39): error CS1503: Argument `#3' cannot convert `object' expression to type `System.IntPtr'
    How to deal with it? Thanks.
     
  13. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    447
    Hi David_W.

    Which version of Unity are you using? GetNativeTexturePtr() is only available in Unity 4.0.

    If you are already using Unity 4.0, please trying reimporting the asset.

    Cheers,

    Nathan
     
  14. mruce

    mruce

    Joined:
    Jul 23, 2012
    Posts:
    28
    Hi,
    I need to be able to set a speaker, which is gonna play particular movie (another words, I want to choose which speaker will play each of my movies). I noticed that there's SetAudioChannelMatrix function in AVProWindowsMediaPlugin class. Is it supposed to route audio to desired audio channel? Unfortunately SetAudioChannelMatrix doesn't work (there's no such entrance in DLL). Could you please help me on that?

    Cheers
     
  15. gfoxworthy

    gfoxworthy

    Joined:
    Nov 4, 2010
    Posts:
    24
    I also am very curious about this. We need to target the left, center and right channels. What that would allow us to do is isolate the audio from one of three video instances into a single speaker positioned directly in front of a user.

    In more detail, imagine three users standing side by side, about 2 feet apart, in front of a very wide touch screen; each getting their own audio source for the video they're watching - via the left, center and right speaker.
     
  16. mruce

    mruce

    Joined:
    Jul 23, 2012
    Posts:
    28
    That's exactly what I want to achieve. Have you found any solution?
     
  17. shanemarks

    shanemarks

    Joined:
    Nov 8, 2012
    Posts:
    52

    Hi, apologies for the delay, we are currently adding this functionality and it will be available in the next release soon!

    Regards,

    Shane
    Renderheads Support
     
  18. Rabid-Baboon-RDS

    Rabid-Baboon-RDS

    Joined:
    Mar 26, 2013
    Posts:
    4
    Hi AndrewRH,

    Got another bug for you. I am running Win7 64bit Home Prem and version 2.4 of the plugin/player.

    The player loses context when the UAC prompt displays if the video is paused in the standalone player, but not in the editor.

    How to reproduce.
    1. Start playing a video and pause it.
    2. Start a program or do an action which displays the UAC prompt
    3. After the prompt closes the player will have lost its context and will be displaying some random texture.

    On playback resume the player works fine.
     
  19. Deleted User

    Deleted User

    Guest

    Hey Andrew,

    We just purchased the AVPRO for Windows Media. Everything is going along swimmingly so far, but we've hit a snag. We're trying to get a movie with alpha channel to import and playback in Unity using the Lagarith codec. I've got the codec installed on my Windows 7 machine but Unity 4.0 wont import the movie because it says it's an unrecognized codec. What's weird is that I can play the video file just fine on my machine. I can even launch it from the Unity Project window in a separate WMV player window. It's just unity that won't play it.

    Has anyone else run into this? Solutions?

    - Steve
     
  20. DamirS

    DamirS

    Joined:
    Aug 28, 2013
    Posts:
    19
    Hey folks,

    we purchased AVPRO and as a fairly new Scripter i try to bend the samples to my needs ;) And there i have a problem.
    I use a RGB32 Lagarith Avi (a Matted Person) and so far when i use the standart scripts (manager,Movie,Material apply) i got a great result. Note that i am using a plane with a Material for showing.
    Now i want to use a queued aproach and took the PlayQueueDemo.cs as a base. It works so far, except that my Movies arent transparent anymore.
    My guess would be - its a setting about the ColorFormat. But i can t find it really. I tried to set the Colorformat explicitly to rgb32 - but that didnt work.
    Any help would be appreciated ;)

    yours
    Damir

    ps: @SteveCFloat: We are heavily using RGB32 bit Lagarith Avi Files for our current Project and have no Problems using them in Unity so far. How do you encode them? and are you sure it has an Alpha channel ?
    pss: My First Post on this Forum ... Yiehaaa

    first Edit: Just saw that it was drawing the movie over GUI.Drawtexture ... so setting the alphablend to true solved it. But i would like to know how to do it onto my plane *DiveBack*
     
    Last edited: Aug 28, 2013
  21. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    You cannot import video INTO Unity for use in our plugin. Videos imported into Unity can only be played back using the MovieTexture class.

    Also Unity cannot import AVI files with Lagarith codec.

    i suggest you rename the video extension to ".avi.bytes" to prevent Unity from trying to import the video. Then in the AV Pro Windows Media plugin just reference it using the new file name.

    Hope that helps.
     
  22. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    If you're playing back your video on a plane then you need to ensure that you're using a transparent material applied to the plane.

    Then, as you guessed, you need to set the ColorFormat to RGBA:

    AVProWindowsMediaMovie movie;
    movie._colourFormat = ColourFormat.RGBA32;
    movie.LoadMovie(true);

    Hope that helps!
     
  23. mleblanc

    mleblanc

    Joined:
    Mar 26, 2013
    Posts:
    12
    Hi, everything work great with the plugin except one small thing. I need to skip the first 40 frames of a video but it doesn't seem to work, it always start at the first frame. But after the video playing the first 40 frames, settings the positions is working. It's a bug or something I don't do correctly? Thanks!

    _movie.LoadMovie(false);
    _movie.MovieInstance.PositionFrames = 40;
    //_movie.MovieInstance.PositionFrames still at 0

    (after playing the first 40 frames)

    _movie.MovieInstance.PositionFrames = 40;
    //_movie.MovieInstance.PositionFrames at 40
     
  24. DamirS

    DamirS

    Joined:
    Aug 28, 2013
    Posts:
    19
    Hey Andrew,

    thanks for the Answer.
    I tried to Download the latest 2.4 version from the Unitystore - but alwys get the 2.3 . I tried a clean Project and downloaded/imported it again. No Luck.
    What do i do wrong ? ;)

    Damir
     
  25. kylekaturn

    kylekaturn

    Joined:
    Feb 24, 2013
    Posts:
    20
    Hi. I just updated to Unity3D 4.2.1 from 4.1.5

    AVProWindowMedia is consuming almost twice CPU resource and much more Memory with 4.2.1 than 4.1.5 version.

    I'm using WMV9 codec 1920x1080 resolution movie, before update there was no frame drop. after update Unity3d to 4.2 there is significant frame drop with movie.

    same source , same project, same movie file. only different unity3D version. What's wrong with this?
     
  26. AndrewRH

    AndrewRH

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

    Yes, the current version of the plugin (2.4) doesn't yet have proper support for Unity 2.4 so it uses the older (slower) method of updating textures.

    We will be releasing an update shortly which will have fix this, but if you're curious to fix this yourself you can simply go through the .CS source files and everywhere you see a #if UNITY_4_1 add 4.2 support by changing it to #if UNITY_4_2 | UNITY_4_1

    But as a say we'll be releasing a proper update for this today or tomorrow..

    Thanks and sorry about this update issue!
     
  27. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Any luck now? Version 2.4 is definitely on the Asset Store....
     
  28. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Hi! We're pleased to announce version 2.5 of AV Pro Windows Media!

    Finally there is proper support for Unity 4.2, and also the upcoming 4.3

    We've added a new demo that shows how to extract frames from videos.

    There's also a new audio feature that allows you to offset the audio stream so you can always get perfect AV sync.

    We've improved the support for audio files so now your MP3, WAV, MIDI etc should all play just fine :)

    Video playback can now have a 7.1 audio channel mixer that allows you to specify how much of the video audio goes to each of the 8 speakers. This can be very useful for multi-user interactive installations where you have different speakers positioned for each user and need to be able to send audio to only their speaker.

    Other than that we've done a few other general improvements.

    Thanks for the great feedback and please continue to let us know what you think.
     
  29. mleblanc

    mleblanc

    Joined:
    Mar 26, 2013
    Posts:
    12
    Hi, it's been 2 weeks and I still don't have an answer. Thanks
     
  30. AndrewRH

    AndrewRH

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

    Sorry about that - must have missed your post! I'm looking at your questions now and will post an answer shortly.
     
  31. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    I tested this using the latest version of the plugin (v2.5) and it works perfectly.

    Perhaps it depends on the video codec being used... If it still happens with the new version then feel free to email me the video file so I can try to replicate the bug you've described. Ideally include a sample scene.

    THanks,
     
  32. aum

    aum

    Joined:
    Dec 17, 2012
    Posts:
    20
    Hi Andrew,
    I'm very interested with this plugin. I downloaded the Demo, and I'm trying to play a .mp4 video of 2000x1000, but the player don't show anything.
    I recompressed with the options that you specify in the pdf.

    ffmpeg -i input.mp4 -c:v libx264 -pix_fmt yuv420p -preset veryslow -tune fastdecode -profile:v main -coder 0 -g 6 -crf 20 -flags -loop output.mp4

    but don't works.. the player detects the video as 720x1000 to 24fps....really strange..

    I play with VLC, and the info is:
    Type:Video
    Codec: H264-MPEG-4AVC (part10)(avc1)
    Resolutin: 2000x1000
    Framerate: 24
    Decoding format: Planar 4:2:0 YUV

    I have installed also the GDSMux and Hali Media Spliter for decoding mp4. (without installing, even not detect the video frame rate, size..etc...)
    I have forbidden something?

    thanks in advance
     
    Last edited: Sep 19, 2013
  33. aum

    aum

    Joined:
    Dec 17, 2012
    Posts:
    20
    Hi Andrew,

    finally I bought the plugin.. just a question..

    The final project will run in Windows because is more efficient, etc...(we have to play big videos), but actually we are working in MAC.
    This plugin shows something in Editor? I have play the demos, but all the time says DllNotFoundExcpetionAVProWindowsMedia.
    I tried to change the folder plugins to Root, but same behaviour...

    Is just for seing in the Editor if is loading the video in the right position,etc...

    Thanks
     
  34. mleblanc

    mleblanc

    Joined:
    Mar 26, 2013
    Posts:
    12
    I updated with the last version, and I can't reproduce my problem. But I changed my data too. Well, if I still have the problem in the future, I'll send a unitypackage with all the stuff to debug.

    Thanks!
     
  35. datasoft

    datasoft

    Joined:
    Sep 25, 2013
    Posts:
    4
    $Untitled.png
    after extract copy in asset folder and restart unity show to me this error
    test in unity4.2.0f4 unity 4.0.0b8 in windows 7 64bit
     
  36. datasoft

    datasoft

    Joined:
    Sep 25, 2013
    Posts:
    4
    Who is here?
     
  37. AndrewRH

    AndrewRH

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

    Perhaps you could open up the console window so we can see what the errors are?

    Also, make sure your build setting is set to Windows.

    Thanks,
     
  38. datasoft

    datasoft

    Joined:
    Sep 25, 2013
    Posts:
    4
    Thanks for your response
    yes , Is output on Windows
    The total error is : $Untitled.png
     
  39. aum

    aum

    Joined:
    Dec 17, 2012
    Posts:
    20
    Hello, any answer for me?

    mp4 problem ?
    mac view problem?

    Posted one week...
     
  40. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
  41. AndrewRH

    AndrewRH

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

    Please email us the video file so we can take a look? Send it to unityplugins@renderheads.com
     
  42. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Sorry Aum, I missed your questions!

    The plugin is for Windows only, so I'm not sure what will happen if you try to use the Mac. There is certainly zero support, it will not even give you a preview as it's completely based on Windows technologies... I recommend developing your app on PC in this case, or perhaps using our AVPro QuickTime plugni that is compatible with both PC and Mac..

    Thanks,
     
  43. Pool_Creative

    Pool_Creative

    Joined:
    Oct 4, 2013
    Posts:
    8
    Hi everyone! We swiched over to your Windows Media player to help us get better playback (QT playback on PC sucks for smoothness), and for the most part it works pretty good. However, we have two videos that have very long, slow panning motions in the video that will constantly stutter at random points in the video. Sometimes it stutters for long periods of time, sometimes just a half sec or so. This will do this regardless if you play from disk or load into memory. However, if we play the same video in windows media player, it will playback smooth all day long no issues. So I know it's not the video file, but something with the plugin and/or unity. (Side note, we think other videos are stuttering too, but you don't notice it because they have cuts/not as much panning movement).

    The videos are small, only 960x540, 30fps. They are long tho, over 2000 frames.

    I've created a video here using the cineform codec (the one we'd prefer to use, codec found here: http://gopro.com/software-app/gopro-studio ) and the lagarith codec your manual reccomended. Both videos exhibit the same problems. Here is the the unity build we built from your source code that you ship with the plugin: (using unity 4.2)
    http://client.elementxcreative.com/public/tech/unity/stutter_test.zip - Size: 57.92 MB

    Any ideas would be greatly appreciated as were banging our heads against the wall trying to get the video to play back as smooth as it does in WMplayer.

    ***UPDATE*** Also, we've tried running this at all kinds of resolutions. Our main primary system it will be running on has a quadro k5000 card, video/app running off a SSD hard drive, 16 gigs of ram in system. The build it'self is 32-bit. We are shooting the video out to two projectors, which the quadro has combined into 1 monitor at 1280x1600 resolution (1280x800 times 2).
     
    Last edited: Oct 4, 2013
  44. DarkPixel

    DarkPixel

    Joined:
    Sep 13, 2013
    Posts:
    79
    Hi, we use 1080p Lagartih with alpha, it work great in the editor, but in the Windows Build we have big lag. If we build with developement build, it run great. Do you have any ideas or hints why in release build, the video are laggy?

    Thanks!

    EDIT: Ok it's seems it's related to the framerate. When I set the framerate (with Application.targetFrameRate) to the video framerate (24) it's ok.


    It's possible that the update function update too much even when it's not needed? Thanks!
     
    Last edited: Oct 8, 2013
  45. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Thanks, we managed to fix this issue by issuing you a custom build with an exciting new feature that'll be releasted in the next version :)
     
  46. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    The next version should be able to fix this issue. Thanks.
     
  47. mruce

    mruce

    Joined:
    Jul 23, 2012
    Posts:
    28
    Hi Andrew,
    I have a problem with a latest version - it doesn't work well with two videos playing at once.

    Sample code:
    Code (csharp):
    1. public IEnumerator Test()
    2.     {
    3.         _movie1.Play();
    4.         yield return new WaitForSeconds(1);
    5.         _movie1.UnloadMovie();
    6.         _movie1.LoadMovie(false);
    7.         _movie1.Play();
    8.         yield return new WaitForSeconds(1);
    9.         _movie1.UnloadMovie();
    10.         _movie1.LoadMovie(false);
    11.         _movie1.Play();
    12.         yield return new WaitForSeconds(1);
    13.         _movie1.UnloadMovie();
    14.         _movie1.LoadMovie(false);
    15.         _movie1.Play();
    16.         yield return new WaitForSeconds(1);
    17.         _movie1.UnloadMovie();
    18.         _movie1.LoadMovie(false);
    19.         _movie1.Play();        
    20.     }
    If there is one AVProWindowsMediaMovie object on a scene (_movie1), everything works well. But if there's another one playing same time, _movie1 won't load after uloading - "[AVProWindowsMedia] Movie failed to load" warning shows up.

    I believe it's a bug that showed up it latest release.

    Can you confirm it's a bug?

    Oh, one more thing - not sure if this issue has been spoted, but there is problem with playing videos if there is a video player playing in the background - i had this problem specifically with BSPlayer - during BSPlayer playback, AVPRO's video loading didn't work (which seemed completely random to me when i didn't know the reason); had to restart computer to make it work again.
     
  48. AndrewRH

    AndrewRH

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

    Yes, it's a bug - thanks for reporting it. Can you email us: contact@renderheads.com so we can send you a fix? Otherwise you can find the fix in the next release.
     
  49. dustinandrew

    dustinandrew

    Joined:
    Apr 30, 2010
    Posts:
    102
    We are using the Haali Media Splitter http://haali.su/mkv/ with the AVProWindowsMedia plugin to playback MP4s in Unity kiosks. We have noticed that every time we play a video, a Haali Media Splitter process starts up.

    $ScreenShot.jpg

    The longer the kiosk is used the higher the memory usage grows. We are concerned about memory leaks and crashes after heavy usage and long on times.

    When a video completes we are clearing it using:

    Code (csharp):
    1.  
    2. AVProWindowsMediaPlayer.Dispose();
    3. AVProWindowsMediaPlayer = null;
    4. System.GC.Collect();
    5.  
    Is there anyway we can shut down those Haali Media Splitter processes when we close and clear a video? Is there some AVProWindowsMedia API call we are missing?

    Thanks!

    ----------------------

    FIXED! : Andrew helped me get this fixed:

    We had concerns that the Haali Media Splitter procceses were not being killed with Dispose(). But it turns out to just be icon spam on the system tray. To remove the icons, right-click on the icon and open the Haali Media Splitter properties and turn the icon off.
    $Image.png

    Then for the memory issues, version 2.56 (Coming to asset store soon?) of the plugin fixes the issue.
     
    Last edited: Nov 7, 2013
  50. Mason84

    Mason84

    Joined:
    Dec 10, 2013
    Posts:
    3
    Hi, I´m trying to integrate this modul in our project. If i run in editor it works fine. But if I´m export to an executive version than the modul won´t load the movies. I suppose the issue can be that I have placed the video files under the Assets/Resources folder. This folder will be merged into one file ( unity default resources affter the executive build) . In this case , I suppose the links are going worng.
    So I just want to ask is there maybe any solution to let us keep the movies in Resources folder (as we did whit the basic movie texture solution ) ? We create on the startup allways a link-database (which based on the Resources folder content ) and we change many links on runtime. On this way we load the movies what we actually need.