cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Video Compositing through AMX controller

128
Views
0
Helpful
0
Comments
This document was generated from CDN thread

Created by: Kyle Wilcoxen on 12-02-2010 08:03:13 PM
I'm needing to create 6 preset layouts and have an AMX controller recall those layouts. I've been tinkering with the demo program and see the XML code from the API Output. The one thing I'm not sure of is how to send that XML from an AMX controller to the codec. Below is the XML code that tells the codec to display the main camera full screen.

  <?xml version="1.0" encoding="UTF-8" ?>
  <Command>
  <Video>
  <Layout>
  <Frame>
  <Update command="True" item="1">
  <LayoutId item="1">1</LayoutId>
  <Layer item="1">2</Layer>
  <PositionY item="1">0</PositionY>
  <VideoSourceId item="1">1</VideoSourceId>
  <PositionX item="1">0</PositionX>
  <Height item="1">10000</Height>
  <Width item="1">10000</Width>
  <FrameId item="1">1</FrameId>
  <Border item="1">On</Border>
  <VideoSourceType item="1">localInput</VideoSourceType>
  </Update>
  </Frame>
  </Layout>
  </Video>
  </Command>

I tried doing a SEND_STRING of that code to the codec but nothing happened. I'm assuming I need more?

Subject: RE: Video Compositing through AMX controller
Replied by: Jonas Tysso on 15-02-2010 11:18:25 AM
Hi Kyle,

The XML code you have submitted is the feedback from the codec, not the actual API command. In the XML API listener of the demo program you should look for the "send" line, and the xCommands. The xCommands are the actual output to the codec that you need.

Good luck!
Jonas Tyssø

Subject: RE: Video Compositing through AMX controller
Replied by: Kyle Wilcoxen on 03-03-2010 06:46:32 PM
I was finally able to get video compositing to work locally in the room. I'm using the AMX module. The client would like to send the local compositing window to the far site. For instance, one layout contains PC full screen and camera/doc cam in smaller windows. This is being displayed on the 2nd DVI port to the monitor.

In my code I'm using the VL_REMOTE_MAIN_ASSIGN command based on the document. It says this will assign the given layout to the main output-stream to the given remote participant. However, this doesn't seem to be working on site. I called tech support and he told me this couldn't be done, that the far site would have to manipulate video compositing on their codec. Is this correct? And if so what does the VL_REMOTE_MAIN_ASSIGN do? Also, if that command works does it work when calling into a bridge?

Subject: RE: Video Compositing through AMX controller
Replied by: Viggo Fredriksen on 04-03-2010 10:15:45 AM
Hi Kyle,

  your understanding of the command is correct. If you have created a layout,
it should be possible to assign this to the remote main stream. The codec does
not distinguish between another endpoint or bridge. Please note that you cannot
have more than 4 frames in the layout you send to the participant.

If you're unable to get this working, I can take a look at your code. Either post
parts of it here or I can contact you directly so you can send it via e-mail.

Regards,
  Viggo

Subject: RE: Video Compositing through AMX controller
Replied by: Kyle Wilcoxen on 04-03-2010 03:27:04 PM
Thanks Viggo, I'm actually in the office today so I'm planning on testing it with a C-90. Hopefully I can get it to work.

Subject: RE: Video Compositing through AMX controller
Replied by: Kyle Wilcoxen on 04-03-2010 07:04:51 PM
Below is part of my code for the image compositing. The button event is based on the start button on the panel. So if the AMX processor reboots it will take the touchpanel back to the start screen.

Upon pressing start the code resets all layouts then checks for the last layout that was selected before a reboot and assigns the local layout for the 2nd monitor.

At the tail end of the button event I assign the monitor 2 layout to remote main. I’ve tested this on a C90 and have called an Edge95 and MXP6000. The Edge and MXP only sees the C90’s main camera. The video will not change. Image compositing works just fine locally. The far end does not see the local composite layout. Any thoughts on what I’m doing wrong?

