Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Video import error

Discussion in '2019.2 Beta' started by id0, Feb 28, 2019.

  1. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    This errors I have since 2019.1. Video just not import. I trying different formats, I trying install some codecs, nothing help. Before that, on 2018 everything was fine (with same videofiles).

    Code (JavaScript):
    1. WindowsVideoMedia error 0xc00d36b9 while reading C:/2019/proj_/Assets/Video.avi
    2.  
    3. Context: Getting Native Video Media Type
    4. Error details: <Empty>
    5. Track types:
    6.    Video Track [1920 x 1080], type: MP4V
    7.    Video Track [1920 x 1080], type: XVID
    8.  
    9. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
     
    Last edited: Feb 28, 2019
    tasticad likes this.
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,143
    Could you please submit a bug report with a video asset attached that reproduces this behaviour?
     
  3. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    Hi id0!

    Sorry you're having trouble with your videos. It'd be very useful for us if you could file a bug with your videos, as Leonhard is recommending, so we can see how best to address this. In your bug report, please tell us what was the working setup you had in Unity 2018 (exact Unity version, Windows version, 3rd party codec download links, etc).

    By looking at the error message you posted, I have a few comments that could get you out of trouble for the time being:
    1. The meaning of the error message is that when we asked Microsoft Media Foundation to give us information about the first video track in the file, it went through all tracks in the file and ended up not recognizing any of them as being a supported video track type.
    2. The movie file has multiple video tracks. Unity only picks up the first one so depending on track order, it will be the one using MP4V codec or the one using the XVID codec. I would suggest not leaving this to chance and just leave the track you want to be used. Furthermore, the unused track will be dormant payload in your game.
    3. We recommend using the H.264 codec instead of the ones you have here so if you can either re-generate the files or transcode them into a mp4 containing H.264 (using ffmpeg for example), you may have a better result as this is the most tested scenario with Unity.
    But all this being said, thanks for bringing this to our attention. We don't see these codecs being used much, but if we did something that somehow disables support for them, we should be able to repair this easily.

    Dominique
    A/V developer at Unity
     
  4. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    Thanks for the answer. It's not that I need video too much, but it's just works fine in 2018.3.5f1, but not in the 2019.1/2019/2 (I rechecked that just now) Video format is:
    Code (JavaScript):
    1. General
    2. Complete name               : C:\2019\proj_\New Unity Project\Assets\Video.avi
    3. Format                      : AVI
    4. Format/Info                 : Audio Video Interleave
    5. File size                   : 62.3 MiB
    6. Duration                    : 3 s 800 ms
    7. Overall bit rate            : 138 Mb/s
    8. Writing library             : VirtualDub build 35491/release
    9.  
    10. Video
    11. ID                          : 0
    12. Format                      : MPEG-4 Visual
    13. Format profile              : Advanced Simple@L5
    14. Format settings             : BVOP1
    15. Format settings, BVOP       : 1
    16. Format settings, QPel       : No
    17. Format settings, GMC        : No warppoints
    18. Format settings, Matrix     : Default (H.263)
    19. Muxing mode                 : Packed bitstream
    20. Codec ID                    : XVID
    21. Codec ID/Hint               : XviD
    22. Duration                    : 3 s 800 ms
    23. Bit rate                    : 138 Mb/s
    24. Width                       : 1 920 pixels
    25. Height                      : 1 080 pixels
    26. Display aspect ratio        : 16:9
    27. Frame rate                  : 60.000 FPS
    28. Color space                 : YUV
    29. Chroma subsampling          : 4:2:0
    30. Bit depth                   : 8 bits
    But as I said I trying other formats, and non of them working. I'm on Windows 7 and I have K-lite codec pack (if it's important) I will try to create bug report later.
     
    Last edited: Mar 2, 2019
  5. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    Create a bug report 1133061_r13ej3uiq5b6nbjt
     
  6. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    OK, thanks id0, we are looking at this right now and will keep you posted.

    Dominique
     
  7. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    Hi again id0!

    I've just fixed the issue you reported and started the reviewing/testing process for inclusion in 2019.2 and 2019.1. The issue is specific to Windows 7 and indeed as you have pointed out is independent of the video codec being used. It's caused by an important behaviour difference in Microsoft Media Foundation between Windows 7 and >=8.

    You can temporarily use webm videos on this platform as the implementation is completely separate, but we'll do our best to get the fix backported to 2019.1 as soon as possible.

    Sorry for the inconvenience and again, thanks a lot from pointing this out.

    Dominique
     
    FROS7 and id0 like this.
  8. Vasak3dfx

    Vasak3dfx

    Joined:
    Aug 31, 2018
    Posts:
    2
    I am adding mp4 video with AR application (vuforia) in Unity 2019.1.9 but the application closes as soon as the video starts.
    I could not solve this problem, please offer an immediate solution
     
  9. eijie

    eijie

    Joined:
    Dec 16, 2015
    Posts:
    3
    New
    I am adding mp4 video with AR application (vuforia) in Unity 2019.1.10
    and the application closes as soon as the video starts.

    please solve this problem