I need a solution because I don't know how to start doing this. I need to create a short video analysis. Exactly the possibility of drawing on this video. So while playing the movie, I can stop it and draw, for example, lines. This line overlaps the film. It is IMPORTANT that, for example, a line that will be superimposed on the 20 second and erased at the 25 second of the film and saved. It is after the video has been played that after analysis, this line will appear in 20 seconds and disappear 25 seconds. Often it will be a slow motion movie so it's important that the lines do not jump over time.
I am looking for a solution on Xamarina, but if it is active, I will try to rewrite it. Maybe there are some libraries?
Related
I have a SurfaceView and I'm displaying a live stream (RTSP) in it.
Everything is fine except, most of the time, during the first seconds or minutes of playback there is a gray noise/overlay which either disappears completely all at once or gradually clears (starting at the spots where some motion takes place in the picture - see the attached screenshots below).
I'm pretty sure it is not an android issue as the same thing happens even if I watch the stream using VLC on my PC, but judging from the way the noise clears, I have a feeling there should be a way I could programmatically "clear/refresh" the picture.
Do you have an idea how that could be accomplished?
this is the stream: rtsp://193.40.133.138:80/live/juras-erglis
Here are some screenshots, how the picture clears progressively:
Looks like you're missing an initial key frame, so the deltas are being performed against the initial buffer contents. Once enough time passes or enough motion occurs, the encoder emits another key frame and you get in sync.
Satellite and digital cable TV systems typically send a key frame 2x per second, so that you never have to wait more than half a second to sync up with the video stream. I don't know if there's much you can do except put up a "waiting for sync" message.
Wikipedia has some background.
We're building a simple Android app where user can create a collage of images and video and then export it as a single video. Our current code on 16, 17 is very slow. So imagine if we have 6 videos 1 min long (each) it take us about 15min to combine them -- when they are playing one after another -- and about 7 mins when they are working simultaneously. I want to bring it to maximum of twice the total length of the video. So, for last example 2 min when playing simultaneously and 12 mins when playing one after another.
We've tried some software libraries like FFMPEG without any help. Probably we should go hardware decoding route. For which probably we should mess up with NDK. I found this article https://vec.io/posts/faster-alternatives-to-glreadpixels-and-glteximage2d-in-opengl-es that is helpful. But I need some help on it ....
I want to put some animations on my activities when they open and close. But so far if i put them on it just makes it feel like the phone is lagging. And if I speed them up then you barely notice them.
What is the smallest time fragment which the average human can identify to? 50ms 100ms?
How can I make an animation noticeable, but not take away from the responsiveness of the application? Because obviously the animations them selves probably slow down the app allot.
Maybe Im asking a stupid question, If so I am sorry. But I thought that it is a fairly important aspect of designing a gpood app.
http://en.wikipedia.org/wiki/Frame_rate says:
"The human eye and its brain interface, the human visual system, can process 10 to 12 separate images per second, perceiving them individually."
The 1896 standard movie frame rate was 16 fps. Today it is at least 24 fps.
I also remember the rate 18 events per second, not sure if it was MS-DOS or old TV.
The car driver's reaction time is estimated to be about 0.2 sec. (In the case that the driver is prepared to react.) This means that if something happens faster, a human has no time to move, despite of seeing it.
You can base your design on these digits.
I am developing a game for Android and the Desktop with LibGDX. I am having a problem with playing sounds. The game is a labyrinth style game, there are balls that roll around on the device using the accelerometer. When balls hit the border, or one another a sound is played. The volume is set based on the linear velocity of the collision. The problem is, when the balls get really close to the border, they bounce many times in a small period of time. This ends up bogging down the main thread, and the UI starts to stutter. In log-cat it says "reducing sample rate" or something like that, because it can't handle the load. Also, when there are a bunch of collisions, the sounds keep playing after there aren't anymore collisions.
I need each of the sounds to be played independently of the other sounds. I was thinking, maybe creating a separate thread for the sounds. Any help would be greatly appreciated.
I working now with the sounds of my game. The last LibGDX version works fine playing a lot of sounds simultaneously. All you need to do is, if you plan to play them on the same time is control the number of maximum sounds played (more sounds requires more resources of the device) and reduce the sample rate and quality of the most played. You can resample your sound with Audacity. Try to save it as a OGG file with less quality and try again. Also, you can create your sound as static and play it many times from the same sound without create a new one.
Hope this helps you.
I am using the AudioTrack class and have generated my own tones in my Android application. However, I want to be able to control the speed of playback, and I can't figure out how.
I see the setLoopPoints method but that doesn't seem to do what I want (if anyone has used it and can explain that method to me that would be great, the api documentation doesn't help me much).
What I want to do:
As a point (here, a touch on the screen) gets closer to a target on the screen, I want to increase speed of the tones I'm generating. For example, farther away I would, say, have the tone playing 1 time in 1 second, but very close to the target, 5 times in 1 second. I am struggling to find out the best way to do this with Android sounds (generated tones or even .wav files saved to my res/raw).
Any help would be much appreciated!
Shani
You want to use the setPlaybackRate method for this:
http://developer.android.com/reference/android/media/AudioTrack.html
in conjunction with setLoopPoints. However, I believe there is probably a limit to how much you can speed up the file's "natural" playback rate, and the limit is probably 48 kHz (I'm not sure, though, and it may be device-dependent).
So, if you have a file that was recorded at, say, 8000 Hz, to get the effect you want you would set the loop count to 4 (so that it plays 5 times in a row) and set the playback rate to 40,000 (5 * 8000).
Since there is (probably) an upper limit to playback rate, your best approach might be to instead record the original sound at a high frequency, and slow down the playback as necessary to achieve the effect you want.
Update: setLoopPoints lets you specify two arbitrary locations within the file, such that when playback reaches the end looppoint the audio engine will wrap back around to the start looppoint. To loop the entire file, you would set the start looppoint to 0 and the end looppoint to the last frame in the file (the size of each frame is dependent upon the file's format - so a stereo file using 2 bytes per sample would have a frame size of 4, so the last frame is just the size of the audio data in bytes divided by 4).
To get 5 consecutive plays of your file, you would set the loop count to 4 (loopcount of 0 means the file plays once; -1 means it will loop forever).
Update 2: just read the docs some more - the upper limit for setPlaybackRate is documented as twice the rate returned by getNativeOutputSampleRate, which for most devices is probably 44,100 or 48,000 Hz. This means that a standard CD-quality WAV file can only be played back at twice its normal speed. A 22,050 Hz file could be played back at up to 4 times its normal speed, etc.