logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
j_dublay  
#1 Posted : Tuesday, November 29, 2022 1:44:16 PM(UTC)
j_dublay

Rank: Newbie

Groups: Registered
Joined: 5/12/2020(UTC)
Posts: 6
United States
Location: Oregon

Was thanked: 1 time(s) in 1 post(s)
I have been working on a script that can work with merging inputs that have layers with other inputs that have layers. Working with the XML, I saw a script that could handle moving the top most matching layer, but I want something that can preserve the layer order while making the merge happen.

Like with other versions of this script, having an open layer up top is important. It will scan the layers and look for whatever top most layer is available...but I have noticed some issues if there is something in layer 10 and the incoming input has that layer elsewhere.

It also reserves layer 1 for background layers. That way if you have multiple layered inputs that have the same background, it will leave it alone.

I am not much of a coder, so I imagine there are far better ways to accomplish this as well as better logic to handle potential situations. This will still not handle every situation and you still need to think through the creation of your multis, so lots of testing for sure.

Would love any feedback or ideas to improve upon it. I am including a project that uses a lot of color inputs put into mutlis. Many will work correctly and a few are built to intentionally break it.

https://www.dropbox.com/...xhnc53sct2gs98s3437c5zc4


Credit to Streaming Alchemy and patriot1889 for ideas, as well as code that remains in this script.
https://github.com/Strea...lchemy/StreamingAlchemy/
https://github.com/patriot1889/SuperSmartMERGE
Joeboe  
#2 Posted : Tuesday, November 29, 2022 8:43:54 PM(UTC)
Joeboe

Rank: Advanced Member

Groups: Registered
Joined: 4/16/2017(UTC)
Posts: 578
Location: jamaica

Thanks: 77 times
Was thanked: 32 time(s) in 31 post(s)
Hi, I have been using the original post by Streaming Alchemy, but I can not find out how to adjust the speed of the merge...Can you tell me how to do that, as sometimes I need a slow merge

Thanks
Egriswold  
#3 Posted : Thursday, December 1, 2022 11:50:37 PM(UTC)
Egriswold

Rank: Advanced Member

Groups: Registered
Joined: 6/29/2011(UTC)
Posts: 311
Man
United States
Location: Florida

Thanks: 6 times
Was thanked: 33 time(s) in 32 post(s)
Couple ways come to mind, you could create different shortcuts with merge transition and set the duration on that shortcut, or you could set shortcut or script using "SetTransitionDuration#" command to set transition# value in milliseconds.
Joeboe  
#4 Posted : Friday, December 2, 2022 4:35:03 AM(UTC)
Joeboe

Rank: Advanced Member

Groups: Registered
Joined: 4/16/2017(UTC)
Posts: 578
Location: jamaica

Thanks: 77 times
Was thanked: 32 time(s) in 31 post(s)
Originally Posted by: Egriswold Go to Quoted Post
you could create different shortcuts with merge transition and set the duration on that shortcut, or you could set shortcut or script using "SetTransitionDuration#" command to set transition# value in milliseconds.



If I create different shortcuts with different durations, it does not use the SmartMerge, and where I have multi views, The issue with the original merge shows up again...I was looking for a way to adjust it in the script from Streaming Alchemy

j_dublay  
#5 Posted : Saturday, December 3, 2022 2:24:04 AM(UTC)
j_dublay

Rank: Newbie

Groups: Registered
Joined: 5/12/2020(UTC)
Posts: 6
United States
Location: Oregon

Was thanked: 1 time(s) in 1 post(s)
To change the duration, you will have to add a little bit of code. You can find each time the script will possibly run the merge by searching for the API call. It will look like this.

API.Function("Merge")


After "Merge" you would add a duration. The syntax looks like this. You just need to type in the duration that you want your merge to last ("2000" is two seconds).

API.Function("Merge", Duration:="2000")


If you wanted to get more flexible with it you could add a variable at the top of the script and then use the variable in the API call. With this method you can change it once at the top of the script and have it flow to any case where the merge would be used. That would look like this.

dim MergeDuration as String = "2000"

API.Function("Merge", Duration:=MergeDuration)


From there you could have multiple copies of the script that are called for different merge times, or you could use a dynamic script to update a dynamic value each time you call the smart merge. To do this you would need to add a variable for the dynamic value and fill it in with information pulled from the API. This method would need to add a good bit of code not only to your script, but would mean the shortcut would change as well. You would have to do a scriptStartDynamic to update the dynamic values for different merge durations.

Hope that helps.

thanks 1 user thanked j_dublay for this useful post.
Joeboe on 2/19/2023(UTC)
Joeboe  
#6 Posted : Saturday, December 3, 2022 3:38:40 AM(UTC)
Joeboe

Rank: Advanced Member

Groups: Registered
Joined: 4/16/2017(UTC)
Posts: 578
Location: jamaica

Thanks: 77 times
Was thanked: 32 time(s) in 31 post(s)
A bit winded, but I understand....Then, in the code I downloaded, all I need to do is add the line for the duration .......

I would not need to change the duration often, but a choice of 3 speeds will be good, so that means 3 different scripts.....
At present, I get half sec....(500 ms)....I will need to make a 1000 ms, and a 1500 ms ...Sometimes I get clients that want slower speeds......

Thanks, will get to work on making some speed changes....will report back....

Sorry...I took so long..I have things working great...Thanks again
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.