frame-rate

Use MediaCodec to record 720p video but fps of encoding video is too low

喜夏-厌秋 提交于 2019-12-10 18:47:06
问题 I managed to write a video recording demo, my implementation is the same as ContinuousCaptureActivity of Grafika. In ContinuousCaptureActivity.java, The author create egl object in SurfaceCreated which run in UI thread and call drawFrame also in UI thread. He did 2 things in drawFrame, draw frame to screen and push data to encoder. See the code here: ContinuousCaptureActivity Because I set the encoding video size to 1280*720 which is large, the camera preview is not smooth and fps of target

Does Box2D Physics rely on the framerate?

末鹿安然 提交于 2019-12-10 10:48:03
问题 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

Ways of getting high FPS for real time computer vision processing

只谈情不闲聊 提交于 2019-12-10 10:38:09
问题 My goal is to get as high FPS as possible. I will be happy with BW small frames, but FPS should be maximum. getSupportedPreviewFpsRange on HTC WildFire S returns (9, 30). But when I try to draw preview image with most simple processing it visually get at about 12-15 FPS max. After setting Parameters and startPreview() method call I do this: camera.setPreviewCallback(new Camera.PreviewCallback() { @Override public void onPreviewFrame(byte[] bytes, Camera camera) { Bitmap bitmap = Bitmap

Cocos2d on application start gives random fps drop?

二次信任 提交于 2019-12-10 10:36:58
问题 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

Limiting fps with std::chrono

时光怂恿深爱的人放手 提交于 2019-12-10 10:24:07
问题 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

High CPU usage with XNA

孤街醉人 提交于 2019-12-09 04:55:29
问题 I just noticed today, that when I compile and run a new XNA 4.0 game, one of CPU threads is running at 100% and the framerate drops to 54 FPS. The weird thing is that sometimes it works at 60 FPS, but then it just drops to 54 FPS. I haven't noticed this behaviour before, so I don't know if this is normal. I uninstalled my antivirus and reinstalled XNA Game Studio, XNA Redistributable and .NET Framework 4. If I set IsFixedTimeStep to false, the game runs at 60 FPS and CPU usage is minimal (1-2

Generate (Poisson?) random variable in real-time

余生长醉 提交于 2019-12-09 01:16:37
问题 I have a program running in real-time, with variable framerate, e.g. can be 15 fps, can be 60fps. I want an event to happen, on average, once every 5 seconds. Each frame, I want to call a function which takes the time since last frame as input, and returns True on average once every 5 seconds of elapsed-time given it's called. I figure something to do with Poisson distribution.. how would I do this? 回答1: It really depends what distribution you want to use, all you specified was the mean. I

How to show FPS meter in Chrome on (Android) settop box?

 ̄綄美尐妖づ 提交于 2019-12-08 21:11:13
问题 I want to show video's FPS using HTML5 tag in Chrome on settop box(android) In Chrome 29, I can use chrome://flags/#show-fps-counter to use FPS meter. But latest Version(50.+), I can't find it any more. How to show FPS meter on android settop box? 来源: https://stackoverflow.com/questions/37781146/how-to-show-fps-meter-in-chrome-on-android-settop-box

low frame rate wpf on path scale animation (huge path data)

人盡茶涼 提交于 2019-12-08 17:36:24
can anyone tell me how can I animate a Path object with the huge amount of Data in WPF? here is a very simple code: <Window x:Class="WpfApp3.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:WpfApp3" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800" MouseWheel="MainWindow_OnMouseWheel"> <Grid> <Path StrokeThickness="1" Stroke="#FF000000"

Why does camera frame rate fluctuate when fusing another sensor?

元气小坏坏 提交于 2019-12-08 06:30:19
问题 I am a new baby in Android programming so that I am facing a problem related to videos when doing my research project. In the project, we would like to build an application which uses both videos recorded by a built-in front camera and acceleration sensed by a built-in accelerometer. My problem is that the frame rate of these videos usually fluctuates from 15 fps to 30 fps even though I have set the camera fixed at 30 fps in the source code. I tried to close the data stream of the