|
|
|
09-26-2017, 12:30 PM
|
#1
|
Human being with feelings
Join Date: Nov 2009
Location: Belgium
Posts: 10,474
|
Req : Video processor : Title text overlay from item note
Code:
// Title text overlay
text="This is a title";
font="Arial";
//@param1:size 'text height' 0.05 0.01 0.2 0.1 0.01
//@param2:ypos 'y position' 0.95 0 1 0.5 0.01
//@param3:xpos 'x position' 0 0 1 0.5 0.01
//@param4:border 'border' 0 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.75 0 1 0.5 0.01
//@param8:bga 'bg alpha' 0.5 0 1 0.5 0.01
input = 0;
!project_wh_valid && input_info(input,w,h) ? ( project_w=w; project_h=h; );
gfx_blit(input,1);
gfx_setfont(size*project_h,font);
gfx_str_measure(text,txtw,txth);
yt = (project_h- txth*(1+border*2))*ypos;
gfx_set(bgc,bgc,bgc,bga);
gfx_fillrect(0, yt, project_w, txth*(1+border*2));
gfx_set(fgc,fgc,fgc,fga);
gfx_str_draw(text,xpos * (project_w-txtw),yt+txth*border);
How can i do it?
would be very handy to create subtitles/lyrics on music video
|
|
|
09-26-2017, 03:41 PM
|
#2
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
Unfortunately it is not possible to access ReaScript functions or any elements from the arrange view with video processor. It is its own little world.
We have been requested that since a lot time tough.
|
|
|
09-26-2017, 04:51 PM
|
#3
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
Code:
<VIDEO_EFFECT "Video processor" ""
<CODE
|// Title text overlay
|text="This is a title";
|font="Arial";
|
|//@param1:size 'text height' 0.05 0.01 0.2 0.1 0.01
|//@param2:ypos 'y position' 0.95 0 1 0.5 0.01
|//@param3:xpos 'x position' 0 0 1 0.5 0.01
|//@param4:border 'border' 0 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.75 0 1 0.5 0.01
|//@param8:bga 'bg alpha' 0.5 0 1 0.5 0.01
|
|input = 0;
|!project_wh_valid && input_info(input,w,h) ? ( project_w=w; project_h=h; );
|gfx_blit(input,1);
|gfx_setfont(size*project_h,font);
|gfx_str_measure(text,txtw,txth);
|yt = (project_h- txth*(1+border*2))*ypos;
|gfx_set(bgc,bgc,bgc,bga);
|gfx_fillrect(0, yt, project_w, txth*(1+border*2));
|gfx_set(fgc,fgc,fgc,fga);
|gfx_str_draw(text,xpos * (project_w-txtw),yt+txth*border);
>
CODEPARM 0.0500000000 0.9500000000 0.0000000000 0.0000000000 1.0000000000 1.0000000000 0.7500000000 0.5000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000
>
This is how video processor take FX text preset is written right in the RPP file.
A script could update the text field based (from Item Chunks directly) on some object properties... like items notes.
|
|
|
08-02-2018, 06:57 AM
|
#4
|
Human being with feelings
Join Date: Aug 2018
Posts: 2
|
Title text overlay does work!
Hi, this code does work and you can easily add text overlays and modify how it looks, acts, etc. Just add this effect to an empty midi item, make the changes you wish (such as change the text) and be sure to save your changes with Ctrl-S while the window has focus, and you should be good to go. Feel free to PM if more detailed instructions are needed. -Scott
|
|
|
08-04-2018, 05:27 PM
|
#5
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
These functions might be a good start:
https://github.com/ReaTeam/ReaScript...f15be48f57e2ae
Read the comments, as they give you hints, what to expect and what difficulties are involved with updating VideoProcessor-code at "runtime" of a playing/rendering project.
|
|
|
08-05-2018, 06:53 AM
|
#6
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
In fact, I just made some script for pushing text into video processor, like from region;
Pack release soon.
|
|
|
08-06-2018, 03:20 AM
|
#7
|
Human being with feelings
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
|
X-Raym.. My hero!
That will definitely come in useful again at some point as I use video text overlays in demo videos for game sounds all the time so the coders know where to put the hooks
Thanks!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
|
|
|
11-03-2018, 06:50 AM
|
#8
|
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Hi X-raym,
did you ever publish the "region title to text overlay" script? I searched the packages but didn't find anything similar. In your gif it seems to work pretty well. And I'm pretty excited to test it for a song translation I want to do. Many thanks in advance.
Greetings
Eli
|
|
|
11-03-2018, 06:29 PM
|
#9
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
@Eliseat
Hi !
I made a small premium reapack package for video processor related scripts,
I had other things to add to it but they need more testing.
Anyway, these scripts are working nicely. :P
|
|
|
11-04-2018, 03:57 AM
|
#10
|
Human being with feelings
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
|
Okay, got it.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 03:56 AM.
|