Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Video WindowsVideoMedia errors when importing monoscopic and stereoscopic 360 video files

Discussion in 'Audio & Video' started by Selzier, Apr 20, 2017.

  1. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    624
    Details about this bug have been demonstrated in a video, please view here:


    1. Create an monoscopic or stereoscopic mp4 video file using FFMPEG.
    The following assets both create videos using FFMPEG.
    https://www.assetstore.unity3d.com/en/#!/content/35102
    https://www.assetstore.unity3d.com/en/#!/content/38755
    Example File:
    https://www.dropbox.com/s/re32o5ttpu6wrvy/minecraft2048.mp4?dl=0

    2. Import the mp4 video file into Unity. The following errors will be experienced:

    WindowsVideoMedia error 0xc00d5212 while reading C:/Users/Selzier/Documents/Unity5/_NurfaceAssets/IndividualPacks/VideoErrorBug56/Assets/minecraft2048.mp4
    Context: Setting media type for first video stream
    Error details: No suitable transform was found to encode or decode the content.
    Track types:
    Video Track, type: 1cva

    UnityEditorInternal.InternalEditorUtility:projectWindowDrag(HierarchyProperty, Boolean)
    UnityEditor.DockArea:OnGUI()

    Error while reading movie: Assets/minecraft2048.mp4
    UnityEditorInternal.InternalEditorUtility:projectWindowDrag(HierarchyProperty, Boolean)
    UnityEditor.DockArea:OnGUI()

    Movie encoding error [Assets/minecraft2048.mp4]
    UnityEditorInternal.InternalEditorUtility:projectWindowDrag(HierarchyProperty, Boolean)
    UnityEditor.DockArea:OnGUI()

    WindowsVideoMedia error 0xc00d5212 while reading C:/Users/Selzier/Documents/Unity5/_NurfaceAssets/IndividualPacks/VideoErrorBug56/Assets/minecraft2048.mp4

    Context: Setting media type for first video stream
    Error details: No suitable transform was found to encode or decode the content.
    Track types:
    Video Track, type: 1cva

    UnityEditor.DockArea:OnGUI()
     
  2. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    624
    I've opened a bug report with Unity but they cannot reproduce the error.
    https://fogbugz.unity3d.com/default.asp?903529_okqqupglmk9t379n

    If you have this WindowsVideoMedia error, please reply to this thread with the following information (and anything else you can think of):
    - Your exact WindowsVideoMedia error
    - Unity Version
    - Operation System, and version
    - If you have Quicktime installed
     
  3. Bigrin

    Bigrin

    Joined:
    Feb 19, 2017
    Posts:
    1
    Hi the error I get in the unity console is:

    WindowsVideoMedia error 0x80070057 while reading jar://file://E:/Unity_Development_v5.6.0f3/VideoPlayerV0.2/VideoPlayerV0.2/Assets/StreamingAssets/minecraft01.mp4

    Context: MFCreateSourceReaderFromURL
    Error details: The parameter is incorrect.

    Unity Version is : 5.6.0f3
    Operating system is : Windows 10 Home edition
    Do not have Quicktime

    Trying to build for GearVR on samsung S6
     
    Selzier likes this.
  4. EdzuanTengku

    EdzuanTengku

    Joined:
    Nov 23, 2016
    Posts:
    7
    Same error.

    Unity version is : 5.6.0f3
    OS : Windows 10 Home Edition
    I have Quicktime

    Trying to build for Android more specifically Cardboard.
     
  5. EdzuanTengku

    EdzuanTengku

    Joined:
    Nov 23, 2016
    Posts:
    7
    I removed jar:// in the code below and it worked but i'm not sure if it will work if i build it my galaxy s7.


    public override void SetClip(string fileName)
    {
    if (!fileName.EndsWith(".mp4")) fileName = fileName + ".mp4";

    var url = "file://" + Application.streamingAssetsPath + "/" + fileName;

    #if UNITY_ANDROID
    url = url;
    #endif

    videoPlayer.url = url;
    videoPlayer.Prepare();
    }
     
  6. EdzuanTengku

    EdzuanTengku

    Joined:
    Nov 23, 2016
    Posts:
    7
    okay... I've figured out what the problem was.... on windows..... it wasn't able to identify the name of file if using Android build

    it was trying to read the file as
    "jar://file://E:/Unity_Development_v5.6.0f3/VideoPlayerV0.2/VideoPlayerV0.2/Assets/StreamingAssets/minecraft01.mp4"

    after removing jar:// ... windows was able to find it.

    HOWEVER, the problem now resides when i build it onto my android phone.. where it now can't identify where the assets are on mobile...

    although this is what i think it means
     
  7. EdzuanTengku

    EdzuanTengku

    Joined:
    Nov 23, 2016
    Posts:
    7
    @Selzier I have now got it to work on Android..

    Changed the script on "VideoPlayerControllerUVP.cs" to the following :-

    #if UNITY_ANDROID
    url = Application.streamingAssetsPath + "/" + fileName;
     
    kannankans52 likes this.
  8. EdzuanTengku

    EdzuanTengku

    Joined:
    Nov 23, 2016
    Posts:
    7

    Now this also works on windows without the previous error. #ThankGodForCodingClasses
     
  9. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    624
    In my video in the first post, I get WindowsVideoMedia errors without my "360 Video Controls" pack imported into the project. I'm just using plain Unity, and importing the .mp4, and I get the error (not using my pack).

    Are you saying that you no longer have WindowsVideoMedia errors after modifying my scripts? How does this fix the WindowsVideoMedia error if I get the error without using my scripts at all?

    The error you experienced: WindowsVideoMedia error 0x80070057 is different than the one I had, WindowsVideoMedia error 0xc00d5212.

    Maybe there's one error that is resolved via the code you fixed but there's another error which is some bug in Unity? I'll keep investigating , thanks for the help.
     
    Last edited: May 1, 2017
  10. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    624
    Having changed the script as you suggested, I'm still getting the following errors when trying to play video:

    WindowsVideoMedia error 0xc00d5212 while reading file://C:/Users/Selzier/Documents/Unity5/360VideoPlayer9_56/Assets/StreamingAssets/minecraft01.mp4

    Context: Setting media type for first video stream
    Error details: No suitable transform was found to encode or decode the content.
    Track types:
    Audio Track, type:
    UnityEngine.Video.VideoPlayer:set_url(String)

    Can't play movie [file://C:/Users/Selzier/Documents/Unity5/360VideoPlayer9_56/Assets/StreamingAssets/minecraft01.mp4]
    UnityEngine.Video.VideoPlayer:set_url(String)

    WindowsVideoMedia error 0xc00d5212 while reading file://C:/Users/Selzier/Documents/Unity5/360VideoPlayer9_56/Assets/StreamingAssets/minecraft01.mp4

    Context: Setting media type for first video stream
    Error details: No suitable transform was found to encode or decode the content.
    Track types:
    Audio Track, type:
    UnityEngine.Video.VideoPlayer:prepare()

    Can't play movie [file://C:/Users/Selzier/Documents/Unity5/360VideoPlayer9_56/Assets/StreamingAssets/minecraft01.mp4]
    UnityEngine.Video.VideoPlayer:prepare()

    WindowsVideoMedia error 0xc00d5212 while reading file://C:/Users/Selzier/Documents/Unity5/360VideoPlayer9_56/Assets/StreamingAssets/minecraft01.mp4

    Context: Setting media type for first video stream
    Error details: No suitable transform was found to encode or decode the content.
    Track types:
    Audio Track, type:
    UnityEngine.Video.VideoPlayer:play()

    Can't play movie [file://C:/Users/Selzier/Documents/Unity5/360VideoPlayer9_56/Assets/StreamingAssets/minecraft01.mp4]
    UnityEngine.Video.VideoPlayer:play()
     
  11. EdzuanTengku

    EdzuanTengku

    Joined:
    Nov 23, 2016
    Posts:
    7
    Could it be due to Windows 7 and 10 differences? I came about the solution after reading through a post about windows 10 and the way it read files by a gentlemen who was working with hololense.
     
    Selzier likes this.
  12. ATMEthan

    ATMEthan

    Joined:
    Dec 27, 2012
    Posts:
    54
    Getting this as well.

    WindowsVideoMedia error 0xc00d5212 while reading D:/ArbysVR/Assets/Arby's C3/Video/-1_Test/Silly_Goose_alpha_01.mov

    Context: Setting media type for first video stream
    Error details: No suitable transform was found to encode or decode the content.
    Track types:
    Video Track, type: h4pa
    Unity561f1
    Windows 10 Pro
    No quicktime installed
     
  13. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    624
  14. Stevieconnell

    Stevieconnell

    Joined:
    Apr 5, 2015
    Posts:
    3
    WindowsVideoMedia error 0xc00d5212 while reading C:/Users/Home/Documents/Virtual reality work/How to build a video VR app/Assets/Video/360_0024_injected.mp4

    Context: Setting media type for first video stream
    Error details: No suitable transform was found to encode or decode the content.
    Track types:
    Audio Track, type:
    UnityEditorInternal.InternalEditorUtility:projectWindowDrag(HierarchyProperty, Boolean)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    Anyone found a real solution to this one yet?? Seems like a major bug to me.
     
  15. Torresmo

    Torresmo

    Joined:
    Feb 6, 2015
    Posts:
    2
    Having the same issue on Windows 7 machines with quicktime installed. Also tested running Unity as administrator, no luck. Windows 10 and Mac OS machines work fine.

    WindowsVideoMedia error 0xc00d5212 while reading E:/Project/Assets/Resources/Video/opening_trailer.mp4

    Context: Setting media type for first video stream
    Error details: No suitable transform was found to encode or decode the content.
    Track types:
    Audio Track, type:
     
  16. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    227
    Hey everyone!

    We're using Media Foundation to decode H.264 videos on Microsoft platforms. And on Windows 7, Media Foundation cannot decode resolutions above 1920x1088. You can see the note saying "In Windows 7, the maximum ..." in here: https://msdn.microsoft.com/en-us/library/windows/desktop/dd797815(v=vs.85).aspx

    On Windows versions above this, the limit (also stated in the link) is 4096x2304.

    We'll try to improve error reporting so that people don't get puzzled when hitting this. The message we're getting out of Media Foundation (which is what we currently print out in the log) is obviously not precise enough, so we'll see if we can still discover the file resolution and provide a more specific message about this.

    Dominique
    A/V developer at Unity.
     
    Selzier likes this.
  17. VadimDobrogursky

    VadimDobrogursky

    Joined:
    Jul 2, 2015
    Posts:
    6
    But this happens not only on Windows 7 machines.
     
  18. ninuxw

    ninuxw

    Joined:
    Jul 8, 2014
    Posts:
    22
    I am having this problem with windows 7 on the build version with a video with exactly 1920x1088 resolution...
     
  19. ninuxw

    ninuxw

    Joined:
    Jul 8, 2014
    Posts:
    22
    For anyone having this issue, trans coding the video to VP8 did the trick for me.
     
    trakevital, kaisersam and thilde_09 like this.
  20. thilde_09

    thilde_09

    Joined:
    Feb 1, 2018
    Posts:
    1
    Did it for me as well! Thanks
     
    trakevital likes this.
  21. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,154
    Same here, I'm not being able to trans code some videos in Windows 7, the same videos are trans coded with no problems on Windows 10...
     
  22. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    609
    I got this error too for a ProRes4444 .mov with alpha. It cannot transcode and show the movie. The alpha button also does not show up. Unity 2018.2.
     
  23. elettrozero

    elettrozero

    Joined:
    Jun 19, 2016
    Posts:
    216
    WindowsVideoMedia error 0xc00d36b4 while reading D:\TQRec\drinkinggang.mp4

    Context: IMFSinkWriter::SetInputMediaType (audio, some AAC parameters may be unsupported)
    Error details: The data specified for the media type is invalid, inconsistent, or not supported by this object.
    Track types:

    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

    It seems to be related to audio codec...
     
  24. elettrozero

    elettrozero

    Joined:
    Jun 19, 2016
    Posts:
    216
    Setting Unity audio from Surround to Stereo make Recorder work...
     
  25. Artem1251

    Artem1251

    Joined:
    May 19, 2019
    Posts:
    1
unityunity