Search Unity

Question MP4 Video not playing - Help pls :(

Discussion in 'AR' started by Kane2361, Nov 6, 2022.

  1. Kane2361

    Kane2361

    Joined:
    May 19, 2021
    Posts:
    3
    Hello everyone!
    - I have used Vuforia image targets
    - Have added the MP4 videos on a plane

    Problem:
    -When I try to run the file, the video does not start but the Video Plane is getting loaded - shows frame 1 of video
    -Video does not start after exporting as APK and trying it on my phone - shows a white plane
    - Video STARTS when I click on the unity file (anywhere in unity) while testing in Game mode (Have attached images to explain it better)

    Thank you for your time!!

    Image 1: Camera View ( Not clicked on Unity)
    upload_2022-11-6_22-8-14.png

    Image 2: Camera View ( After clicking on Unity)
    upload_2022-11-6_22-9-2.png

    Image 3: The Image Target inspector
    upload_2022-11-6_22-1-53.png

    Image 4: Video Plane Inspector
    upload_2022-11-6_22-3-24.png

    Image 5: Video Import Settings
    upload_2022-11-6_22-13-6.png
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    Add the video to alway included files and try again
     
  3. Kane2361

    Kane2361

    Joined:
    May 19, 2021
    Posts:
    3
    @DevDunk Hello, can you explain a bit more? Do I have to select "always include files" somewhere? Thank you for your time!!
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    Project settings - player settings
     
  5. Kane2361

    Kane2361

    Joined:
    May 19, 2021
    Posts:
    3
    @DevDunk I cant seem to find it in player settings. Is it in 'other settings'?
     
  6. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    Note that mp4 is just a file format container. To determine video compatibility on your target platform(s), you will need to know the video codec in which your video is encoded. See Video file compatibility for more information.

    To test compatibility of video playback, I recommend building a scene from your project without AR, just simply focusing on testing video playback on device. If you are still having issues after reviewing the documentation above, you might want to repost your question in the Audio & Video forum: https://forum.unity.com/forums/audio-video.74/
     
    DevDunk likes this.