Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
2
Question by redgreenbob · Jan 30, 2018 at 06:06 AM · videoblackclips

VideoPlayer black frames between clips.

I am attempting to switch between a series of mp4 movies with a simple 2D interface. I am running into an issue that I hope I can work around to. When switching video clips, I get several black frames.


I have tried several switching methods (camera switch, scene switch, video player switch and clip array swaps) for jumping to different content in the cameras far plane. Pausing the clip does not seem to help. On a switch, I am getting black frames.


I understand I have to wait for the next movie to load, the content is built for a delay. Is there a way to avoid the player going to black during the transition? Can I capture the far plane and display the last good frame in the near plane during the transition? Is my method incorrect?


The following script is the structure I would prefer to use if I can find a solution to the black frames, I have simplified it to include only the video setup:


 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine.Video;
 
 [RequireComponent(typeof(VideoPlayer))]
 
 public class stageTools_clean : MonoBehaviour {
     public VideoClip[] vids;
     private VideoPlayer vp;
     private int ii = 0;
 
     // Use this for initialization
     void Start () {
         vp = gameObject.GetComponent<VideoPlayer>();
         vp.clip = vids[0];
     }
 
     public void PlayVideo(int id)
     {
         if (id<0 || id >= vids.Length)
         {
             id = 0;
             ii = 0;
         }
         vp.Pause();
 
         vp.clip = vids[id];
         vp.Play();
     }
     
     // Update is called once per frame
     void Update () {
 
         if (Input.GetMouseButtonDown(0))
         {
             ++ii;
             PlayVideo(ii); 
         }
     }
 }

alt text


Thanks in advance for your help...



unityclipscreen.jpg (127.7 kB)
Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image asger60 · Aug 13, 2018 at 07:50 AM 0
Share

I have the same problem, did you ever fint a solution?

avatar image ABerlemont · Mar 19, 2019 at 12:28 PM 0
Share

Same here. I'm considering having two VideoPlayer and one pausing before the next clip is ready in the second VideoPlayer ...

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

127 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to create 360 video from unity? 0 Answers

How to play a video inside a canvas with world space in unity3d 0 Answers

Unity WebGL trying load stream 360 video with WebGLMovieTexture and 360StarterKit. How to load video from DropBox by http//*.mp4 link? 0 Answers

How can I display video from the script ? 0 Answers

EntryPointNotFoundException: av_register_All - OSX with EasyMovieTexture 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges