duration

Duration with daylight saving

梦想的初衷 提交于 2019-12-10 10:55:40
问题 I have an object Shift , with two fields: startDateTime and endDateTime as DateTime from Joda-Time. And my shift includes Daylight Saving UK change. It starts on 25/03/2017 13:00 and ends on 26/03/2017 02:00 (basically should end on 26/03/2017 01:00 , but this date does not exists, and endDate is shifted +1 hour). According to this site: When local standard time was about to reach Sunday, 26 March 2017, 01:00:00 clocks were turned forward 1 hour to Sunday, 26 March 2017, 02:00:00 local

How can i know the duration of any h264 file?

牧云@^-^@ 提交于 2019-12-10 08:24:30
问题 I have one file in which only h264 frames are there in form of NAL unit. So now is there any method so i can count the duration of that file? I dont know how many frames are there in file. I have only file size. PS: All i want to do is in C language and on Linux platform. 回答1: Your question is meaningless, that's why someone down vote you. Container file First, there is no such a thing as H264 file . There can be a container file (MP4, AVI, MKV) that holds the H264 encoded video. That

how to convert minutes to days,hours,minutes

那年仲夏 提交于 2019-12-10 01:45:57
问题 how to convert minutes into days hours and minutes in java ( we have a week here , 7 days ) public String timeConvert(int time){ String t = ""; int h = 00; int m = 00; // h= (int) (time / 60); // m = (int) (time % 60); // if(h>=24) h=00; if((time>=0) && (time<=24*60)){ h= (int) (time / 60); m = (int) (time % 60); }else if((time>24*60) && (time<=24*60*2)){ h= (int) (time / (1440)); m = (int) (time % (1440)); }else if((time>24*60*2) && (time<=24*60*3)){ h= (int) (time / (2880)); m = (int) (time

Video selection from gallery: Limit only videos up to 30 seconds should be selected

ぃ、小莉子 提交于 2019-12-09 20:53:12
问题 How can I control videos up to 30 seconds should be selected else show Toast/Popup. I can get video's path in onActivityResult and can run video but can't get duration. Any suggestion, below is my code: case Utils.REQUEST_CODE_GALLERY_VIDEO: if (resultCode == Activity.RESULT_OK) { Uri selectedVieo = data.getData(); String[] filePathColumn = { MediaStore.Video.Media.DATA }; Cursor cursor = getContentResolver().query(selectedVieo, filePathColumn, null, null, null); cursor.moveToFirst(); int

While using iphone PhotoLibrary, Restrict user to select any video file more than duration of 60secs?

两盒软妹~` 提交于 2019-12-08 13:02:37
问题 Is there any method available to check video file duration as soon as user select Video from iPhone photo library ? And restrict user to select if that video file is more than 60secs 回答1: imagePickerController.videoMaximumDuration = 60.0f; // limits video length to 60 seconds. where imagePickerController is object of UIImagePickerController. Using videoMaximumDuration method you can restrict length of video from both ways. Like if you are recording video an alert will popup saying you cannot

iOS- how to get the duration of .mp4 file by using AVAsset or AVURLAsset

試著忘記壹切 提交于 2019-12-07 06:14:01
问题 i know duration of video type questions have been answered before but i am facing real trouble in getting duration of an .mp4 file by using AVAsset and by AVURLAsset . i am using Following code NSString *itemPathString = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)objectAtIndex:0] stringByAppendingPathComponent:obmodel.actualname]; NSURL *itemPathURL = [NSURL URLWithString:itemPathString]; if([[NSFileManager defaultManager] fileExistsAtPath:itemPathString]

Android video.duration does not load until video.play()

末鹿安然 提交于 2019-12-07 03:15:19
问题 I have an html5 video which I am trying to set up callbacks at certain intervals during playback. The video starts playing from javascript with video.play() . Right now my code listens for the 'loadedmetadata' event, then queries the duration and sets up those callbacks. Works fine on mobile safari, but not on Android (2.3.4 and 2.3.7). On Android, 'loadedmetadata' seems to be emitted before the duration is actually available. To test this, I logged the duration at every step of the loading

How exactly do Firebase Analytics handle session duration / timeouts?

♀尐吖头ヾ 提交于 2019-12-07 02:09:18
问题 I'm implementing some basic usage statistics for the first time in an Android/iOS app using Firebase Analytics, but the docs seem a little ambiguous to me on how exactly session durations are calculated and how sessions are timed out, and the 24-hour cycle for seeing results does not help in understanding by trial-and-error. I'm only interested in a very simple statistic for now - the time users spend in the app. What exactly happens when the app is "minimised"/"in the background" - does that

Duration with daylight saving

不羁的心 提交于 2019-12-06 11:33:54
I have an object Shift , with two fields: startDateTime and endDateTime as DateTime from Joda-Time. And my shift includes Daylight Saving UK change. It starts on 25/03/2017 13:00 and ends on 26/03/2017 02:00 (basically should end on 26/03/2017 01:00 , but this date does not exists, and endDate is shifted +1 hour). According to this site : When local standard time was about to reach Sunday, 26 March 2017, 01:00:00 clocks were turned forward 1 hour to Sunday, 26 March 2017, 02:00:00 local daylight time instead. Now if I want to track the number of hours worked by a employee new Duration

Given a URL to a movie, how can retrieve it's info?

假如想象 提交于 2019-12-06 11:16:30
Under iOS, I need to get the codec used to make the move (H.264, MJPEG and so on), the movies' width and height, the file size, and the number of frames in the movie. I tried using AVAsset for the movie duration and such but the duration was always zero. Same for the width/height. I also tried using a movie player controller but that did not work either (see code below). The docs are a bit confusing and with multiple ways of getting to the same place you can't seem to get to the same spot. Has anyone got the above information working properly? I am sure I am missing a few things but I was