Page 1 of 1
Complete Beginner - Frustrated
Posted: Sat May 09, 2015 10:49 pm
by hughdemand
I am dumber than I thought !
Nick Voll sent me his scorebug client code, I can't make it run. It will access the Caspar server but nothing appears. It has been suggested the paths to the files might be incorrect.
Do the files have to be stored in a particular location or is it suffice if the path is correct.
For learning purposes I would like to create a two button client
one to connect to the CasparCG server
second one to send it a graphic
Any suggestions for workable code?
Also, there seems to be so much discussion and support for Flash templates. Are they a necessity for LiveCode accessing CasparGC ?
Can the text in the graphic be updated by some other means? Perhaps a xaml file.
Perhaps the entire output to the Caspar server might just be a xaml file?
THanks
Whit
Re: Complete Beginner - Frustrated
Posted: Sun May 10, 2015 10:30 pm
by jacque
I'm mostly just bumping this thread in hopes you get an answer, since I don't know anything about Casper server. I had to look it up just to see what it was. It might help if you post the script you're trying to use so we can see what you're doing.
Some general server behaviors are that they will not usually accept uploads via http, you need to use an ftp URL that includes login credentials. You should be able to upload an image as a binary file directly without any other alterations, but again, I'm not sure what Casper expects. Flash isn't required for LiveCode ever, and doesn't even support it directly.
Re: Complete Beginner - Frustrated Progress
Posted: Mon May 11, 2015 7:38 pm
by hughdemand
I must report I did manage to create a brief stack that would play a video via CasparCG. Thanks for the "BUMP"
Still no success with still graphics nor Flash Templates.
I guess, like life, there are no shortcuts. Here is one script I couldn't get to function. It should be displaying a graphic via the Flash template (?) on the CasparCG server.
Code: Select all
on mouseUp
if label of me is "Show" then
set label of ME to "Hide"
set the backgroundcolor of ME to red
put "CG 1-2 ADD 1 FS-Scorebug-no-Tab-Pop-Up 1 " after lower3rdxml
put quote after lower3rdxml
put "<templateData><componentData id=\" after lower3rdxml
put quote after lower3rdxml
put "popuptext\" after lower3rdxml
put quote after lower3rdxml
put "><data id=\" after lower3rdxml
put quote after lower3rdxml
put "text\" after lower3rdxml
put quote after lower3rdxml
put " value=\" after lower3rdxml
put quote after lower3rdxml
put field lower3rd after lower3rdxml
put "\" after lower3rdxml
put quote after lower3rdxml
put " /></componentData></templateData>" after lower3rdxml
put quote after lower3rdxml
put field IP after server
write lower3rdxml & format("\r\n") to socket server
else
set label of ME to "Show"
set the backgroundcolor of ME to empty
write "cg 1-2 stop 1" & format("\r\n") to socket field IP
end if
end mouseUp
Re: Complete Beginner - Frustrated
Posted: Mon May 11, 2015 8:05 pm
by jacque
I don't see where you've opened the socket, so there is nothing to write to unless you've done that elsewhere in the script. I'd think you would need some credentials as well, but maybe you've covered that already.
I hope someone who knows more about this stuff can offer suggestions.
Re: Complete Beginner - Frustrated
Posted: Mon May 11, 2015 10:34 pm
by mwieder
I assume the reference here is to
http://forums.livecode.com/viewtopic.ph ... 4&start=15 and that Nick is using the OSC library that I wrote back in 2006.
Whit- no question about 'dumber than I thought'... dealing with the OSC protocol used by the CasparCG server is not what I would particularly consider a beginner task. I don't know much more about CasparCG than the hints I gave Nick originally to get him started, but it seems like he (and you, at least partially) have had some success communicating with it. But I'd suggest printing out lower3rdxml before writing it to an open socket to make sure you've got the syntax right. And checking the result after the write command to see if an error occurred.