I've hunted the forum and the web, and keep finding the same questions asked but never answered properly, so please could someone who knows, post for all of us who have endlessly searched and failed. I've build a lower thirds CasparCG client in LiveCode. I need to get two lines of text to appear over my Flash template. I can do this in the supplied CasparCG client, now I want to do it in my client. I need to do an CG ADD command with added xml eg - CG 1 ADD 0 'demo/test' 1 ' ' That's the example from the CasparCG documentation. Livecode seems be happy if you remove ' and replace with & quote &, but falls over when you get to the forward slashes -.
Escaping the escape codes doesn't work as Livecode keeps / in the string, and CasparCG doesn't like that. Please - a simple tutorial for us idiots rather than references to other posts or projects would help me, and, as it turns out, lots of other people Thank you Bernard Newnham. Code: put format('CG 1 ADD 0 'demo/test ' 1 ' ') into tCode I had to add escape characters to the quotes around 'demo test' and the start and end of the XML, as well as add quotes at the front and end of the entire string. Note this is only one single line, so ignore line wrap.
The resulting string is. Welcome to the forum! Sorry, but what exactly is your question? Thank you 2 The string in the original post is what one has to send to CasparCG in order to do the job required. It contains lots of slashes - the forward ones are xml and the backward ones are escapes for Caspar. Livecode doesn't seem to like these too much, especially the forward slashes. I've tried various versions of & quote & but mostly I get to and it refuses to play.
I've looked extensively at this forum and others and this seems to be a common Livecode problem, and not just with CasparCG. Lots of people trying to do this job are tv people like me with some programming knowledge but not actually programmers, and as far as I can see are generally like me trying to do a charity job for someone. All over the place these people are asking pretty much the same question.and thank you Jacque. That's the first time I've seen format - and the first time Livecode hasn't thrown a fit at the string. A great leap forward!! Not that it works at the CasparCG end, but that's probably my fault for writing the command wrongly. Hooray (I think) - days of really annoying research may be complete, and the result is here for others to reference.
Download; CasparCG is a professional, free & open source video and graphics play-out system for TV broadcasts, events and digital signage. Easily configure the standard functionality of Flash Media Playback.
So far I have the main Livecode part of the application more or less done. The requirement is to make what are called 'lower-third supers' in tv. This is the text at the bottom of the screen that gives the name and occupation of the speaker on a news programme. CasparCG is a free server/client application made by Swedish TV SVT. You run the server, and a client - either the supplied one or one you write yourself - sends commands and info.
CasparCG is used all over the world because it's incredibly flexible. You'd think that what I need would be all over the place, but it isn't. When (if) this works I will publish mine for free so that anyone can do what I've been trying to do for ages. So - the way in which supers get on and off is fixed by a Flash template loaded separately into the CasparCG server, but the actual text content is different for everyone, and is supplied by a client application. Livecode would seem a natural for this task if it's a charity job - CasparCG is free, and so is Livecode.
![Download Download](https://i.pinimg.com/originals/a9/56/15/a95615fe14c18a8bef63563b9462f5af.jpg)
I've now largely completed the front end. Users will input two fields, one for the name and one for the occupation. These are stored in SQLite till needed. Another card is the edit and output card which uses a datagrid for the various operations, though so far I haven't connected that to the actual output socket as i can't get the application to sent a correctly formatted test string. Livecode connects to the server via a socket and sends a set pattern of command and text to make a super appear and disappear. The string you ask about comes from the example at the CasparCG wiki in the CasparCG_2.0_AMCP_Protocol Template_Data section (can't do URL). All that's required of Livecode is to add the name and occupation fields to the preset string.