x


Jerky fullscreen video playback

Hi everyone,

I need to play fullscreen videos in my game. For it I create a video in ogg Theora 720p format and I apply it via a MovieTexture on my GUITexture. However the video rendering under Unity (in any way I choose import parameters) isn't smooth (video appears a bit jerky on camera tracking moves for example) while that is not the case when I watch it with VLC or Media Player Classic. It's just like some frames being skipped during video playback.

Do you know some tips to avoid this problem (compression settings, tool...)? Must I wait for a hypothetical update of the Unity video playing engine?

Thanks for your help.

more ▼

asked May 20, 2011 at 01:51 PM

XeNoTimE gravatar image

XeNoTimE
88 4 4 11

Where you able to solve this? I'm on the same situation and I can't fin any solution.

Mar 08, 2012 at 08:46 PM kevinseligmann
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Do you think this may have something to do with it?

Unity 3.5.2 - Changelog

Movies: · Time.captureFramerate is respected by movie playback when movie does not have audio.

more ▼

answered Jul 10, 2012 at 02:42 PM

Cawas gravatar image

Cawas
2.3k 116 110 127

Old question, but for reference I'll comment: Yes, using Time.captureFramerate is the way to go, we fixed our jerky Theora movies the same way. However, when just setting Time.captureFramerate, Unity still renders as fast as it can. So if you get 60fps and set it to 30, everything will run twice as fast.

To get a stable framerate, we combined it with setting VSync to "every other blank", resulting in 30Hz if your display refresh rate is 60Hz. So we created our videos at 30fps, and set Time.captureFramerate=30, and everything was smooth. The only unavoidable drawback is that the movie and the game time can sometimes run more slowly, if your framerate drops below 30fps.

Instead of the VSync method it should also be possible to use Application.targetFrameRate instead, but I haven't tested that. So for example if you rely on your input video which happens to be 25fps, you would set both Time.captureFramerate and Application.targetFrameRate to 25.

Feb 03, 2013 at 04:08 AM Wolfram
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x404
x155
x135
x34
x2

asked: May 20, 2011 at 01:51 PM

Seen: 3087 times

Last Updated: Feb 03, 2013 at 04:09 AM