frame-rate

Getting timestamp of each frame in a video

淺唱寂寞╮ 提交于 2019-12-03 09:43:06
问题 I have recorded several videos from the front cam of my tablet with an Android 5.2 application I have written. I have stored the start timestamp in milliseconds (Unix time) for each video. Unfortunately each video has a different framerate (ranging from 20 to 30). With OpenCV I'm able to get the framerate for each video: import cv2 video = cv2.VideoCapture(videoFile) fps = video.get(cv2.CAP_PROP_FPS) This works well and theoretically I could just add 1000/fps (due to milliseconds) for each

How to implement SlowMotion and TimeLapse video recording using Camera API

大城市里の小女人 提交于 2019-12-03 09:32:33
Is there any way to implement Slow Motion and Time Lapse recording using Camera API? I tried using MediaRecorder setting VideoFrameRate , VideoBitRate VideoCaptureRate but nothing work for me. I have successfully implemented using JNI but i found it is taking too much time and not optimized as well. If you find any other solution available please help me. I solved it myself and i am sharing my working code piece , just using Camera API slow motion and timelapse are implemented Before start you must know definition of setCaptureRate(double fps) Set video frame capture rate. This can be used to

FPS testing in android application

邮差的信 提交于 2019-12-03 06:18:15
How can an android application developer test FPS (Frames per second) for their application? I'm talking about general application, not game. It can be on emulator or phone. I've been looking for this but have not found a way. It would be great, if any developer can shed light on this. As mention by Guykun and kcoppock, if you are only using the View widgets or Canvas you normally don't look for FPS to determine visual performance. As you don't mention what you are doing other than 'not a game' you may want to review how Android does drawing. http://developer.android.com/guide/topics/graphics

How to make timer for a game loop?

烈酒焚心 提交于 2019-12-03 05:06:29
I want to time fps count, and set it's limit to 60 and however i've been looking throught some code via google, I completly don't get it. You shouldn't try to limit the fps. The only reason to do so is if you are not using delta time and you expect each frame to be the same length. Even the simplest game cannot guarantee that. You can however take your delta time and slice it into fixed sizes and then hold onto the remainder. Here's some code I wrote recently. It's not thoroughly tested. void GameLoop::Run() { m_Timer.Reset(); while(!m_Finished()) { Time delta = m_Timer.GetDelta(); Time

Getting stuck at 40 fps even with using CADisplayLink?

随声附和 提交于 2019-12-03 04:49:37
At first I used NSTimer and ran into the problem of the frame rate being stuck at 40 frames per second. I've read about using CADisplayLink to fix the problem. It seemed to work for a while, but recently, the app starts at 60, then after a little while (about 5 - 20 seconds in) the app starts to run at 40 - 41 fps and gets stuck there. And I'm culling so that there's less draws when objects are out of view, but yet it stays stuck there. A unusual way that does seem to remedy the problem for a moment (about 10 seconds) is to disconnect the wire from the bottom of the iphone and then connect it

Fast Video Display WPF

一曲冷凌霜 提交于 2019-12-03 04:06:36
I am working on a WPF application that needs to display several video streams at a fast frame rate (we would like 30 fps). The video streams are 1920x1080 raw (RGB24) frames (they are stored in a System.Drawing.Bitmap). Does anyone have any ideas on how to achieve this? More details: Our previous attempts have used a standard WPF Image control, changing its source for each frame. This worked well for a single stream but now that we have to render multiple streams, it is slowing down. We have also tried using Direct2D to handle the drawing, using a D3D9 shared surface as the source for an Image

High CPU usage with XNA

跟風遠走 提交于 2019-12-03 03:54:32
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%). but as far as I know, this requires me to do velocity calculations using ElapsedGameTime, but I don

Linux: Screen desktop video capture over network, and VNC framerate

可紊 提交于 2019-12-03 03:37:54
问题 Sorry for the wall of text - TL;DR: What is the framerate of VNC connection (in frames/sec) - or rather, who determines it: client or server? Any other suggestions for desktop screen capture - but "correctly timecoded"/ with unjittered framerate (with a stable period); and with possibility to obtain it as uncompressed (or lossless) image sequence? Briefly - I have a typical problem that I am faced with: I sometimes develop hardware, and want to record a video that shows both commands entered

iOS AVCaptureSession - How to get/set the number of frames per second recorded?

拟墨画扇 提交于 2019-12-03 03:13:58
I'm new to AVCaptureSession and wish to better understand how to work with it. So I managed capturing the video stream as separated CIImages and convert them to UIImages. Now I wish to be able to get the number of Frames Per Second captured and preferably to be able to set it. Any idea how to do that? Ilanchezhian You could use AVCaptureConnection 's videoMinFrameDuration accessor to set the value. See the AVCaptureConnection documentation Consider output be AVCaptureVideoDataOutput object. AVCaptureConnection *conn = [output connectionWithMediaType:AVMediaTypeVideo]; if (conn

Show FPS in QML

◇◆丶佛笑我妖孽 提交于 2019-12-03 00:21:45
Is there a "simple" way to show the FPS (frame rate) in a QML/c++ application. All animations and views are done in QML and the application logic is in c++. I already tried setting QML_SHOW_FRAMERATE in Linux before starting the application but it didn't help: export QML_SHOW_FRAMERATE=1 You have to create your own FPS QQuickItem (or QQuickPaintedItem) and register in your main.cpp to be available in your QML code. Here an example. class FPSText: public QQuickPaintedItem { Q_OBJECT Q_PROPERTY(int fps READ fps NOTIFY fpsChanged) public: FPSText(QQuickItem *parent = 0); ~FPSText(); void paint