0

Fading Video Using Brightscript

Hello,

I am trying to figure out how to implement video fades using new XT models running firmware (7.060), working in Brightscript.

Currently I am trying to follow the instructions on the roVideoPlayer support page (or how I would interpret it).  I am trying:

preloader1 = CreateObject("roAssociativeArray")
preloader1["LoopMode"] = TRUE
preloader1["FadeInLength"] = 5000
preloader1["FadeOutLength"] = 5000
preloader1["Filename"] = "/media/3.mov"

v1.PlayFile(preloader1)

... and hoping to see 5 second fades on either end of the video - but so far I don't see any fades - the video (H264 / .mov files - standard encoding for how we have worked with Brightsigns over the years) plays back normally - but without fades.

Can you tell me how to approach this?

Maybe it is relevant that I am setting the decoder mode as follows:

vm=CreateObject("roVideoMode")
vm.SetMode("1920x1080x60p")
vm.SetDecoderMode("4K", "HD", -1, "videoplane", TRUE)

... and using two roVideoPlayer instances, that can be swapped over each other using ToFront().

Thanks!

S

10 comments

  • 0
    Avatar
    Benny Britten-Austin

    How about putting an image zone on top of the video layer and have a black picture fade in (for fade out effect) and fade out (for fade in effect), use. You trigger the image zone via Zone messages, trigger the fade out at the same time the film starts and trigger a fade out 5 seconds before the film ends via a Video Time Code event.

  • 0
    Avatar
    sven anderson

    This is a good idea - but in this case I need to fade one video into another video (for a crossfade transition).  

    Let me know if you can confirm any working methods.  Perhaps I should be moving over into an HTML5 setup, with two video elements.  I would like to achieve it without this ... as I have a lot of background coding supporting working in a simple .brs (brightscript) document structure, developed over the past several years.

    Best,

    S

  • 0
    Avatar
    Bright Scripters

    It could be easier to implement with BA Media List state, which is capable of transitions between videos.

    http://docs.brightsign.biz/display/DOC/Media+List%2C+Video+List%2C+Image+List%2C+Audio+List

  • 0
    Avatar
    sven anderson

    Thanks - this is useful for some scenarios, unfortunately I can't work with it in this current setup.

    I will ask a quick question that is related (for my resolving this matter - which is more about potential dynamic transitions between video - and thus about fading as well as some other things):

    Is it possible for two videos to output stereo sound simultaneously to the 1/8" jack or to the HDMI output?

    If so can you tell me the brightscript code for this (or point me in the right direction)?

    Let me know if I should post this as a separate topic.

    Thanks,

    S

  • 0
    Avatar
    Bright Scripters

    I want to answer your question with a Yes, although, I've never attempted to mix two videos' audio.

    I suppose that would depend on the player's model, and video resolution combination.

    Before coding that in BrightScript, I'd explore by use of BrightAuthor first.

    In order to prove that indeed two video files can be mixed into a single audio signal, you could simply play two videos, on two video zones, and route their audio, to a single output, 3.5 Analog, and/or HDMI.

    Audio sample rate and resolution, comes to mind. Start simple with matching audio formats.

     

    Is BrightAuthor not allowed in this project?

     

  • 0
    Avatar
    sven anderson

    BrightAuthor won't work as we have a complicated synchronisation structure / some nonlinear playback / etc.  It is basically a big (14-channel) video sequencer that can be controlled by a master via UDP - so these transitions that we are working on are important to figure out, to develop an approach to how we structure control messages for changing videos.

    I will try your suggestion though in Brightscript.  Two video files / two zones / same audio format and same video format.  I'll update you with progress.  If you want to try the same in Brightauthor, let me know how it goes. 

    The players are the latest - XT1143, latest firmware.  Files are currently HD H265 low bitrate video with 48khz PCM audio (I imagine that's easier to mix than AAC).

    S

  • 0
    Avatar
    Bright Scripters

    I'm not clear on the requirements, but the BrightAuthor Video Play File, seems suitable, as it accepts UDP messages, and use them as a key to select a video from a list. Worth looking into IMHO.

  • 0
    Avatar
    morgan101us

    I require the same video crossfade. We have an HD224 playing a 4K video as an attract screen. We would like a motion sensor to trigger the crossfade and have the attract video fade out and the main video presentation play. Both videos are the same resolution. Both videos are playing great on the player We can get the attract video to fade out use the custom plugin. We have not been able to get the next video to play once the attract video fades out. 

    If the motion sensor can trigger a crossfade plugin via the GPIO event we could add some head to the main video and have this fade in or just make the fade in very quick. 

    Thoughts? 

  • 0
    Avatar
    morgan101us

    We were able to solve this by creating a duplicate timeline that had transparent and full black PNG files. The PNGs are faded up and down when you need transition. You can set the time out and fade transitions of the PNGs and use them to cue a new video state. This gets around trying to do that within the video files while they are mid playing. 

  • 0
    Avatar
    Thomas Principato

    I know this is an old thread, but I was hoping to get some help with how you achieved your fade in. I have a script that fades out a png sequencenin an mov co trainer that has transparency. I need that video to fade out on command, which it does, but I can't seem to figure out how to restore it or bring it back. Any help would be amazing

Please sign in to leave a comment.