BUTTON_EVENT[dvTP,1000]
{
PUSH:
{
  nToolBar = cToolbar_VideoFunctions
  nVideoFunction = cVideoFn_Dialing
 
  IF(nDisplayFB[cDisplay_Left] = 0)
  {
   SEND_STRING dvLeftDisplay,"$02,'PON',$03"
   nDisplayFB[cDisplay_Left] = 1
  }
 
  IF(nDisplayFB[cDisplay_Right] = 0)
  {
   SEND_STRING dvRightDisplay,"$02,'PON',$03"
   nDisplayFB[cDisplay_Right] = 1
  }
 
  //Reset Layouts and Re-Add Monitor 2 Layout
  SEND_COMMAND vdvTandberg_TC,"'VL_RESET'"
  SEND_COMMAND vdvTandberg_TC,"'VL_ADD-Monitor2Layout'"
   
  //Assign Monitor 2 Layout to Local Output
  SEND_COMMAND vdvTandberg_TC,"'VL_LOCAL_ASSIGN-Monitor2Layout,4'"
 
  SWITCH(nLayoutSelection)
  {
   CASE cLayout_PCFS:
   {
    //Assign Input 3 to DVI
    SEND_COMMAND vdvTandberg_TC,"'PASSTHRU-xConfiguration Video Input Source 3 Connector: DVI'"
   
    //Configure Layout for PC Full Screen
    SEND_COMMAND vdvTandberg_TC,"'VL_FRAME_ADD-Monitor2Layout,FSFrame,0,0,10000,10000,1,1,localInput,3'"
   }
   CASE cLayout_DocCamFS:
   {
    //Configure Layout for Document Camera Full Screen
    SEND_COMMAND vdvTandberg_TC,"'VL_FRAME_ADD-Monitor2Layout,FSFrame,0,0,10000,10000,1,1,localInput,2'"
   }
   CASE cLayout_DVDFS:
   {
    //Assign Input 3 to Composite
    SEND_COMMAND vdvTandberg_TC,"'PASSTHRU-xConfiguration Video Input Source 3 Connector: Composite'"
   
    //Configure Layout for DVD Full Screen
    SEND_COMMAND vdvTandberg_TC,"'VL_FRAME_ADD-Monitor2Layout,FSFrame,0,0,10000,10000,1,1,localInput,2'"
   }
   CASE cLayout_Preset2:
   {
    //Assign Input 3 to DVI
    SEND_COMMAND vdvTandberg_TC,"'PASSTHRU-xConfiguration Video Input Source 3 Connector: DVI'"
   
    //Configure Layout for Camera Full Screen and PC in PIP
    SEND_COMMAND vdvTandberg_TC,"'VL_FRAME_ADD-Monitor2Layout,FSFrame,0,0,10000,10000,1,1,localInput,1'"
    SEND_COMMAND vdvTandberg_TC,"'VL_FRAME_ADD-Monitor2Layout,FrameA,5690,6070,3940,3680,5,1,localInput,3'"
   
   
   }
   CASE cLayout_Preset3:
   {
    //Assign Input 3 to DVI
    SEND_COMMAND vdvTandberg_TC,"'PASSTHRU-xConfiguration Video Input Source 3 Connector: DVI'"
   
    //Configure Layout for PC Full Screen, Local Camera and Document Camera in PIP
    SEND_COMMAND vdvTandberg_TC,"'VL_FRAME_ADD-Monitor2Layout,FSFrame,0,0,10000,10000,1,1,localInput,3'"
    SEND_COMMAND vdvTandberg_TC,"'VL_FRAME_ADD-Monitor2Layout,FrameB,5690,790,3940,3680,4,1,localInput,1'"
    SEND_COMMAND vdvTandberg_TC,"'VL_FRAME_ADD-Monitor2Layout,FrameA,5690,6070,3940,3680,5,1,localInput,2'"
   }
   CASE cLayout_Preset4:
   {
    //Assign Input 3 to DVI
    SEND_COMMAND vdvTandberg_TC,"'PASSTHRU-xConfiguration Video Input Source 3 Connector: DVI'"
   
    //Configure Layout for Local Camera, PC and Document Camera in Side-by-Side PIP
    SEND_COMMAND vdvTandberg_TC,"'VL_FRAME_ADD-Monitor2Layout,FrameA,100,4000,3200,3200,1,1,localInput,1'"
    SEND_COMMAND vdvTandberg_TC,"'VL_FRAME_ADD-Monitor2Layout,FrameB,3400,4000,3200,3200,4,1,localInput,3'"
    SEND_COMMAND vdvTandberg_TC,"'VL_FRAME_ADD-Monitor2Layout,FrameC,6700,4000,3200,3200,5,1,localInput,2'"
   }
   CASE cLayout_Preset5:
   {
    //Assign Input 3 to DVI
    SEND_COMMAND vdvTandberg_TC,"'PASSTHRU-xConfiguration Video Input Source 3 Connector: DVI'"
   
    //Configure Layout for PC Full Screen and Local Camera in Center PIP
    SEND_COMMAND vdvTandberg_TC,"'VL_FRAME_ADD-Monitor2Layout,FSFrame,0,0,10000,10000,1,1,localInput,3'"
    SEND_COMMAND vdvTandberg_TC,"'VL_FRAME_ADD-Monitor2Layout,FrameA,500,1000,9000,8000,5,1,localInput,1'"
   }
   DEFAULT:
   {
    nLayoutSelection = cLayout_LocalCamFS
   
    //Configure Layout for Local Camera Full Screen
    SEND_COMMAND vdvTandberg_TC,"'VL_FRAME_ADD-Monitor2Layout,FSFrame,0,0,10000,10000,1,1,localInput,1'"
   }
  }
 
  SEND_COMMAND vdvTandberg_TC,"'VL_LOCAL_ASSIGN-Monitor2Layout,3'"
 
  //Assign Monitor 2 Layout to the Remote Site
  SEND_COMMAND vdvTandberg_TC,"'VL_REMOTE_MAIN_ASSIGN-Monitor2Layout,1'"
  SEND_COMMAND vdvTandberg_TC,"'VL_REMOTE_MAIN_ASSIGN-Monitor2Layout,2'"
  SEND_COMMAND vdvTandberg_TC,"'VL_REMOTE_MAIN_ASSIGN-Monitor2Layout,3'"
}
}

