Image Compositor Socket

ardour - the new digital audio workstation - includes rudimentary support to display video-timelines. - For this to work the video-data needs to be supplied by a 3rd-party application via TCP-socket, hence the name: Image Compositor Socket.

Back in 2004/2005 aniComp from the CMT, Glasgow Animatics-server was supported in Ardour-0.99; but since then ardour-2.X ICS code has been mostly unmaintained.

I took to code a video-server that implements the ICS protocol to communicate with ardour and manages EDL video-sessions. This wiki page documents information regarding interoperability and interaction with ardour.

ICS and ardour 2.X

ardour-0.99.3 works just fine. However the 2.0-ongoing branch (currently ardour-2.5, svn rev. 3617) introduces video-display regressions that require patching: You can grab split-patches and follow discussion at http://tracker.ardour.org/view.php?id=2364 or download a combined patch from here.

Setup

ardour enables it's video-capabilities if it can find an executable aniComp in $PATH. Probably the easiest way to accoplish this is to:

sudo ln -s /bin/true /usr/local/bin/aniComp

ardour2 will also need the an additional line in the ardour.menus configuration file:

<menuitem action='aniConnect'/>

I've added it below the “AddTrackBus” entry.

Launch the socket-server, ardour and activate ardour's “connect” menu-entry.

ICS Protocol

handwritten ICS-ardourvis annontations ICS communicates via TCP port 30000. The general syntax is in ASCII text: Every message but the raw-video-data is encoded as Text, integers are represented as decimal values.

NUMBER  := <ascii-decimal-integer (3 or 10bytes)>
TEXT    := <length (3bytes)><data (length bytes)>
REPLY   := "RT0" | "RT1"
COMMAND := <2-byte-command> [2-byte-id]* [TEXT]* [NUMBER]*

there are various 2-byte identifiers for commands, items and attributes (eg. IN: insert, RM: remove, IT: imageframe time axis etc). for a full list see the ardour source:

gtk2_ardour/ardour_image_compositor_socket.h
gtk2_ardour/imageframe_socket_handler.cc
gtk2_ardour/imageframe_socket_handler.h

If you don't have aniComp and can't wait until sodankyla is deployable, you can connect to ardour using the gnu-tool socket. Here's an annotated example session:

#
# $ socket -v -ls 30000
#
# load session
SAOS019/tmp/a25/a25.ardour
#
# create new video-track "TTTT"
INIT004TTTT
# rename "TTTT" to "NAME"
MVIT004TTTT004NAME
# insert a new marker-track (just testing)
INMT005VNAME004NAME
# add a new video-scene/group to the video-track
INIG004NAME007myscene
# add an image to the video-scene
#   Track  Scene     Chunk
#   |      |         |      start     duration
#   |  +   |  +      |  +   |         |
INII004NAME007myscene004myID00000000000000048000
#
# ardour asks:
#
# "RQID004NAME007myscene004myID066" 
#      |  +   |  +      |  +   | 
#      |      |         |      preferred height
#      Track  Scene     Chunk 
#
#
# reply - header
#   Width
#   |  Height
#   |  |  SPP
#   |  |  |  Data len
#   |  |  |  | 
RDID00800600300000000000000000000000000000144
# expect "RT1" from ardour.
# now send image data - here: 144 bytes 
000...000 (repeat)

Note: ardour-0.99.3 expects SPP=4 and RGBA image data. The patched ardour2 can handle RGB24 and RGBA32.

external resources

 
wiki/ics.txt · Last modified: 09.12.2013 01:48 by rgareus