Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Video file problem

Discussion in 'Audio & Video' started by mf357, Apr 24, 2023.

  1. mf357


    Mar 16, 2023
    I have a video which I want to use in my project. After I import the video in Unity I get this error:

    Unexpected timestamp values detected. This can occur in H.264 videos not encoded with the baseline profile. Timestamps will be skewed to correct the playback for C:/Users/c***/C***/A***/B***/l***.mp4

    I've tried transcoding the video via its import settings and I get this error:

    Color primaries 0 is unknown or unsupported by WindowsMediaFoundation. Falling back to default may result in color shift. C:/Users/c***/C***/A***/B***/0***.mp4
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

    I created the video from an image sequence, first using Photoshop and the second time using Final Cut Pro, and both times I get the same errors.
  2. The_Island


    Unity Technologies

    Jun 1, 2021
    It is not an error but a warning. Both will work fine if you don't need the precision or the file is BT709. In summary, the "Unexpected timestamp values detected" warning tells you that we have to offset the video timestamps, and frame accuracy will be impacted because it was not encoded using the baseline profile. Most of the time, the offset is small so, for most users, it is not an issue. But if you care, you should encode your file using the baseline profile.

    The "WindowsVideoMedia error unhandled color standard: 0" warn that the video file doesn't specify its color standard and we took a guess and chose BT.709 as it is the most popular. In Unity, we support BT.601 and BT.709. For most users, it is not an issue. But if you care or see a color shift because your file is not BT.709, you should specify the color standard while encoding your video files.
    lexsuspl likes this.
  3. _eternal


    Nov 25, 2014
    Ran into this same problem and trying to get to the bottom of it over here:
  4. gennapaul31


    Nov 18, 2023
    Hey there!
    It seems like you're facing some timestamp and color primaries issues when importing your video into Unity. The timestamp error may be due to the video being encoded with an unsupported H.264 profile. Try re-encoding it with the baseline profile.
    As for the color primaries error, transcoding might not be the ideal solution. Instead, ensure your video's color settings match Unity's requirements. If issues persist, consider using capcut - video editor to create your video. Its user-friendly interface and diverse templates could potentially sidestep these technical glitches. Give it a shot and let me know how it goes!
    Last edited: Nov 19, 2023
  5. bowenhiggins4


    Nov 19, 2023
    I am facing this same problem with my site for making my Ads for Asphalt Nitro 8 but it creates an issue with how to tackle this problem.
    Last edited: Nov 25, 2023
  6. toodterry332


    Dec 1, 2023
    Hey there! It looks like you're encountering some issues with your video file in Unity. The timestamp error you're seeing might be related to the H.264 encoding and the baseline profile. Unity is detecting unexpected timestamp values, which could be corrected by ensuring that your CapCut video for PC is encoded with the baseline profile for H.264. Additionally, the color primaries issue during transcoding suggests that the color information might not be recognized or supported by WindowsMediaFoundation.
  7. Tab_are


    Dec 2, 2023
    I have the same problem, and im new in this of unity, how i can "re-encoding it with the baseline profile"?
  8. Tehzeeb590


    Dec 4, 2023
    It seems like you're encountering timestamp issues with an H.264 video imported into Unity, as well as color primaries errors during transcoding. These issues may stem from the video not being encoded with the baseline profile and WindowsMediaFoundation encountering unknown or unsupported color primaries.

    To address the timestamp issue, ensure that the H.264 video is encoded with the baseline profile. You can use video editing software or tools like HandBrake to re-encode the video with the necessary settings. This may help Unity interpret the timestamps correctly.

    Regarding the color primaries error during transcoding, you might want to try the following steps:

    1. Check Color Profiles: Ensure that the color profile used in your image sequence is widely supported. Unity may struggle with unknown or unsupported color primaries. Use a standard color profile like sRGB when creating your image sequence.

    2. Transcoding Settings: When transcoding the video in Unity's import settings, try adjusting the color settings. You may need to experiment with different color profiles or stick to a widely supported profile like sRGB.
    I am replying during home2 suits breakfast hours, I am sure it will help you :)
  9. john218064


    Feb 3, 2024
    You're encountering compatibility issues with your videos in Unity. The timestamp error suggests they might not be encoded with the baseline profile for H.264. Ensure your videos are encoded with this profile for smooth playback. You can also use the <a href=""></a> CapCut Moad APK with no watermark for your projects. Additionally, the color primaries error indicates unsupported settings for Windows Media Foundation. Adjust export settings to use standard color primaries. Consider using HandBrake for transcoding. Experiment until you find settings that work seamlessly in Unity.
  10. Peter_Cox


    Feb 18, 2024
    Timestamp issue might be related to the video encoding. Try checking the H.264 profile during export in your video editing software. As for the color primaries error, ensure you're using a widely supported color profile or try adjusting the import settings in Unity to avoid color shifts. Additionally, for seamless video editing, you should try CapCut mod apk ; it offers user-friendly features and supports various video formats.
    Last edited: Feb 21, 2024
  11. hassihales97


    Feb 19, 2024
    The errors you're encountering in Unity suggest issues with the video encoding settings. Here are some steps you can take to address these problems:

    1. Check Video Encoding:
      • Ensure that your video is encoded with the H.264 baseline profile. Unity recommends using the baseline profile for compatibility.
      • You may need to use a video encoding tool that allows you to specify the H.264 baseline profile during the encoding process.
    2. Transcoding with Correct Settings:
      • When transcoding the video in Unity, make sure you are using the correct settings, including the H.264 baseline profile.
      • Experiment with different video transcoding tools or settings to find the combination that works best for Unity.
    3. Check Color Primaries:
      • The second error you mentioned is related to color primaries. Ensure that your video uses a color space that is supported by Windows Media Foundation.
      • Experiment with different color space settings during the transcoding process to see if it resolves the issue.
    4. Use Other Video Formats:
      • If you continue to experience problems, you might consider using other video formats or codecs that are well-supported by Unity and Windows Media Foundation.
      • Unity supports several video formats, and you can check Unity's documentation for the list of recommended video formats.
    5. Update Unity and Graphics Drivers:
      • Ensure that you are using the latest version of Unity, as newer versions may include improvements and bug fixes related to video handling.
      • Update your graphics drivers to the latest version, as outdated drivers may contribute to video playback issues.
    6. Use External Video Players:
      • If Unity's video player continues to pose issues, consider using external video players within Unity. You can use the VideoPlayer.url property to load videos from a file or URL
    Remember to check the Unity documentation and release notes for any specific guidelines or updates related to video playback and encoding. If the issue persists, you might want to seek assistance on Unity forums or reach out to Unity support for more detailed help with your specific case.