Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Theora video doesn´t run smooth in fullscreen mode  (Read 5585 times)

0 Members and 1 Guest are viewing this topic.

ronin

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 8
    • View Profile
Theora video doesn´t run smooth in fullscreen mode
« on: January 13, 2009, 10:43:10 PM »

I converted a video into an ogg-videofile using ffmpeg2theora and created a testgame which simply plays the video using the PlayTheora()-method.

When i start the game in windowed mode the video is played nice and smooth. But if i start it in fullscreen mode some of the frames seem to be skipped. The displayed frame rate is ~3200 fps on my computer while running the game in windowed mode but is limited to ~60 fps while running in fullscreen mode.

Is the framerate limitation in fullscreen mode responsible for this problem?
Or do i have to set certain parameters in ffmpeg2theora? (I used the following parameters for the conversion: -v 10 --optimize.)

By the way: i tested a commercial game based on the Wintermute Engine called "1 1/2 Ritter" which also seems to use the video playback functions of the engine. I noticed the same behavior as in my testgame when playing the film trailer.
Logged

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: Theora video doesn´t run smooth in fullscreen mode
« Reply #1 on: January 13, 2009, 11:24:18 PM »

The Framerate of 60 is set by your Graphics Card driver. It usually sets the Framerate to the Vertical Sync of your Screen, I guess you have a TFT. If you don't do that, e.g. have 200FPS on a 60Hz tft you can see half-screen flickering.

Fullscreenvideo depends on the resolution, the bitrate, the FPS of the video.

cu,

spellbreaker
Logged

ronin

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 8
    • View Profile
Re: Theora video doesn´t run smooth in fullscreen mode
« Reply #2 on: January 14, 2009, 10:16:02 PM »

I recognized additional differences between fullscreen and windowed mode on my computer:
In fullscreen mode with vsync turned on the mouse cursor seems to be moving a bit slower than in the windowed mode or with vsync turned off.
Furthermore i tested some WME games using 2D actors and noticed that if nonplayable actors/entities turn around (for example in a cutscene) they sometimes flicker shortly while turning. This only happens if i use fullscreen mode and turned vsync on. If i use windowed mode or turn vsync off everything works fine.

But as you stated before turning vsync off cannot be the answer because this leads to half-screen flickering (for example when the screen scrolls).

In order to see if these problems occur only on my computer i tried it on an other computer. But there i had exactly the same problems.

I also tried a few fps settings for my ogg-video as you proposed but sadly this didn't bring any advantage.

Now, i don't know what to do to solve these framerate problems. ???
Logged

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: Theora video doesn´t run smooth in fullscreen mode
« Reply #3 on: January 14, 2009, 11:58:34 PM »

I run full rez 1280x800 on my screen an no fps loss at all??!!
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe

ronin

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 8
    • View Profile
Re: Theora video doesn´t run smooth in fullscreen mode
« Reply #4 on: January 15, 2009, 09:51:00 AM »

@Jyujinkai: Is the vsync option activated in your graphic cards driver?
Logged

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: Theora video doesn´t run smooth in fullscreen mode
« Reply #5 on: January 15, 2009, 10:02:03 AM »

i duuno... just default install of nvidia drivers.
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Theora video doesn´t run smooth in fullscreen mode
« Reply #6 on: January 16, 2009, 07:10:56 PM »

For the record, I tried the 1/2 ritter video in full screen (running at 70Hz) and haven't noticed any anomalies.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: Theora video doesn´t run smooth in fullscreen mode
« Reply #7 on: January 16, 2009, 11:55:40 PM »

Things to check...

1) Is your source uncompressed, including uncompressed sound if you have sound.
2) After you compress into theora, did you also compress the audio... is the audio still a huge uncompressed file in the container?
3) Is the video res a multiple of 16?
4) Is you container entity in wme the correct res? (is wme trying to scale the video on the fly?)

Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe

Arathel

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 9
    • View Profile
Re: Theora video doesn´t run smooth in fullscreen mode
« Reply #8 on: January 17, 2009, 01:53:07 AM »

In case you havent compressed the Audio, convert it to ogg.
« Last Edit: January 17, 2009, 05:31:47 PM by Arathel »
Logged
If it\'s dark, it\'s dark.

ronin

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 8
    • View Profile
Re: Theora video doesn´t run smooth in fullscreen mode
« Reply #9 on: January 19, 2009, 08:32:24 PM »

I think i solved the problem and the solution is quite simple. I installed the newest driver for my graphic card and now the videos are played smooth in fullscreen mode with vsync activated.

Thanks for all your help.
Logged
 

Page created in 0.019 seconds with 19 queries.