timelapse

How to drop frames while recording with MediaCodec and InputSurface?

…衆ロ難τιáo~ 提交于 2020-01-06 19:27:55
问题 In my Android app I want to record a video with Time-lapse. I have an InputSurface -> MediaCodec (encoder) -> MediaMuxer. But if I want to speed up the video (for example: x3), I get the resulted video with very high framerate. For example: with normal speed I get video 30fps. If I speed up (x3), I get the video 90fps. Since the framerate of video is high, the video player of my phone cannot play the video normally (The video player of computer plays the video well without any problem). So I

mp4parser-Appending different mode videos

假如想象 提交于 2019-12-24 14:37:04
问题 I tried this library for appending videos-mp4parser ..it works fine for appending same mode videos..but i want to append different mode videos-time lapse and normal mode video..How should i proceed in tht?I tried below code for merging videos in Vid directory which works fine if all videos are in same mode but fails to append if videos are of different mode. public class MergedVideo extends AsyncTask<Void, Integer, String> { @Override protected void onPreExecute() { } ; @Override protected

javascript - elapsed minutes between two times

。_饼干妹妹 提交于 2019-12-23 03:39:19
问题 I have an application that requires the elapsed minutes between two times. Eg: 9:00 to 10:00 is sixty minutes. This is the solution that I worked out, but it seems excessively verbose. Can I do better? EDIT: I receive strings in the format of YYYYMMDD and HHMM or HMM from a remote system. // define a start time and end time as string var start_time ="830"; var end_time ="1930"; // make sure we have complete 4 digit time start_time = ('0' + start_time).slice(-4); end_time = ('0' + end_time)

Nullpointerexception if try to record video again after cancelling

。_饼干妹妹 提交于 2019-12-11 16:32:28
问题 I have integrated camera which allows user to record time lapse videos.When the user is recording a video a cancel button is there which allows user to cancel the current recording.My issue is that if after cancelling i try to record again i get the following exception- java.lang.NullPointerException: Attempt to read from field 'int android.media.CamcorderProfile.fileFormat' on a null object reference at android.media.MediaRecorder.setProfile(MediaRecorder.java:423) at xyz.fragments

javascript - elapsed minutes between two times

限于喜欢 提交于 2019-12-06 16:53:54
I have an application that requires the elapsed minutes between two times. Eg: 9:00 to 10:00 is sixty minutes. This is the solution that I worked out, but it seems excessively verbose. Can I do better? EDIT: I receive strings in the format of YYYYMMDD and HHMM or HMM from a remote system. // define a start time and end time as string var start_time ="830"; var end_time ="1930"; // make sure we have complete 4 digit time start_time = ('0' + start_time).slice(-4); end_time = ('0' + end_time).slice(-4); // extract start minutes and seconds start_hour = start_time.substring(0,2); start_minute =

iOS Frame by Frame video playback forward/backward

淺唱寂寞╮ 提交于 2019-12-01 06:20:35
问题 I'd like to show a video on an iOS device in slow motion. My view contains a video (~2 seconds long) and a slider. The user can move the slider and step (forwards and backwards) through the movie frame by frame. MPMoviePlayerController lacks the ability to step frame by frame. I read about MVAssetReader , but I have no concrete idea how to use this. I don't have a fixed framerate, so it should take this information out of the metadata of the video. I really need to show every frame. Can

How can I quantify difference between two images?

蓝咒 提交于 2019-11-26 01:09:47
问题 Here\'s what I would like to do: I\'m taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much looks the same, I don\'t want to store the latest snapshot. I imagine there\'s some way of quantifying the difference, and I would have to empirically determine a threshold. I\'m looking for simplicity rather than perfection. I\'m using python. 回答1: General idea Option 1: Load both images as arrays (

How can I quantify difference between two images?

青春壹個敷衍的年華 提交于 2019-11-25 23:08:45
Here's what I would like to do: I'm taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much looks the same, I don't want to store the latest snapshot. I imagine there's some way of quantifying the difference, and I would have to empirically determine a threshold. I'm looking for simplicity rather than perfection. I'm using python. General idea Option 1: Load both images as arrays ( scipy.misc.imread ) and calculate an element-wise (pixel-by-pixel) difference. Calculate the norm of the