OSC listener Caspar 2.2 does not return message


#1

We have downloaded stable CasparCG 2.2 from http://builds.casparcg.com/ and installed in windows 10 server.
We have a J2EE application which reads OSC message to display play out duration of media.
This works fine in CasparCG 2.07, but does not work in 2.2.
The listener does not return anything.

------config file -----------------------------------------

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <paths>
    <media-path>media/</media-path>
    <log-path>log/</log-path>
    <data-path>data/</data-path>
    <template-path>template/</template-path>
    <font-path>font/</font-path>
  </paths>
  <lock-clear-phrase>secret</lock-clear-phrase>
  <channels>
    <channel>
      <video-mode>1080i5000</video-mode>
      <consumers>
        <screen>
          <device>1</device>
        </screen>
        <decklink>
          <device>1</device>
          <embedded-audio>true</embedded-audio>
		  <buffer-depth>4</buffer-depth>
        </decklink>
        <system-audio />
        <decklink>
          <device>2</device>
		  <embedded-audio>true</embedded-audio>
		  <buffer-depth>4</buffer-depth>
        </decklink>
        <decklink>
          <device>3</device>
		  <embedded-audio>true</embedded-audio>
		  <buffer-depth>4</buffer-depth>
        </decklink>

        <decklink>
          <device>4</device>
		  <embedded-audio>true</embedded-audio>
		  <buffer-depth>4</buffer-depth>
        </decklink>
      </consumers>
    </channel>
  </channels>
  <osc>
  <default-port>8250</default-port>
  <disable-send-to-amcp-clients>false</disable-send-to-amcp-clients>
  <predefined-clients>
    <predefined-client>
      <address>127.0.0.1</address>
      <port>8250</port>
    </predefined-client>
  </predefined-clients>
 </osc>
  <controllers>
    <tcp>
      <port>5250</port>
      <protocol>AMCP</protocol>
    </tcp>
  </controllers>
  <amcp>
    <media-server>
      <host>127.0.0.1</host>
      <port>8250</port>
    </media-server>
  </amcp>
</configuration>

#2

Do you run scanner.exe? Start CasparCG with this file: “casparcg_auto_restart.bat”. That will start both.


#3

I have started caspar_auto_restart.bat . The output is attached in bellow


#4

Actually some parameters are changed for server 2.2. This is the reason old client is not able to work as before.

Here is a vb dot net code showing osc register methods

        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/output/port/500/type")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/output/port/600/type")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/profiler/time")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/format")

        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/profiler/time")

        If Mid(frmmediaplayer.lblserverversion.Text, 1, 3) = "2.2" Or Mid(frmmediaplayer.lblserverversion.Text, 1, 3) = "2.3" Then
            sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/foreground/file/time")
        Else
            sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/file/time")
        End If


        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/file/frame")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/file/fps")


        If Mid(frmmediaplayer.lblserverversion.Text, 1, 3) = "2.2" Or Mid(frmmediaplayer.lblserverversion.Text, 1, 3) = "2.3" Then

            sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/foreground/file/path")
        Else

            sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/file/path")
        End If


        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/time")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/frame")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/type")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/background/type")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/profiler/time")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/transition/frame")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/transition/type")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/file/video/width")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/file/video/height")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/file/video/codec")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/file/audio/sample-rate")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/file/audio/channels")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/file/audio/format")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/file/audio/codec")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/loop")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/host/path")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/host/width")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/host/height")


        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/host/fps")


        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/host/buffer")

        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/" & "nb_channels")

        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/1/dBFS")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/2/dBFS")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/3/dBFS")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/4/dBFS")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/5/dBFS")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/6/dBFS")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/7/dBFS")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/8/dBFS")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/9/dBFS")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/10/dBFS")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/11/dBFS")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/12/dBFS")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/13/dBFS")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/14/dBFS")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/15/dBFS")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/16/dBFS")



        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/output/port/200/frame")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/output/port/200/path")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/output/port/200/fps")

        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/paused")


        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/output/port/150/file/frame")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/output/port/150/file/path")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/output/port/150/file/fps")

        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/file/vframe")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/file/speed")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/output/file/frame")

        'for server 2.2 start
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/foreground/file/name")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/mixer/audio/volume")

        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/foreground/file/streams/0/fps")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/buffer")
        sOscServer.RegisterMethod("/channel/" & g_int_ChannelNumber & "/stage/layer/" & g_int_PlaylistLayer & "/foreground/file/stime")
        'for server 2.2  end 

        sOscServer.FilterRegisteredMethods = False 'false so that if we change by hand the method name in client it will react to new method.

#5

I, too, discovered that the OSC message format has changed, but IIRC the wiki page did not.

(Is there a comprehensive doc about the changes into 2.2 or does one need to read the git commit messages?)


#6

Thanks for your reply .
I have used OSCPortIn() like

oscportinReceiver.addListner("/channel/1/stage/layer/"+layer+"/file/time",getDuration) where getDuration is a OSCListner object trying to acceptMessage.
CasparCG 2.07 works fine, but does not work in 2.2.


#7

Note that file/time has been replaced by
foreground/file/time

Full list is here


#8

I recommend that you find/make an osc message capture program and catch a few seconds of messages. That’ll show you all of the parts coming out and the data formats.


#9

Thank you . It’s working now.


#10

throw this exception.