Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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:
    652
    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:
    652
    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:
    652
    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:
    652
    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:
    652
  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:
    260
    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:
    26
    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:
    26
    For anyone having this issue, trans coding the video to VP8 did the trick for me.
     
  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,197
    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:
    858
    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
  26. hanneswu

    hanneswu

    Joined:
    Dec 7, 2020
    Posts:
    1
    Getting the same error saying:

    WindowsVideoMedia error 0xc00d36b4 while reading D:/Projects/360Video/OculusVideoPlayerUnity2019/Assets/VIDEOS MAX/MyVideo.mp4

    Context: Setting media type for first video stream
    Error details: The data specified for the media type is invalid, inconsistent, or not supported by this object.
    Track types:
    Video Track [7680 x 3840], type: HEVC
    Resolution exceeds the Microsoft Media Foundation decoder limit of 4096 x 2304 on Windows 10 and above.
    Install HEVC Video Extensions to enable HEVC format support on compatible devices.
    https://www.microsoft.com/en-ca/p/hevc-video-extensions-from-device-manufacturer/9n4wgh0z6vhq
    https://www.microsoft.com/en-us/p/hevc-video-extensions/9nmzlz57r3t7

    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Using Windows 10
    Unity 2019.4.16f1
    HEVC Video Extensions installed
    Video Encoder: H265, Video Resolution: 8k, [7680 x 3840]
     
  27. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    521
    I get the same with 2021.1.3f. Never had it before, just came out of the blue. Anybody knows what this is about?

    WindowsVideoMedia error 0xc00d36e5 while reading C:/Unity/traVRsal-2021/Assets/3rd-Party-Graphics/Shift - Complete Sci-Fi UI/Textures/Background/Background Advanced.mp4

    Context: IMFSourceReader::SetCurrentPosition in SetSecPosition
    Error details: Der Vorgang auf dem aktuellen Offset ist unzul糳ig.
    Track types:
    Audio Track, type: %10%16
    Video Track [1920 x 1080], type: H264
     
  28. darmova

    darmova

    Joined:
    Nov 27, 2019
    Posts:
    10
    Getting the same error after updating a project from unity 2018 to 2020, in the prev editor it worked fine, both in editor and in build. The most surprising part, error only started showing up after I hit "reimport all" assets button. It was working before without recompiling library.. the exact error:

    WindowsVideoMedia error 0xc00d36b4 while reading D:/some/video/path.mp4
    Context: IMFSourceReader::WaitForSample in StepAllStreams
    Error details: The data specified for the media type is invalid, inconsistent, or not supported by this object.
    Track types:
    Unreadable Track
     
    andresleonardogomez likes this.
  29. LucasHehir

    LucasHehir

    Joined:
    May 7, 2020
    Posts:
    74
    Still getting it in 2022 via Cloud Build on a project that previously built just fine - same files, same platform.

     
  30. elDiablik

    elDiablik

    Joined:
    Oct 25, 2021
    Posts:
    4
    Unity 2021.3.0f1 same error
    Video with Alpha chanel (transparency)

    WindowsVideoMedia error 0xc00d5212 while reading D:/Folder/Assets/UI/VideoFiles/Comp_4.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 [1920 x 1080], type: elr
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
  31. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    Can you play the file outside Unity on Windows? Is it working if you use the Windows Player coming with the OS? MOV supports H264, H265 and Apple ProRes; in all 3, only ProRes natively supports an alpha channel. ProRes is specific to Apple platforms, so Windows can't decode the file. So if you can't play the file outside of Unity on Windows, you should export to webm, which supports alpha natively.