Why is the kinect presentation that slow on my computer? - c#

When using SimpleOpenNI and processing I had a smooth skeleton view, about 30fps. Using VC# and the skeletal tracking example it seems like about 10fps. As if something was blocking it.
Why is it that slow and how do I make it as fast as in processing?
pastebin.com/1La80sRU is the c# code basis - it is the original.

I have tried your code, and to me it seems fine. I am using an Xbox-360 Kinect and the FPS is just fine. It seems to stumble a bit when you are first detected, but that is expected since it then requires more data. A video of me doing this can be found here. It also seems that your Kinect needs to warm up (slower at beginning => gets faster later on). My video does not show that since I started recording after Kinect was warmed up.

Related

Using SharpAVI to record the screen, why is the .avi file playing back as if its sped up when I increase the FPS?

I'm working on a project where I need to record the desktop during an event started by the user. I found this code which has been really helpful, since I am new to C#.
However, when I increase the FPS in the Recorder Params in main, the outputted video file is sped up drastically. It seems to be speeding up in relation to how much you increase the FPS by.
I've tried to look into why this might be happening, but I can't find any documentation on SharpAVI or on Captura. Can anyone shed some light on why this might be happening? It would be really nice to be able to have a 30 FPS avi, and for the sake of learning, I'd really like to know whats going on.
If anyone is interested this is an issue i had. I found you have to timestamp each of the frames individually as the media player you are using doesnt know when to update the frame so by default just updates them as quickly as possible.

SteamVR creating loading screen flicker when recording using FFMPEG in unity

I have a heatmap plugin integrated in my Unity VR game(with SteamVR). The plugin uses eye tracking information to generate live heatmaps as the user gazes at different elements in the game. As the heatmaps are generated, the whole camera view(user's) is overlayed with heatmaps info and written to a MP4 file using FFMPEG.
The whole process works fine. But I have an annoying problem where during the recording the user's camera view is not stable and keeps flickering and stops only when the recording is stopped. It interrupts the smooth flow of his game
For now, I've narrowed down the code which causes the trouble,
public void Write(byte[] data)
{
if (_subprocess == null) return;
_stdin.Write(data);
_stdin.Flush();
}
From my understanding, It is in this part of the code stdinput is invoked to write to the file system. So, I surmise that the problem must be with accessing the file system which in turn must have caused some time delay when each frame is written in the update method. Correct me if i am wrong here.
The loading screen which appears during every frame write looks something like above. It interrupts the smooth flow of the game and also makes the recording useless as the user keeps focusing on the flicker rather than the actual objects of interest. I would really be grateful if someone shows light on the issue here?
Accessing the file system always takes a huge amount of time. Try offloading that work to another thread or a Coroutine.

Sony RemoteAPI delays after starting Liveview

Good worktime!
I'm writing C# warp around Sony Remote API, using Android test app as an example.
There became a problem with Liveview.
I start liveview streaming by the API method "startLiveview". Liveview data consumer works in a separate thread and it simply passes through frames if there's no time to draw them all (just like in the test app, as far as i understand).
However, after the startLiveview method is processed and fetching stream is started, the camera experience some difficulties with all other API commands processing in time.
E.g., after my warp discovers the camera and connects to it, performs startRecMode and so on, it can take pictures very fast. However, since liveview is started, the camera can't process all actTakePicture calls in time. There can be seconds or even dozens of seconds i have to wait before the shutter clicks.
I've tried to stop liveview before starting picture taking. It doesn't matter - stopLiveview command experiences the same problem, it takes even minutes to process it (there are minutes to return from System.Net.WebClient.UploadString).
I've tried to use startLiveviewWithSize instead of startLiveview and to pass the smallest size available (there is "M" with Sony A7R i'm using). No result.
What can i do to successfully stop the liveview or, as a max wish, to get rid of performance penalties when the liveview is on?
Thank you in advance!
p.S. Using MS VS 2010, .NET Framework 3.5, Sony ILCE Alpha 7R camera, all preprocessing settings found are switched off.

MediaElement - Video Gets out of Sync with Audio - WP7

I am using MediaElement in my wp7 project which plays the video from online stream (mp4 format)
Things seems working but sometimes I noticed that Video gets a bit quick like playing in fast mode for a while and that makes video a bit ahead of Audio.
So whats the reason, Should I use MediaStreamSource or should I use SmoothMediaElement?
I thought it might be due to there are some threads which are updating UI using "Dispatcher.BeginInvoke" so I tried stopping all of them but problem remains there so it can be due to slow network or something but it shouldn't be doing like this. :(
Please help.

C# audio library with smooth looping?

I'm looking for an audio library that works with .NET that allows for smooth looping. I've tried DirectX AudioVideoPlayback and Mentalis. Both are easy to use, but the looping skips a bit. I'm wondering if that's my fault or theirs. I have sound samples that I know can loop cleanly (WinAmp can do it fine) but I can't get my C# app to do the same. What library could I use, or what could I fix in my app to get it to loop cleanly with the libraries I have?
UPDATE: FMOD has been able to loop my audio, but the problem is that the .net wrapper I have only loads files one way. I can't play a sound effect more than once because they get disposed when playback finishes, and sometimes it hangs whenever a sound is supposed to be played. I know I could just reload the sound to play it again, but I don't want to hit the disk every time a gunshot is fired. Should I just reach into the C++ layer myself and skip the .NET wrappers?
You could try FMOD which is free for non-commercial use.
I would double-check that the sound really loops cleanly - specifically, that the first sample and the last sample are close (or equal), otherwise you'll hear a click. WinAMP could conceivably do some special processing to eliminate the click.
UPDATE: FMOD comes with a whole bunch of samples in C# that show the right way to do stuff. The example called "3d" shows, among other things, a cleanly looping sound. You should be able to rip out the code that handles the looping without utilising the 3D features.

Categories

Resources