frame-rate

My FPS Counter is in-accurate any ideas why?

≯℡__Kan透↙ 提交于 2020-01-16 05:14:05
问题 When I start up my game it stays around 95-101 rapidly changing, in between all of those numbers.. but when I open up the stats bar I'm getting upper 200's low 300's so wondering why that is still new to c# so be easy on me lol. heres the code thanks in advance as always ^_^. float deltaTime = 0.0f; void Update() { deltaTime += (Time.deltaTime - deltaTime) * 0.1f; } void OnGUI() { int w = Screen.width, h = Screen.height; GUIStyle style = new GUIStyle (); Rect rect = new Rect (0, 0, w, h * 2 /

Doing an Android FPS counter

妖精的绣舞 提交于 2020-01-16 03:27:25
问题 I'm trying to do an FPS counter for any Android app. That means I don't have the source code for that app (I can't modify it or anything like that, I just have the .apk). I've researched a lot into this and I've found only one app that does this (it's called Game Bench, you can find it on Google Play), so it is possible somehow. When the app starts, it has a list with all the games on your phone, you choose one and Game Bench automatically starts it and calculates the FPS. I need a similar

16.66ms frames times. How do you get a perfect 60 fps when sleep() only goes by whole milliseconds?

戏子无情 提交于 2020-01-15 13:35:32
问题 I enjoy making little games in C++ and Java, but something has always bothered me, and I've never quite understood how to remedy it. Sleep in C++ and Java only works in milliseconds. Meaning that if you do startTime=clock(); -------Execute everything in that frame----- endTime=clock(); sleep(x-(endTime-startTime)); if x is 16 you get 62.5 frames per second if x is 17 you get 58.8 frames per second Neither of which is that perfect 60 to fit a monitor's refresh rate. But I've noticed some games

Why is CGLFlushDrawable so slow? (I am using VBOs)

好久不见. 提交于 2020-01-15 10:40:24
问题 My application details: Running on : Macbook pro with 4GB RAM, ATI Radeon X1600 with 128MB VRAM, Opengl version: 2.1 ATI-7.0.52 Using vertical sync (via CVDisplay) : YES Programming Language: Lisp (Lispworks) with FFI to Opengl Pixel Format information ns-open-gl-pfa-depth-size 32 ns-open-gl-pfa-sample-buffers 1 ns-open-gl-pfa-samples 6 ns-open-gl-pfa-accelerated 1 ns-open-gl-pfa-no-recovery 1 ns-open-gl-pfa-backing-store 0 ns-open-gl-pfa-virtual-screen-count 1 [1 = YES, 0 = NO] for boolean

Show frame rate in DDMS

早过忘川 提交于 2020-01-13 03:38:11
问题 As I wanted to compare several apps according to their graphics performance, I wanted to measure the frame rate for each app. In DDMS I discovered a tab "System Information" where I can choose "CPU load", "Memory usage" or "Frame render time". When I select the first two options a graph gets displayed on the right. But for "Frame render time" somehow I get no data displayed (of course I already tried to click the button "Update from Device" but that didn't change anything). I found no

How to change framerate when using MediaRecorder Class

强颜欢笑 提交于 2020-01-12 05:21:46
问题 I try to record video using MediaRecorder Class. However I find out that I failed to lower the framerate of the video stream. I'm using H.264 as my Video Encoder and AAC as my Audio Encoder(yes, it is supported in API LEVEL 10 and above, AKA Android 2.3.3+) The main source is as follows. recorder = new MediaRecorder(); recorder.setPreviewDisplay(surfaceHolder.getSurface()); recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); recorder.setAudioSource(MediaRecorder.AudioSource.MIC); //set

Python OpenCV video.get(cv2.CAP_PROP_FPS) returns 0.0 FPS

左心房为你撑大大i 提交于 2020-01-03 08:46:12
问题 This is my video This is the script to find fps: import cv2 if __name__ == '__main__' : video = cv2.VideoCapture("test.mp4"); # Find OpenCV version (major_ver, minor_ver, subminor_ver) = (cv2.__version__).split('.') if int(major_ver) < 3 : fps = video.get(cv2.cv.CV_CAP_PROP_FPS) print "Frames per second using video.get(cv2.cv.CV_CAP_PROP_FPS): {0}".format(fps) else : fps = video.get(cv2.CAP_PROP_FPS) print "Frames per second using video.get(cv2.CAP_PROP_FPS) : {0}".format(fps) video.release()

How is gamebench implemented to calculate the FPS of unity3d games?

最后都变了- 提交于 2020-01-03 03:48:05
问题 How does Frame per second of the unity3d game engine on android mobiles captured using gamebench Tried using the gfxinfo over adb commands, doesnt help much ? Need more help how to calculate the FPS of unity3d games on Android ? 回答1: My guess is that it uses these commands [programmatically]: (1) adb shell dumpsys SurfaceFlinger --latency-clear (2) adb shell dumpsys SurfaceFlinger --latency <window name> e.g., adb shell dumpsys SurfaceFlinger --latency com.android.settings/com.android

How to set expected framerate to AVAssetWriterInput

戏子无情 提交于 2020-01-02 07:41:30
问题 I have an app which encodes videos in different ways and saves it to Photos library - it can cut specific time range, add pictures, text, etc. Everything is working perfectly till I try to encode video 120+ fps. The problem is that video appears to be slow-motioned and I don't pursue that goal at all. Here I found out about property for AVAssetWritterInput which is called AVVideoExpectedSourceFrameRateKey , but the problem is that when I try to apply this parameter to my AVAssetWritterInput ,

Pydub - How to change frame rate without changing playback speed

删除回忆录丶 提交于 2020-01-02 05:43:46
问题 I have a couple audio files that I open in Pydub with AudioSegment . I want to decrease the audio quality from frame rate 22050 to 16000 Hz. (One channel files) If I simply change the frame rate of AudioSegment, what I get is the exact same wave played in slower speed. Well, fair enough. But how do I actually change the waves to fit a lower quality, same speed playback? (Manual interpolation is the only thing I can think of, but I don't want to get into that trouble) 回答1: You can use: sound =