Old 01-02-2016, 05:24 AM   #1
msmucr
Human being with feelings
 
Join Date: Jun 2009
Location: Praha, Czech republic
Posts: 590
Default Timecode Overlay video FX

Hi,

for first time I played little bit with v5 video processor, while thinking about some useful feature for me.
I came with small modification of included title overlay preset for timecode (HH:MM:SS:Frame) insertion. Default knob values should be at reasonable start point, but you can tweak it, as you need.
AFAIK besides basic things, there isn't much other variables available to video processor, so if you use for example project start offset, it has to be set manually using video FX parameters, but you can offset it, how you like.
Also it doesn't support drop frame timecode.

It can be maybe also useful for you, for example if you have maximized video window at another screen and it is on top of other windows or when you have another working units at your project (like bars,beats) and still like to watch timecode sometimes.
Also sometimes, there is delivered video with burned timecode, but it is very small or unreadable, so you can place timecode with better readability over it.

Just insert video processor with that preset either as a item fx, track or master fx.

Code:
// Timecode overlay

font="Arial";

//@param1:size 'text height' 0.1 0.01 0.5 0.25 0.01
//@param2:ypos 'y position' 0.90 0 1 0.5 0.01
//@param3:xpos 'x position' 0.5 0 1 0.5 0.01
//@param4:border 'border' 0.03 0 1 0.5 0.01
//@param5:fgc 'text bright' 1.0 0 1 0.5 0.01
//@param6:fga 'text alpha' 1.0 0 1 0.5 0.01
//@param7:bgc 'bg bright' 0 0 1 0.5 0.01
//@param8:bga 'bg alpha' 0.5 0 1 0.5 0.01
//@param9:h_off 'hours offset' 0 -23 23 0 1
//@param10:m_off 'minutes offset' 0 -59 59 0 1
//@param11:s_off 'seconds offset' 0 -59 59 0 1
//@param12:f_off 'frames offset' 0 -29 29 0 1
 

offset = 3600*h_off + 60*m_off + s_off + f_off/framerate;

time_value = time / (ceil(framerate)/framerate) + offset;

hours = time_value/3600;
minutes = (time_value / 60) % 60;
seconds = time_value % 60;
frames = (time_value - floor(time_value))*framerate;

#timecode = sprintf(#, "%02d:", hours);
#timecode += sprintf(#, "%02d:", minutes);
#timecode += sprintf(#, "%02d:", seconds);
#timecode += sprintf(#, "%02d", frames);
// #timecode += sprintf(#, "  %.3f s", time); // abs. time
// #timecode += sprintf(#, "%10d f", (time*framerate)); // abs. frames

gfx_blit(0,1);
gfx_setfont(size*project_h,font,'B');
gfx_str_measure(#timecode,txtw,txth);
yt = (project_h- txth*(1+border*2))*ypos;
gfx_set(bgc,bgc,bgc,bga);
gfx_fillrect(xpos * (project_w-txtw*(1+border*2)), yt, txtw*(1+border*2), txth*(1+border*2));
gfx_set(fgc,fgc,fgc,fga);
gfx_str_draw(#timecode,xpos * (project_w-txtw),yt+txth*border);
And finally pic or it didn't happen



Michal

Update 1: Improved handling of non-whole number framerates (23.976, 59.54 etc.)
__________________
FRs: Better FX bypass

Last edited by msmucr; 06-05-2016 at 02:30 AM. Reason: updated version for NTSC timecodes
msmucr is offline   Reply With Quote
Old 01-02-2016, 10:50 AM   #2
babag
Human being with feelings
 
Join Date: Nov 2009
Posts: 1,609
Default

cool, msmucr. haven't yet used reaper video except for picture sync for edit/mix of audio. can that tc window be slid up to the top? i usually put it there as very little that requires sync occurs at the top but when on the bottom things like footsteps can get covered by the window. very useful feature.

thanks,
BabaG
babag is offline   Reply With Quote
Old 01-02-2016, 11:05 AM   #3
semiquaver
Human being with feelings
 
Join Date: Jun 2008
Posts: 4,913
Default

thank you!!!
semiquaver is offline   Reply With Quote
Old 01-02-2016, 12:56 PM   #4
msmucr
Human being with feelings
 
Join Date: Jun 2009
Location: Praha, Czech republic
Posts: 590
Default

Quote:
Originally Posted by babag View Post
cool, msmucr. haven't yet used reaper video except for picture sync for edit/mix of audio. can that tc window be slid up to the top?
Hi BabaG,

yes of course, position and size of inserted timecode can be freely modified.
Just adjust knobs y and x position according to your taste.
Default bottom center alignment was chosen just as a reasonable starting point for me.

Michal
__________________
FRs: Better FX bypass
msmucr is offline   Reply With Quote
Old 01-02-2016, 02:36 PM   #5
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 5,480
Default

Another feature request I can check off the old list. Thanks for doing this!
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 01-02-2016, 02:45 PM   #6
msmucr
Human being with feelings
 
Join Date: Jun 2009
Location: Praha, Czech republic
Posts: 590
Default

Quote:
Originally Posted by EpicSounds View Post
Another feature request I can check off the old list. Thanks for doing this!
Hi,
I'm sorry, but I don't understand, what do you mean by checking off the old list.
Could you explain it for me, please?

Michal

EDIT: sorry I've got it.. First I thought, you would like to add something to the script..
__________________
FRs: Better FX bypass
msmucr is offline   Reply With Quote
Old 01-02-2016, 03:51 PM   #7
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 5,480
Default

Quote:
Originally Posted by msmucr View Post
Hi,
I'm sorry, but I don't understand, what do you mean by checking off the old list.
Could you explain it for me, please?

Michal

EDIT: sorry I've got it.. First I thought, you would like to add something to the script..
Yeah my list here http://forum.cockos.com/showthread.php?t=167376
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.