Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How do you rewind a movie texture?

Discussion in 'Scripting' started by monark, Aug 7, 2009.

  1. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    In the help it says that Stop() will stop and rewind a movie texture. It stops the movie but the displayed frame stays on the stopped one, fair enough, but how do you force it to update and display the first frame that the movie is rewound too?
     
  2. Quietus2

    Quietus2

    Joined:
    Mar 28, 2008
    Posts:
    2,058
    Code (csharp):
    1.  
    2. Movie.Stop();
    3. Movie.Play();
    4. Movie.Stop();
    5.  
    Play and stop it again in quick succession? Might force it to re-render on the initial rewound frame.
     
  3. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    That's basically what i'm trying at the moment without much success. This could do with a refresh method.
     
  4. Quietus2

    Quietus2

    Joined:
    Mar 28, 2008
    Posts:
    2,058
    Or a separate stop and rewind method. Haven't played much with movie textures but it sounds like behavior isn't following what's suggested by the docs. I'd file a bug report.

    As a last ditch effort, try programatically removing and reassigning the texture. That likely would reset it to the initial frame.
     
  5. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    I don't know if it's just an editor thing but even between starting and stopping the entire app it remembers the stopped frame.
     
  6. Quietus2

    Quietus2

    Joined:
    Mar 28, 2008
    Posts:
    2,058
     
  7. Alvarus

    Alvarus

    Joined:
    Apr 10, 2009
    Posts:
    203
  8. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    I've got something going but it's all very hacky and not nice really. Hopefully one day this will get looked at.
     
  9. harmvandeven

    harmvandeven

    Joined:
    Sep 14, 2009
    Posts:
    1
    Hi,
    I really need to rewind a Texture. Is is possible already? Or any other suggestions to create a dynamic video que?
    How did you do it in the end Monark?!

    THANKS!
    Harm
     
  10. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,595
    I did manage to get it to work by stopping then playing a tiny bit then stopping again but this only worked consistently with short movie clips <30 secs, with long ones I found that often it wouldn't rewind to the start and then would skip before playing again, all very bad. I logged a bug/feature request.
     
  11. Rendang1963

    Rendang1963

    Joined:
    Oct 19, 2009
    Posts:
    8
    I also need the movie playback to function flawless and without dropping frames. Unity is a great piece of software, but I am really frustated with the movie texture features, to a point that I will have to consider other options. Hope to see improvement in this area....
     
  12. firas darwiche

    firas darwiche

    Joined:
    Oct 4, 2006
    Posts:
    130
    what alternatives to movie textures are there??

    image sequence?? can it perform well and efficiently??
     
  13. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,133
    Really UT?

    Really. You didn't put in seek and reliable video playing functionality?

    I hate that when jumping on a project with Unity I need to go through and verify that that each functionality is actually fully functioning. Given the entire existence of movie players on computers, one should be able to assume, without hesitation that support for video means you can play, stop, pause, rewind and fast forward.
     
  14. livemixlove

    livemixlove

    Joined:
    Sep 16, 2009
    Posts:
    17
    "Given the entire existence of movie players on computers, one should be able to assume, without hesitation that support for video means you can play, stop, pause, rewind and fast forward."

    Couldn't agree more, eem.

    If the Unity gods are listening, please add standard video control features. I was barking about this two years ago and it's back to haunt me again.
     
  15. vaibhavaggarwal

    vaibhavaggarwal

    Joined:
    May 21, 2012
    Posts:
    2
    Hey

    I am also stuck with the same problem and wondering why hasn't unity still done something to add some more basic functionality to the video player. I really need to add the seek bar and hence the option to Fast forward and Rewind my videos. Has anyone found a work around for this problem. Any help would be greatly appreciated.

    Thank you
     
  16. Pradeep-Patel

    Pradeep-Patel

    Joined:
    Mar 31, 2011
    Posts:
    96
    Hey ,
    Can any one help me how to use movie texture or any demo project
     
  17. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Bump:
    Docs are wrong here.
    We need at least a rewind-to-start function!

    (Better would be a seek function)
     
  18. UnityProUser

    UnityProUser

    Joined:
    Oct 16, 2012
    Posts:
    3
    Need a seek frame function for playing Movie Texture. What did we pay for if it can't do a basic function like GoToFrame (x)?
     
  19. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    Bump... lol
     
  20. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    571
    Really? No rewind!
     
  21. rrh

    rrh

    Joined:
    Jul 12, 2012
    Posts:
    331
    Haha. I just recently had this discussion with someone where I said, "Well I haven't done it, but I assume there's some way to make it go to a specific frame in a movie clip." But upon closer examinaiton maybe I assumed wrong.

    Oddly enough something like this klugey approach for playing video from an image sequence using the non-pro version of Unity might be better in my circumstance. If the length of the movie is short and there's no audio, and the ability to go to a particular frame is important ...
    http://forum.unity3d.com/threads/100174-HOW-TO-Play-Videos-Without-Pro
     
  22. Jashengmato

    Jashengmato

    Joined:
    Mar 23, 2013
    Posts:
    11
    I use this:

    Code (CSharp):
    1. IEnumerator ResetMovieTexture()
    2. {
    3.       coverViewMovie.Stop();
    4.       coverViewMovie.Play();
    5.       yield return new WaitForEndOfFrame();
    6.       yield return new WaitForEndOfFrame();
    7.       coverViewMovie.Stop();
    8. }
     
  23. Obree

    Obree

    Joined:
    Mar 3, 2016
    Posts:
    1