OSC parsing


Hello, guyz!
I’m sticking with OSC data feed. According to implementation of OSC protocol and CasparCG Wiki i found how to watch needed addresses. For example /channel/1/stage/layer/1/file/time
Obviously - bytes after that address is value of parameter. Who can tell me how to interpret this value?
Is it HEX or something? Funny, but when i play in loop some media at channel 1 layer 1 this value doesn’t changed. How can it be?


For each /channel/1/stage/layer/1/file/time there are two values, the first should change, the second doesn’t.
Are you sure you are getting the first and not the last one?


PLAY 1-1 test loop
this command i use to start looped playback. And /channel/1/stage/layer/1/file/time doesn’t chaned


There are only 6 chars after /channel/1/stage/layer/1/file/time and all of them are the same. Nothing changes. Who can explain how?


Update!!! I found that after /channel/1/stage/layer/1/file/time totally 14 chars: 6 chars are the same (it is not depend of playing video) + 4 chars (seems like current time) + 4 chars (video duration. it doesn’t change, but it is different for each video). Now i need to know what means each byte of that value…


So, 4 bytes (current time) and 4 bytes (total time). It seems like 1st & 2nd byte are some kind of seconds, 3rd and 4th bytes are some kind of milliseconds (or ticks) - they are run very fast. I’m confused that current time starts not from 0. The differense between two bytes of totalTime and currentTime is remaining time (obviously). Test clip is 18 sec. long (439 frames@25 fps). Maximum differense for those values is 1129. But what is the measure unit used for this? How it relates to seconds?


If FFmpeg is used as decoder for playing media in CasparCG - does anybody know (developers for example)))) what kind of values it returns in OSC packets? Please share it with me))))
Thank you!


It sounds like you are trying to reverse engineer osc data encoding.
There are many OSC libraries out there that can handle this for you, but if you can’t use one of them I suggest looking up the osc spec to figure out how it encodes data.
All casparcg is doing here is reporting the time in seconds (with decimal values being possible)