CPU Usage on Enabled Hardware acceleration and Variable Frame Rate videos
#1
Hello,

My Specs are as follows:

I have a MacBook Pro 13-inch with NVIDIA GeForce and 2.4 ghz CPU + 8 GB RAM Mac running Mac OSX ML and XBMC Eden 11.0

I have several videos that are 720p/h264 encoded(not by me) and some of them appear to have Variable Frame Rate. I say that they have Variable Frame Rate because when playing those videos, with Adjust to Screen Resolution enabled, the videos are switching between 23,97fps (source frame rate) and 29.90fps. I have several questions regarding this case:

1->Is it normal that CPU usage is above 20%(videos with Variable Frame or not)

2-> What can i do so that the Variable Frame Rate dont' cause the blackening of the screen due to changed refresh rate


Some other things to have in consideration:

1->Always happening since installed(XBMC Eden 11.0) on Lion
2->Tried with the nightlys builds and CPU usage really becomes lower, but i have other problems like, AC3 out of synch and ffmpeg decode cpu usage is higher and sound is lower with the new Audio Engine.

Thanks
Reply
#2
Variable frame rate? O.o I didn't even know that was possible in a single file, unless they are separate video tracks that have been merged in an MKV container.

Try running MediaInfo (wiki) on one of these funky video files and tell us what it says.
Reply
#3
Hello Ned Scott,

Thanks for you quick reply.

I remembered the Variable Frame Rate possibility because during playback, not only in the beginning, the Adjust to Screen Refresh Rate expected beahavior happens((black screen and all)). Sometimes the fps stays at 29.90fps(60Hz), the ideal frame rate, but the fact is that the file is encoded at 23,97fps(24Hz) and the playback has the slow effect on pan of the camera.

Regarding the cpu usage, do you have any thoughts to share?

I will submit the log as soon as possible i have the files at other location.

Thanks
Reply
#4
Hello,

Here you have the Media Info log

http://pastebin.com/GaJ3w4Li

If you need anything else i will provide it

Thanks
Reply
#5
Sounds like more an issue with identifying the proper fps to switch the display. Do you have the same issues when display adjust is turned off ?
Reply
#6
No. But with that option turned off there is no problem because the refresh rate is always at 50Hz or 60Hz depending of what i choose in displays options. I have that Adjust turned on because of two things:
1->Trying to have the most smooth possible picture
2->The sound level of all my videos(with problem or not), strangely, are higher.


And about the cpu usage (20% or plus) any thoughts?
Thanks
Reply
#7
1->Is it normal that CPU usage is above 20%(videos with Variable Frame or not)

Depends on video content profile/level and size and which osx you run under.

2-> What can i do so that the Variable Frame Rate dont' cause the blackening of the screen due to changed refresh rate

Nope, do you prefer blue ? Because that's what we are hiding, When you switch the display, OSX will force the output to solid blue until things settle down.
Reply
#8
1->Is it normal that CPU usage is above 20%(videos with Variable Frame or not)

Depends on video content profile/level and size and which osx you run under.

I can give you the example of the file i posted media info file. The osx i run is mountain lion(10.8.1)

2-> What can i do so that the Variable Frame Rate dont' cause the blackening of the screen due to changed refresh rate

Nope, do you prefer blue ? Because that's what we are hiding, When you switch the display, OSX will force the output to solid blue until things settle down.

Sorry for my English what was trying to ask is how can i prevent that from happening. What is happening to me is something like this:

XBMC puts the first 10 minutes at 29.90fps and then randomly puts the rest of the video at 23.97fps.

Here's the log http://pastebin.com/rxF97M5B

Thanks
Reply
#9
can't tell anything without debug turned on.
Reply
#10
Hello davilla,

Sorry about that. Here you have the log with debug.I send my entire log for you to have an idea of my current usage.

http://pastebin.com/8MdrB7Sp

Thanks
Reply
#11
Handbrake by default encodes using variable frame rate

https://trac.handbrake.fr/wiki/VariableFrameRate

The handbrake devs even mention that supposedly for mpeg2 video, the framerate is always variable:

https://trac.handbrake.fr/wiki/FramerateGuide

Quote:However, understand that DVDs and other MPEG-2 video streams use inherently variable framerates. This means that the actual framerate is not a steady number. This doesn't matter in most cases--for example, iPods handle it well. But if you find that playback is jerky, you might want to experiment by specifying a particular framerate instead of using "Same as source."
Reply
#12
Hello gabbott,

What you said means that the Yibis One Piece and other file release, that exhibit this jerky playback were encoded with Hanbrake or other tools that put te variable framerate onto the video files, and wiil always have poor playback on XBMC, i'm i right?

Thanks
Reply
#13
I normally have no issue with most presets in Handbrake and playing it back in XBMC (with or without hardware decoding).
Reply
#14
The problem only happens on TV's that suports 1080p 24Hz because XBMC switchs the aspect ratio to 1080p24 and during the video it changes from 60Hz to 24Hz because the file has , for the most part, the fps at 23.93fps. In previous posts i said that some parts of the video are at 23.93fps and others(E.g. pan of the camera) at 29.90fps. I don't know if XBMC can do anything to detect this so called Variable Frame Rate and assume the bigger fps but without losing the boost of audio. I said this because i know i can customize in advancedsettings.xml but for some reason, the option, Ajust the Refresh Rate to match Display on XBMC boost the audio on video files and i kind like that Smile

Thanks
Reply
#15
so what was the resolution here? i still have this issue unless I watch EVERYTHING in 60hz forced
Reply

Logout Mark Read Team Forum Stats Members Help
CPU Usage on Enabled Hardware acceleration and Variable Frame Rate videos0