View Full Version : Time to frames calculator v1.2
xbox360
2nd February 2010, 10:32
Time to frames calculator
I recently had a project that required the use of blankclip(), the problem was it accepted frames as input. So I created a calculator to speed up this calculation process of converting time to frames. Enjoy ! & please give feedback. Thank you.
v1.2
- tabbing is now in order
- GUI is now smaller
- Frames are now rounded up
v1.1 accepts 29.97 or 23.97
http://www.mediafire.com/?ituznwtmnzt
Mac OS X Version Now Available !
Download:
http://www.mediafire.com/?gywygytzkem
IanB
2nd February 2010, 11:52
Or you could subsume the logic into your script.Duration=12.34 # Seconds
Rate=25.0 # Frames per second
Frames=Ceil(Duration*Rate)
BlankClip(Length=Frames, FPS=Rate)
...
xbox360
3rd February 2010, 04:35
v1.1 now available for download.
b66pak
3rd February 2010, 18:43
i tried with 1 hour @ 25 fps as input and it returns 90001 frames witch is 1 hour and 40 ms...
_
wonkey_monkey
3rd February 2010, 21:16
I don't mean to be critical (not in a nasty way, anyway), but that's a bizarre UI. It's absolutely huge, tabbing is out of order, and there's no title bar, so I'm stuck with the window in the centre of my screen. Also, the FPS box isn't big enough to write "23.976", which is the usual shorthand for 24000/1001.
The worst problem to me, though, is that you've taken software bloat to hitherto unimaginable levels. For what this does, it's at least 100* times too big. I know the world's gone broadband, but 4mb? That's crazy.
Edited to add: it also consumes 32mb of RAM once loaded!
Edited again to remove a slightly ironic miscalculation :o
David
Alex_ander
4th February 2010, 09:58
Womble is my favourite tool for this. When you select 'location and duration' for any clip on timeline, that 'calculator' appears. You can use it by typing source value (without bothering about colon separator between numbers, the cursor skips it while you type) and switching into target form of timing (there are 3 different forms, selected in checkbox: seconds - time code - frame count) for reading the result. It would be nice if you managed to make a similar standalone.
a451guy451
5th February 2010, 18:21
Can you make it work in reverse? Meaning, input a number of frames with a framerate convert to H:M:S?
xbox360
7th February 2010, 06:31
I will try to fulfill all your request, maybe next week Sunday v1.2 will be completed. Also did you know I used Flash CS4 to programe it ?
mariush
7th February 2010, 08:31
I don't mean to be critical (not in a nasty way, anyway), but that's a bizarre UI. It's absolutely huge, tabbing is out of order, and there's no title bar, so I'm stuck with the window in the centre of my screen. Also, the FPS box isn't big enough to write "23.976", which is the usual shorthand for 24000/1001.
The worst problem to me, though, is that you've taken software bloat to hitherto unimaginable levels. For what this does, it's at least 100* times too big. I know the world's gone broadband, but 4mb? That's crazy.
Edited to add: it also consumes 32mb of RAM once loaded!
Edited again to remove a slightly ironic miscalculation :o
David
I hope 24 KB is enough for you... Could have made it in 4 if compressed to UPX:
http://savedonthe.net/download/163/Calculator.html
source code included, just a bit of vb 6 coding right now for fun
http://savedonthe.net/image/521/Clipboard03.png
And by the way, MeGUI has this included in Bitrate Calculator.
wonkey_monkey
7th February 2010, 12:58
I hope 24 KB is enough for you... Could have made it in 4 if compressed to UPX:
Damn! I could only get it down to 6 ;(
Not sure how it works in VB, but if you add this command to run occasionally (in C, anyway), you could keep the RAM usage down ;)
SetProcessWorkingSetSize(GetCurrentProcess(), (SIZE_T)-1, (SIZE_T)-1);
David
Midzuki
7th February 2010, 14:10
@ mariush:
MessageBox [ Window.Caption == Project1 :rolleyes: ]
Class not registered.
You need the following file to be installed on your machine:
MSSTDFMT.DLL
P.S.: I'm glad to see the default VB icon hasn't changed since the days of the old and good "VB40032.DLL" :D
ANGEL_SU
7th February 2010, 14:29
a nice tool, but i cannot copy the result into the clipboard. Could improve this?
mariush
7th February 2010, 17:23
I'm surprised people actually would need this, as i said MeGUI already had this in Bitrate Calculator option in the menu.
http://savedonthe.net/download/165/CalculatorFrames2.html
I managed to get it down to 7168 bytes, with the sacrifice of not showing the classic vb icon in Windows explorer. It's possible to strip the VERSION_INFO and the icon to reduce it even more...
Well, anyways, it's kind of pointless. If you want to make something official, you'd have to include the VB6 runtime which is 1.4 MB or about 750KB compressed with UPX. Sure, it's pre-installed in Windows XP and later versions but there's still a minute number of people using Windows 2000 or Windows 98.
http://savedonthe.net/image/522/Clipboard01.png
b66pak
7th February 2010, 18:36
Can you make it work in reverse? Meaning, input a number of frames with a framerate convert to H:M:S
@mariush i second that...also adding milisecons will be nice...
_
mariush
7th February 2010, 19:25
http://savedonthe.net/download/166/CalculatorFrames3.html
ms field added, and you can type now the number of frames and it will adjust the time based on the fps selected
minor nitpick: if you pick for example 10 seconds and 59.94 fps, the program will compute 993 frames but will also automatically go the other way and adjust the time to 9s 993 ms (which is correct but maybe user doesn't want).
I'm too lazy to make it in such way as to not adjust the time.
http://savedonthe.net/image/523/Clipboard04.png
Emulgator
7th February 2010, 19:27
What about this one:
http://www.mediachance.com/dvdlab/freetime.htm
b66pak
7th February 2010, 19:31
thanks a lot...now a "copy time to clipboard" button will be nice...
_
mariush
7th February 2010, 20:06
in what format, h:m:s.ms or x hours, y minutes, 10 seconds...
a451guy451
7th February 2010, 20:13
Lol. Okay, so if this smaller tool is better, can I request that you add the ability to convert in reverse as well; set a # of frames, select an FPS, convert to H:M:S:MS? Also, has drop frame vs. non-drop frame been taken into consideration at all? Thnx
mariush
7th February 2010, 20:30
see my posts dude... and why would you want to drop frames?
wonkey_monkey
7th February 2010, 20:38
Also, has drop frame vs. non-drop frame been taken into consideration at all? Thnx
Isn't that taken care of with the 29.97/30fps options?
David
a451guy451
8th February 2010, 00:59
True. Forgot it deals with ms in timecode and not frames.
a451guy451
8th February 2010, 01:00
see my posts dude... and why would you want to drop frames?
Missed that, but see it now.
xbox360
8th February 2010, 13:12
v1.2 is now available !
b66pak
8th February 2010, 17:02
in what format, h:m:s.ms or x hours, y minutes, 10 seconds...
h:m:s.ms
_
mariush
15th February 2010, 21:51
updated on request...
http://savedonthe.net/download/170/CalculatorFrames20100215.html
http://savedonthe.net/image/526/Clipboard01.png
by default it copies 0:12:3.100 , if you check "padded" it copies 00:12:03:0100.
laserfan
15th February 2010, 22:16
The 23.976 radio button results in wrong ms, but one can select "Custom" and enter 23.976023976 and then it's accurate.
Would also be useful if it worked the other way (enter time get frame).
mariush
15th February 2010, 22:26
Most programs show in their interface 23.976 so I've used this number when doing the computations... I think it's close enough.
If you need more precision you can change the included source code to use 24000 / 1001 instead of a rounded number. Or you can use the custom field as you already found out.
b66pak
16th February 2010, 19:06
for 241 frames @ 24000/1001 i get:
0:0:10.52
00:00:10.0052 (padded)
it should be:
0:0:10.052
also i think its correct to switch to 24000/1001, 30000/1001 and 60000/1001 or at least make the custom field accept strings like "24000/1001"...
_
mariush
17th February 2010, 03:04
Ok... seems this little tool I made for fun in 10 minutes is actually used by people... so I updated it..
http://savedonthe.net/image/528/calculator.png (http://savedonthe.net)
* fixed the ms thing, don't know why I made it with 4 numbers
* changed all non integer frame rates to their exact values
* added rate / scale option to type directly
* added option to auto copy to clipboard the value
* added option to keep window always on top
Let me know if you need anything else.
Link: http://savedonthe.net/download/171/CalculatorFrames20100216.html
a451guy451
19th February 2010, 21:13
Thanks a million for the tool. It is indeed very useful.
xbox360
2nd July 2010, 08:23
Mac OS X Version Now Available !
Download:
http://www.mediafire.com/?gywygytzkem
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.