Subject: RE: Video Compositing through AMX controller
Replied by: Kyle Wilcoxen on 06-03-2010 04:43:13 PM
Can no one help me out? Again, local image compositing works flawless. I don't have more than 4 frames for the local composite. All the client wants is for the local composite layout to be shown to the far site. According to the documentation all I need to do is assign the layout that I've created, Monitor2Layout, to the far site via the VL_REMOTE_MAIN_ASSIGN command. However all the far site sees is the main camera.

Subject: RE: Video Compositing through AMX controller
Replied by: Viggo Fredriksen on 08-03-2010 11:36:27 AM
Hi Kyle,

   you've stumbled upon a bug in the Duet module. Seems like I broke it in an earlier release.  I've put up a new release
(1.1.2) at the moduel page.

Also note that you should not use layer 5 when dealing with remote layouts, as it only supports layer 1..4.

Regards,
   Viggo

Subject: RE: Video Compositing through AMX controller
Replied by: Kyle Wilcoxen on 08-03-2010 03:13:15 PM
Viggo, still doesn't work for me on an Edge or MXP6000. I changed the layers I was using to 1 - 4 like you stated. Still only seeing main camera on the far end codecs. If you need to take a look at my code let me know how to get that to you.

Subject: RE: Video Compositing through AMX controller
Replied by: Viggo Fredriksen on 08-03-2010 03:22:53 PM
Hi Kyle,

  you should have an e-mail from me now.

Regards,
   Viggo
CreatePlease to create content