frame-rate

AS3 - How much time until next frame / screen draw

北城以北 提交于 2019-12-06 15:22:29
I have a generative art app, and I'd like it to draw as many cycles as possible each frame without reducing the framerate. Is there a way to tell how much time is left until the screen updates/refreshes? I figure if I can approximate how many milliseconds each cycle takes, then I can run cycles until the amount of time left is less than the average or the peak cycle time, then let the screen refresh, then run another set of cycles. If you want your app to run at N frames per second, then you can draw in a loop for 1/N seconds*, where N is typically the stage framerate (which you can get and

Processing / C920 logitech capture frame rate video discourse

依然范特西╮ 提交于 2019-12-06 13:00:47
问题 I'm developing on Processing 2.0b, and i just bought a C920 logitech webam for a good capture quality. Then I try to capture at 1920 x 1080 , the problem is that I'm under 15 fps per seconds.. When I list all the devices availsable to capture, the program write: Some size and fps ... -[61] "name=HD Pro Webcam C920,size=1024x576,fps=5" -[62] "name=HD Pro Webcam C920,size=1024x576,fps=30" -[63] "name=HD Pro Webcam C920,size=1280x720,fps=5" -[64] "name=HD Pro Webcam C920,size=1280x720,fps=30" -

Cocos2d on application start gives random fps drop?

一个人想着一个人 提交于 2019-12-06 12:04:53
I am developing an iphone game using cocos2d and have it set to to show the FPS. Now most of the time the application will start and run at 60 fps, However apparently randomly sometimes the application will start and top at only 40 fps. This does not happen often and seems to happen only when you quit the application and restart it as soon as possible, allthough this does not trigger the effect most of the time. But after a few quick quit-restart sequences the game eventually starts and has only 40 fps instead of the normal 60. If I quit the application at this point and wait for about 3

Does Box2D Physics rely on the framerate?

谁说我不能喝 提交于 2019-12-06 09:28:58
I am making a 2D sidescroller game for Android and am thinking of using Box2D for the physics. I would like to know if when using Box2D, if the framerate of the device drops from 60 fps (Android's cap) to, for example, 30 fps will all the physics slow down with it? To elaborate, I'm going to be using real-time online multiplayer and so the framerate cannot be relied upon as a constant. So if one of the devices in the multiplayer game is running at 60 fps and another is at 30 fps and an object should be moving at 10 metres/second will it move at 5 metres/second on the slower device? I would

Debugging low FPS in Three.js

余生颓废 提交于 2019-12-06 07:51:13
问题 I'm working on a Three.js WebGL scene and am noticing 60 FPS when I'm zoomed out so that all observations (~20,000 triangles) are in view, but very low FPS when I'm zoomed in so that only a small subset of the triangles are in view. I'd like to figure out what's causing this discrepancy. My intuition is that the opposite would be true: I'd assume when the user is zoomed in the near and far clipping planes would remove many triangles from the scene which would increase FPS. I want to figure

Change video playback rate dynamically in Flash

ぐ巨炮叔叔 提交于 2019-12-06 07:08:05
问题 I'm looking for a way to allow a Flash Video to change speed smoothly, from slower to faster than original framerate. It only needs to work on a Windows PC, and the latest version of Flash 10.2 with Stage Video is available. 回答1: Flash Media Server provides a 'trick play' mode that facilitates some of those features. Check out NetStream.step() and have a look at these links: http://aspexamples.adobe.com/flash/streamreconnect.html http://blogs.adobe.com/actionscriptdocs/2010/06/flash_media

Can I create a VFR video from timestamped images?

妖精的绣舞 提交于 2019-12-06 05:59:16
问题 First, I have almost zero experience in making videos from images. What I have is a set of BMP timestamped images from which I want to generate a video. Since the timestamps are not equally spaced, I cannot simply use software that create constant-frame-rate videos from images. A possible solution would be to create artificial images at fixed time intervals, but I prefer to leave that as a last resort if I fail to make a VFR video. Any suggestions on how to achieve what I want? 回答1: You can

Frame Capture using Matrox Commands

雨燕双飞 提交于 2019-12-06 01:54:19
I'm working on a project where I have to set the fps of a video stream (as 10) from a camera and grab a frame every 5th frame. I'm working on a program that has already been half written by someone else. The thing is, they have used Matrox Framegrabber dlls. There is also Matrox Frame Grabber on the device. But I cant find any commands for framegrab in C#. I found the following code for C++. MIL_ID MdispAlloc(SystemId, DispNum, DispFormat, InitFlag, DisplayIdPtr) where MIL_ID SystemId; System identifier long DispNum; Display number char *DispFormat; Display format name or file name long

Limiting fps with std::chrono

心不动则不痛 提交于 2019-12-06 00:43:49
std::chrono::system_clock::time_point m_BeginFrame = std::chrono::system_clock::now(); std::chrono::system_clock::time_point m_EndFrame = std::chrono::system_clock::now(); std::chrono::nanoseconds m_WorkTime = std::chrono::nanoseconds::zero(); std::chrono::nanoseconds m_WaitTime = std::chrono::nanoseconds::zero(); auto invFpsLimit = std::chrono::nanoseconds(1e9 / fpsLimit()); // main loop while (!glfwWindowShouldClose(m_pScreen->glfwWindow())) { m_WaitTime = m_BeginFrame - m_EndFrame; m_EndFrame = std::chrono::system_clock::now(); m_WorkTime = m_EndFrame - m_BeginFrame; // if need sleep if (m

How to set expected framerate to AVAssetWriterInput

烂漫一生 提交于 2019-12-05 22:05:57
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 , I'm getting this error: *** Terminating app due to uncaught exception 'NSInvalidArgumentException',