server icon indicating copy to clipboard operation
server copied to clipboard

audio levels info for each audio channel in OSC changed v2.3 ?

Open TKooijmans opened this issue 4 years ago • 7 comments

With v2.1 I could read audiolevels with OSC like /channel/1/mixer/audio/1/dBFS /channel/1/mixer/audio/2/dBFS

Current behaviour

Now I see only message like this /channel/1/mixer/audio/volume 68091904

so no indication of a audio track number


Steps to reproduce

  1. read OSC messages while casperCG is running a clip
  2. ...

Environment

Server v 2.3.2

  • Operating system:Windows 10

Screenshots monitor OSC

/channel/1/framerate 50 /channel/1/mixer/audio/volume 68091904 /channel/1/stage/layer/1/background/producer empty /channel/1/stage/layer/1/foreground/buffer 2 /channel/1/stage/layer/1/foreground/file/audio/channels 8 /channel/1/stage/layer/1/foreground/file/audio/sample-rate 48000 /channel/1/stage/layer/1/foreground/file/fps 50 /channel/1/stage/layer/1/foreground/file/name DeckLink 4K Extreme /channel/1/stage/layer/1/foreground/file/path 2 /channel/1/stage/layer/1/foreground/file/video/height 1080 /channel/1/stage/layer/1/foreground/file/video/width 1920 /channel/1/stage/layer/1/foreground/has_signal True /channel/1/stage/layer/1/foreground/paused False /channel/1/stage/layer/1/foreground/producer decklink /channel/1/stage/layer/1/foreground/profiler/time 0,01 /channel/1/framerate 50

TKooijmans avatar Feb 19 '21 12:02 TKooijmans

in vbdotnet dBFS value is calculate as 20 * (Math.Log10(value / Int32.MaxValue))

vimlesh1975 avatar Feb 19 '21 13:02 vimlesh1975

The problem is not the value, but how to get each channel. Now I have 4 channels audio coming in in channel 1 So I only see total volume channel 1? How to separate audiochannels?

TKooijmans avatar Feb 19 '21 14:02 TKooijmans

The message /channel/1/mixer/audio/volume has 16 data e.Message.Data(0) e.Message.Data(1) . . . e.Message.Data(14) e.Message.Data(15)

vimlesh1975 avatar Feb 19 '21 14:02 vimlesh1975

Hi Vimlesh if I try that I get an error. I do something like this

Private Sub sOscServer_MessageReceived(ByVal sender As Object, ByVal e As OscMessageReceivedEventArgs) Handles sOscServer.MessageReceived

    Debug.Print(e.Message.Address & " " & e.Message.Data(0))

end sub

TKooijmans avatar Feb 19 '21 17:02 TKooijmans

Ok I got it thanks!!! e.Message.Data has only more data when volume tage arrives.

TKooijmans avatar Feb 19 '21 17:02 TKooijmans

Now next step how to record four audiochannel SDI video from a decklink input... I see for audio channels come-in but when I do ADD 1 FILE Testcapture.mxf -b:v 35000000 -codec:a pcm_s24le -codec:v mpeg2video -filter:v interlace,zscale=rangein=full:range=limited:primaries=709:transfer=709:matrix=709,format=yuv420p -alternate_scan:v 1 -g:v 12 -bf:v 2 -minrate:v 35000k -maxrate:v 35000k -color_primaries:v bt709 -color_trc:v 1 -colorspace:v 1 -filter:a pan=3.1|c0=FL|c1=FR|c2=BR|c3=BL

I get a four channel videoclip but channel 3 and 4 are silent

TKooijmans avatar Feb 19 '21 17:02 TKooijmans

With the above command i got in console `[2021-02-20 13:25:50.623] [info] [ffmpeg] [Parsed_pan_0 @ 000001DF48A54B00] Pure channel mapping detected:

[2021-02-20 13:25:50.623] [info] [ffmpeg] 0

[2021-02-20 13:25:50.623] [info] [ffmpeg] 1

[2021-02-20 13:25:50.623] [info] [ffmpeg] 5

[2021-02-20 13:25:50.623] [info] [ffmpeg] 4`

May be you try following audio filter -filter:a pan=3.1|c0=c0|c1=c1|c2=c2|c3=c3

vimlesh1975 avatar Feb 20 '21 08:02 vimlesh1975