Old 03-10-2019, 10:55 AM   #1
Erdan
Human being with feelings
 
Join Date: Mar 2019
Location: France
Posts: 5
Default Get item name in video processor

Hi all !

Do you know if it's possible to get the item name in the video processor ?
I think it could be usefull for video with subtitle or lyrics for exemple ?

I've look at the Mespotine list of functions but don't find anything like that...

Attached Images
File Type: png Capture items.PNG (54.0 KB, 1477 views)
Erdan is offline   Reply With Quote
Old 03-10-2019, 11:51 AM   #2
Erdan
Human being with feelings
 
Join Date: Mar 2019
Location: France
Posts: 5
Default answer found

I've just dl the last version of reaper and the feature is in it ! (new text overlay) cool improvement thanks !

Last edited by Erdan; 03-10-2019 at 12:00 PM.
Erdan is offline   Reply With Quote
Old 03-10-2019, 02:19 PM   #3
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,568
Default

Quote:
Originally Posted by Erdan View Post
I've just dl the last version of reaper and the feature is in it ! (new text overlay) cool improvement thanks !
please explain, I haven't seen anything in the changelogs or discussion about this
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 03-11-2019, 04:44 AM   #4
Erdan
Human being with feelings
 
Join Date: Mar 2019
Location: France
Posts: 5
Default

