Any simple (global) variables exist for use in the commands?

  • Anonymous - 2014-06-15

    Hello! I'm starting to test out Snowmix for some live video streaming.

    I currently have three commands; pic1 pic2 pic3 that do the following:

    pic1: Main video camera 100% shown (1280x720) in center inside 1580x720 window (black borders)
    pic2: Projector shown 100% (1280x720) to the left, main video camera cropped to the center
    300px and shown on right side
    pic3: Projector 100% shown in the center inside the window (black borders).

    That's all well and nice, -- however, sometimes the presentations that people hold are not
    16:9, they send out 720p signal, but have black borders on either side. I'd like to be able
    to define a command or variable that will change the behaviour of the pic2 command, so that
    it crops more of the projector and can show a bigger main video camera feed to the right.

    I'd also like to be able to have an option for the main video to be on the left side if
    the screen of the presenter is on the other side.

    I could just create all mutations and variations of these as static commands, and rather
    use my small mobile phone webapp to keep all the state for me (so I don't have to think
    too much when switching :) ). But I'd see if there was a nice way I could get a leaner
    and simpler-to-understand .ini-file. I guess maybe TCL could be a possible answer here?

    (Also, -- I didn't find your git repository, does it exist, or is there only the tarballs?)

    Thank you for your tireless work. I am coming from DVSwitch, which is much simpler, but
    it's a nice step-up to HD and also being able to more advanced compositing in the program. :D

  • Odin Hørthe Omdal

    So I didn't know I wasn't logged in. But this was me :)

    • Peter Maersk-Moller

      Hi Odin.

      Please also post you current complete ini file. That way it will be easier to help.

      First step is as you write to create mutations of commands of the combinations you want. When you get tired of that, the the next logical step is to write a single tcl procedure/function, that will take arguments and do all the repetitive stuff for you ;-) There are plenty of examples in the slib directory and to some extend in some of the ini files included. If you have a specific task you can't seem to simplify or get right, I'd be happy to help.

      Be aware that all settings for snowmix has to be hand carried so to speak into the tcl interpreter in version 0.4.3. By hand carried I mean you in you ini file or through a control connection has to do something like this

      tcl eval set system_width 1280
      tcl eval set system_height 720
      tcl eval set feed(1,geometry) "704 576"

      The 3 above examples sets global variables in the tcl interpreter.

      In the next Snowmix version 0.4.4 almost all of the settings of Snowmix can be queried inside the interpreter.

      No Git repository. So far only tar-balls.

      Best regards

  • Odin Hørthe Omdal

    Sorry for not replying earlier, all the files have been on my video streaming suit case at my local hackerspace (Bitraf, Oslo, if you're ever in Oslo you should visit :) ).

    I'll upload the ini-file for completeness. Though I feel you've answered my question.

    I guess I will be using that later to reconfigure based on what aspect ratio the feed from the projector is having. They always send 720P (because that's required by me), but the slides often compensate by letterboxing.

    Also, I'd like to make some smooth transitions later. Having a picture slide a few tens of pixels and fade in quickly on transitions. If it looks nice. :)

    • Peter Maersk-Moller

      Hi Odin.

      If you use virtual feed or shape based feed for overlay/mixing, both support animation commands for placement, size, rotation and alpha blending thus apparently meet your requirements for transition.

      Animation provide a mechanism for with a single command change settings from X to Y in a number of equally sized steps, with each step being a frame. An example could be to change alpha from 1 to 0 in 100 steps of -0.01. and perhaps at the same time change the placement from 0,0 to 1280,0 in lets say 128 steps of 10,0. Just an example.

      You can also program complicated non linear transitions in tcl with perhaps alpha blending following an s-curve.


    • Peter Maersk-Moller

      Thanks for the invitation.

      Always nice to have the opportunity.

      Best regards



Cancel  Add attachments

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks