[CLOSED] Can Javascript pass-through vid-gpu?


  • I got tired of drawing exponential numbers of lines while mapping video-in through routers mapped to zoom windows, and wanted to see if I could do this same routing through some simple javascript.

    I didn't have very high expectations, but just for grins I connected a vid-gpu to the input of a javascript actor with one input and one output where I simply passed through the vid-gpu to the output.

    function main()
    {
        return arguments;
    }
    

    So it didn't work, as I expected. But there was a yellow line coming out of it, just nothing was in that "stream". But since it did detect the input and output types properly, is there an actual way of passing through a vid-gpu? I don't know how that is actually represented, but I was thinking it would be a pointer/handle to some representation of the video and not necessarily all of the data streaming through, which may be too much for the javascript interpreter.

    Curious and hopeful.

    Bernie

  • Tech Staff

    @peuclid

    No, Javascript does not support any Video data types. It is only capable of processing alphanumeric data types.

  • Tech Staff

    @dusx

    If you wish to use Video inputs / outputs then the only choose that you really have is using GLSL actors..

    In your case, I would stick with the Router setup :) What you can do is create a few actors to make the progress easier by using Broadcast / Listener actors. Then on the router side you can just request that stream instead.


  • @Juriaan 

    I suspected as such (that javascript couldn't handle complex datatypes).

    I hadn't thought of splitting it up with actors and broadcast/listeners. I've started broadcast/listen more lately and that's a great hint.

    I'll take a crack at it next time I'm working in my project. Just started setting up for our next show. It's a smaller cast so not worried about scale at the moment, but will play around.


  • @peuclid said:

    got tired of drawing exponential numbers of lines while mapping video-in through routers mapped to zoom windows, and wanted to see if I could do this same routing through some simple javascript.

    Why don't you give me a description of the actor you wish you had. If it's needed for remote performance, and it's possible to whip it up, I will.

    Best Wishes,
    Mark


  • @mark

    that's really generous of you to offer.

    I'm hoping this will become moot with the next version of ZoomOSC. Basically, this is for the code that maps the participant index to their cropping of the zoom video. The translation from the indexes of the boxes on the screen to the participant id is easy, but I wanted to be able to pass the right video through.

    I know that the Liminal folks are hard at work on their next version that should be able to offload that mapping to their end so we can just deal with names or our own indexes and not worry so much about the box indexes.

    I really appreciate how responsive you are and love the platform. I'm just starting up the project for our next show and I feel like the learning curve was pretty quick to climb once I got the hang of some basic concepts.

    Thanks

    Bernie


  • @peuclid

    To close this issue. I went ahead using broadcasters/listeners in User Actors and it feels cleaner now and less prone to misconnecting hundreds of lines. Thanks for the advice!