In v5.972 the preset text overlay has been modified (code before : text="", now #text=""). If this variable is not filled with a string and remain empty (you keep #text="") it will get the name of the item as text overlay.

A big time saver.
Erdan is offline   Reply With Quote
Old 03-11-2019, 07:33 AM   #5
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

5.97 changelog line:

+ Video: add processor functions: gfx_getpixel(), input_get_name(), on_parameter_change(), time_precise(), ui_get_state(), fft()
Justin is offline   Reply With Quote
Old 03-11-2019, 12:05 PM   #6
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,568
Default

yep totally missed that, and now I see it's even implemented in the default text overlay.
Any way to do line breaks?

besides item properties and "Xenakios/SWS: Rename takes..." is there a quick way to rename takes?
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 03-11-2019, 02:52 PM   #7
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Oh, this sounds great. And I also totally missed it.

Many thanks
__________________
☆.。.:*・°☆.。.:*・°☆.。.:*・°☆REAPER//✿◔‿◔)°☆.。.:*・°☆.。.:*・°☆
Eliseat is offline   Reply With Quote
Old 04-09-2019, 04:39 PM   #8
nellipalooza
Human being with feelings
 
Join Date: Jan 2018
Posts: 7
Default Claifying Detail

FYI:
To get the item name to be picked up by input_get_name, make sure to add the FX to the media item... not the track.

Looks like if you add the FX to the track, it will take the track name.

I spent a bit of time on this, so hopefully this helps someone.
nellipalooza is offline   Reply With Quote
Old 04-10-2019, 06:44 AM   #9
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

Quote:
Originally Posted by nellipalooza View Post
FYI:
To get the item name to be picked up by input_get_name, make sure to add the FX to the media item... not the track.

Looks like if you add the FX to the track, it will take the track name.

I spent a bit of time on this, so hopefully this helps someone.
Unless the media item is a video file or dedicated video item (insertable via action) or has a video processor on it, in which case you can use input_get_name(input_next_item(-1),#text) to get its text.
Justin is offline   Reply With Quote
Old 04-11-2019, 03:32 AM   #10
Eliseat
Human being with feelings
 
Eliseat's Avatar
 
Join Date: Mar 2018
Location: Cologne
Posts: 1,362
Default

Hmm ...

I never tested it but always wanted to. And now I see it doesn't work as expected. Didn't use Jon this feature in one of his videos to create some kind of a subtitle show from item names?

If I use a video processor (on track) with text overlay and keep the get name variable untouched, it shows the first item name correctly but doesn't change it if a new item name follows. Wasn't it intended to do so?

I don't know. But I thought so.
__________________
☆.。.:*・°☆.。.:*・°☆.。.:*・°☆REAPER//✿◔‿◔)°☆.。.:*・°☆.。.:*・°☆
Eliseat is offline   Reply With Quote
Old 04-12-2019, 12:43 AM   #11
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,568
Default

Quote:
Originally Posted by Eliseat View Post
Hmm ...

I never tested it but always wanted to. And now I see it doesn't work as expected. Didn't use Jon this feature in one of his videos to create some kind of a subtitle show from item names?

If I use a video processor (on track) with text overlay and keep the get name variable untouched, it shows the first item name correctly but doesn't change it if a new item name follows. Wasn't it intended to do so?

I don't know. But I thought so.
for that it would be best to put the fx on the items IMO.

Watch out for line breaks in the item names. Might look right in the project but will be unformatted in on export, or reopening the project later.
I put a bit too much trust in that earlier this week.
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 04-12-2019, 02:48 PM   #12
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

Quote:
Originally Posted by EpicSounds View Post
Watch out for line breaks in the item names. Might look right in the project but will be unformatted in on export, or reopening the project later.
I put a bit too much trust in that earlier this week.
Hmm, going to fix this actually for track/take/marker names.

Last edited by Justin; 04-12-2019 at 03:02 PM.
Justin is offline   Reply With Quote
Old 04-21-2019, 11:03 AM   #13
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Quote:
Originally Posted by Justin View Post
5.97 changelog line:

+ Video: add processor functions: gfx_getpixel(), input_get_name(), on_parameter_change(), time_precise(), ui_get_state(), fft()
Oh, good to know, I should update this then...
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 06-01-2020, 07:54 AM   #14
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Quote:
Originally Posted by Justin View Post
... or dedicated video item (insertable via action)

Oh! I didn't know that such a thing existed!

"Insert dedicated video processor item" (action 41932)
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 07-01-2020, 12:10 AM   #15
Javier Robledo
Human being with feelings
 
Javier Robledo's Avatar
 
Join Date: Jul 2014
Posts: 634
Default

Wonderfull ¡¡¡

Yesterday I realized about this ¡¡¡

Much esay

GREAT ¡¡¡

Javier Robledo is offline   Reply With Quote
Old 07-04-2020, 01:50 AM   #16
Kite
Human being with feelings
 
Join Date: Apr 2010
Location: Portland OR
Posts: 217
Default

Quote:
Originally Posted by EpicSounds View Post
Any way to do line breaks?
Jon, if you look at the code for my guitar chords grid effect, you'll see I loop through the input string and parse it character by character. So I can e.g. turn "b" into a flat sign. You could do the same -- you could mod the text overlay effect to have a special character, perhaps "/", which represents a line break. When the code finds that character, instead of writing it on the screen, it resets xpos back to the start and increments ypos. So "line break/demo" becomes

line break
demo
__________________
alt-tuner: a microtonal midi plug-in: www.TallKite.com/alt-tuner.html
The Kite Guitar, a playable 41-ET guitar: www.KiteGuitar.com
Kite is offline   Reply With Quote
Old 08-25-2021, 01:51 AM   #17
maczook
Human being with feelings
 
Join Date: May 2019
Posts: 59
Default

Okay so I'm absolutely loving this as I was about to have to make an individual title card for every song in an After Effects/ Premiere project.... it's ridiculous that these "Industry Standard" Video editing softwares do not have the capability to do a procedurally generated "Now Playing" thing.... lmao :'D

One issue I'm having is that the ".mp3"/ file extensions show up in the overlay; is there any way I can disable this? I'd like it to just say "Artist - Song" rather than "Artist - Song.mp3"
maczook is offline   Reply With Quote
Old 08-25-2021, 08:46 AM   #18
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,568
Default

batch rename items to remove the last 4 characters
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 01-03-2022, 11:41 PM   #19
Infrabass
Human being with feelings
 
Join Date: Apr 2014
Posts: 398
Default

The dedicated video processor item is so underrated, I love it!
Any way to access user presets with it?

This is a bit a dealbreaker for now because having to change every time a lot of settings like x & y text position, bg alpha, border is not very efficient.
Infrabass is offline   Reply With Quote
Old 01-04-2022, 05:03 AM   #20
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default

Quote:
Originally Posted by maczook View Post
Okay so I'm absolutely loving this as I was about to have to make an individual title card for every song in an After Effects/ Premiere project.... it's ridiculous that these "Industry Standard" Video editing softwares do not have the capability to do a procedurally generated "Now Playing" thing.... lmao :'D

One issue I'm having is that the ".mp3"/ file extensions show up in the overlay; is there any way I can disable this? I'd like it to just say "Artist - Song" rather than "Artist - Song.mp3"
To remove the .mp3, in the "Text overlay" preset just replace the line
Code:
strcmp(#text,"")==0 ? input_get_name(-1,#text)
by

Code:
strcmp(#text,"")==0 ? ( 
  input_get_name(-1,#item_name);
  strncpy(#text,#item_name,strlen(#item_name)-4); //assuming 4 chars extensions
);

string functions reference: https://www.cockos.com/EEL2/index.php#string_funcs

Last edited by papagirafe; 01-04-2022 at 05:12 AM. Reason: incomplete info
papagirafe is offline   Reply With Quote
Old 10-17-2022, 08:19 AM   #21
profquad
Human being with feelings
 
Join Date: Feb 2017
Posts: 185
Default

I'm getting the track name with input_get_name(-1,#text) not the item or take name.
profquad is offline   Reply With Quote
Old 10-17-2022, 08:58 AM   #22
profquad
Human being with feelings
 
Join Date: Feb 2017
Posts: 185
Default

wooop, just figured it out! add FX to the item or take, not the track.
profquad is offline   Reply With Quote
Old 10-17-2022, 11:53 AM   #23
papagirafe
Human being with feelings
 
papagirafe's Avatar
 
Join Date: Aug 2020
Location: Brasil
Posts: 679
Default

Quote:
Originally Posted by profquad View Post
wooop, just figured it out! add FX to the item or take, not the track.
Exactly! But sometimes doing so is not practical especially if you are copying a text overlay preset to a large number of items and then change your mind about the presentation of the text (font, size etc) then the solution I presented in this thread https://forum.cockos.com/showthread.php?t=271655 is more practical
papagirafe 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 02:41 AM.


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