Fade up on a video clip

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
hutchfx
Posts: 30
Joined: Sat Apr 09, 2011 5:38 am

Fade up on a video clip

Post by hutchfx » Tue Dec 12, 2017 1:43 am

Using LiveCode 9.0 DP 10 on a Mac with OS 10.13.2

I would like to have a video clip fade on from black.

I tried:
go to card "black card"
visual effect "dissolve"
go to card "video card"
...and a "start player" in preopencard of video card.
The player pops on, and then the rest of the card dissolves in.

I tried putting a black rectangle over the player, then having a repeat with loop change the blendLevel of the graphic. This worked with the pointer tool selected, though it was slow and choppy. With the browse tool selected, the graphic moved behind the player.

I know I can accomplish this by editing the video clip to fade up from black, but that will create some other issues, and limit the flexibility. Does anyone have any other suggestions for doing this by script?

Thanks!

Hutch

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2751
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: Fade up on a video clip

Post by richmond62 » Tue Dec 12, 2017 12:22 pm

You can set the blendLevel of a player and have a black mask behind
the player which will show through.

The ONLY snag is that the blendLevel does NOT affect the video that the player
is playing.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2751
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: Fade up on a video clip

Post by richmond62 » Tue Dec 12, 2017 1:13 pm

FadedLove.png
This works insofar as it consists of a main stack and a substack.

The substack is palettized and acts as a mask above the video player.

To get this to work you will have to reset the path to the clip "BubbleSort.mp4"
in the properties palette of the player "PP".

https://www.dropbox.com/s/lory2rk0qsxwo ... e.zip?dl=0

hutchfx
Posts: 30
Joined: Sat Apr 09, 2011 5:38 am

Re: Fade up on a video clip

Post by hutchfx » Wed Dec 13, 2017 3:33 am

Richmond62,

Thank you! The substack trick does what I need it to do.

Hutch

jiml
Posts: 168
Joined: Sat Dec 09, 2006 1:27 am
Location: Los Angeles

Re: Fade up on a video clip

Post by jiml » Wed Dec 13, 2017 9:06 pm

Hutch,

Glad Richmond's suggestion worked. Very clever using a second stack.

Attached is a refinement of your original approach.
It uses a couple of tricks to overcome the video choppiness you saw.
I've only tried this on a Mac; your mileage may differ.
fireplace fade.livecode.zip
(1.59 KiB) Downloaded 48 times
Jim Lambert

jiml
Posts: 168
Joined: Sat Dec 09, 2006 1:27 am
Location: Los Angeles

Re: Fade up on a video clip

Post by jiml » Sat Jan 06, 2018 6:15 pm

Another simpler approach to the fireplace effect. No movie at all.

Code: Select all

go stack url "http://netrin.on-rev.com/animateimage/fireplace_jim.livecode"

fadeIn 3000 - fades in in roughly 3 seconds
fadeOut 2000 - fades out in roughly 2 seconds
restore - gets rid of the backdrop

The fades could be triggered by a keystroke.


Jim Lambert

Post Reply

Return to “Rich Media”