Drastic DDR HTML AJAX Control

The Drastic DDR HTML/AJAX SDK provides complete access to all the functions for controlling all of Drastic's DDRs. An abstraction of the MediaCmd SDK, commands can be sent from any web browser or web page.  The HTML/AJAX version supplies all the same commands as the Drastic DDR MediaCMD SDK used by all Drastic applications.  This means that it is possible to provide the exact same functionality from a web browser as is available in user interfaces like videoQC, DrasticDDR and Net-X-Code.

Image

To fully understand the MediaCMD SDK it is best to start with the direct link version of the API, which can be found here. The commands for VVW may be sent via HTTP by the commands below (play, stop, etc.) from a user web page. To have the page displayed again after the command it must be 'passed through' the command interpreter. This is done using the VVW virtual passthrough page 'VVWPassThrough'. Following this command should be a '?' separator, the page name 'page=XXX.html' and then any other commands separated by the '&' sign.


        page=%s··· ·               Next page to load
        channel=%ld··· ·         Channel for this command, overrides current channel
        mode=%ld··· ·             Clip=0, VTR=1, Single=2
        type=%ld··· ·                General type number
        setchannel=%ld···     Set a new current channel
        load=%s··· ·                 Load a new clip (server and single mode)
        delete=%s··· ·              Delete a clip
        remove=%s··· ·            Remove clip from list, but leave on disk

        insert=%s··· ·             Add a new clip

        recstop=%s··· ·         Record-Stop with new clip name (8 characters) 

    Transport

       play··· ·                         Play mode (normal play speed)
       play=%ld··· ·                Play mode at speed where
       65520 =                      play
      -65520··· ·=                  reverse play
       32760··· ·=                  half speed play
       655200··· ·=                10 times play speed
       stop··· ·                        Stop mode
       pause··· ·                    Pause mode
       record··· ·                    Begin Record
       speed=%ld··· ·          Set Play speed (requires play)
      seek=%s··· ·               Seek to a time code location
    +5:00··· ·=                      move forward five seconds from current position
     -01:00:00:00··· =          move backward one hour from current position
      1:21:00:00··· ·=            go to one hour, twenty one minutes
      setin=%ld··· ·               Set a new in point
      setout=%ld··· ·             Set a new out point
      setpos=%ld··· ·            Set a new position

     To get the current status as a small web page:
             http://localhost/VVWStatus=#
                  Where # is 0, 1 or 2
                   0:··· ·Page with title
                   1:··· ·Horizontal status
                   2:··· ·Vertical status

      To get the current list of media (in clip or single mode) or the edit list (VTR mode).
             http://localhost/VVWMedia=#
                  Where # is 0, 1, or 2
                   0: List with channel select, mode and mini control
                   1: List with mini control (play, pause, etc)
                   2: List by itself

      Other internal pages are:

          http://localhost/VVWSystem
              – Lists available channels with name, type, presets, mode and time code type

          http://localhost/VVWAudio
              – Lists number of audio channels, input and output type, and input and output levels

          http://localhost/VVWVideo
              – Lists inputs and outputs as well as reference settings

          http://localhost/VVWControl*
             – Simple control panel (HTTP buttons), media listing and status

          http://localhost/VVWMisc
             – VVW / MR Versions, downloads for Java applications, external links/contact

          http://localhost/VVWChannels
             – Horizontal table of all available channels' state, position and current clip (auto refreshing)

Internal responses (mostly used for secondary php/perl servers). These are text-only responses. They do not include any HTML tags of any sort and are normally used when another web server used Perl or PHP to integrate our control and response into another page.

          http://localhost/VVWGetState
            – returns state as a word, e.g. Play, Pause, Stop, etc
          http://localhost/VVWGetPosition
            – returns position as a time code, e.g. 00:00:04;28
          http://localhost/VVWGetFrame
            – returns position as a frame number, e.g. 148
          http://localhost/VVWGetLastChangeMs
            – returns the ms time of the last change of the current clip bin or VTR TC Space
          http://localhost/VVWGetErrorLogMs
            – returns the ms time of the last change of the error log

XML Returns. These are to be used with AJAX/DOM pages.

http://localhost/VVWXMLGetStatus
– Returns an XML package including state, speed, position start and end points

http://localhost/VVWXMLNextClip
– Returns an XML package with all the clip information. Used to retrieve the clip bin information

http://localhost/VVWXMLClipInfo
– Returns an XML package with all the clip information. Used to retrieve information on a specific clip

http://localhost/VVWXMLEDLState
– Used in conjunction with VVWXMLEDLInfo to retrieve the time code space edits. The command will always be VVWXMLEDLState?position=#&videochannels=#&audiochannels=#&infochannels=#

http://localhost/VVWXMLEDLInfo
– Used in conjunction with VVWXMLEDLState to retrieve the time code space edits

Here is a basic EDL retrieval session:

Call··· ·Position··· ·Start··· ·End ··· ·V ··· ·A ··· ·I ··· ·File Name··· ·Comment
VVWXMLEDLInfo··· ·0···
0··· ·0··· ·0···
Restart list at 0
return info··· ·0··· ·0··· ·300··· ·1··· ·2··· ·0··· ·file1.mov··· ·10 sec VA2 from file1
VVWXMLEDLState··· ·0···
0··· ·0··· ·0···
First state sent in above
return state··· ·0···
1··· ·2··· ·0···
Used clip channels to pass back into Info
VVWXMLEDLInfo··· ·0···
1··· ·2··· ·0···
Copy of the return of VVWXMLEDLState above
return info··· ·0··· ·0··· ·150··· ·0··· ·1··· ·0··· ·file2.wav··· ·5 sec A1 from file2
VVWXMLEDLState··· ·0···
1··· ·2··· ·0···
Use the return of the last VVWXMLEDLState
return state··· ·0···
1··· ·3··· ·0···
These are the channels used so far
VVWXMLEDLInfo··· ·0···
1··· ·3··· ·0···
Copy of the return of VVWXMLEDLState above
return info··· ·150··· ·150··· ·210··· ·0··· ·1··· ·0··· ·file3.wav··· ·2 sec A1 from file3
VVWXMLEDLState··· ·0···
1··· ·3··· ·0···
Use the return of the last VVWXMLEDLState
return state··· ·150···
0··· ·1··· ·0···
All edits completed before 150

Take the MEDIACMD struct returned from VVWXMLEDLState and find the next active clip. For the first clip in the time line, send all zeroes. Other than the first call, all calls should include the position/channel bits from the previous VVWXMLEDLState call and (other than first call) VVWXMLEDLState should be called immediately before VVWXMLEDLInfo .

http://localhost/VVWXMLNextDirEntry
– Used to retrieve the directory structure.
Takes 2 parameters:
The base directory you are getting the listing for
The last directory entry returned

Assuming you had a directory structure that looked like this:

\Record\
\Record\Test.wav
\Record\Test.avi
\OfflineMedia\
\OfflineMedia\EmptyDir\
\OfflineMedia\retry.doc
\OfflineMedia\big.tga
\LocalMedia\AnotherDir\
\LocalMedia\test.aiff

The first call would only include the parameter '\'
http://localhost/VVWXMLNextDirEntry?\
Returns: <locator>\Record</locator>
This will return the first FileDir XML structure that will include the first locator. To get the next item, return the same base path plus the new locator.
http://localhost/VVWXMLNextDirEntry?\?\Record
   Returns: <locator>\OfflineMedia</locator>
http://localhost/VVWXMLNextDirEntry?\?\OfflineMedia
   Returns: <locator>\LocalMedia</locator>
http://localhost/VVWXMLNextDirEntry?\?\LocalMedia
   Returns: <locator>END OF LIST</locator>
To descend into a sub directory, use the sub directory as the base path. To see what is in \Record
http://localhost/VVWXMLNextDirEntry?\Record\
   Returns: <locator>\Record\..</locator>
http://localhost/VVWXMLNextDirEntry?\Record\&\Record\..
   Returns: <locator>\Record\Test.wav</locator>
http://localhost/VVWXMLNextDirEntry?\Record\&\Record\Test.wav
   Returns: <locator>\Record\Test.avi</locator>
http://localhost/VVWXMLNextDirEntry?\Record\&\Record\Test.avi
   Returns: <locator>END OF LIST</locator>

http://localhost/VVWXMLFileInfo
– Used to retrieve information on a specific file.

http://localhost/VVWXMLGetErrorMsg&#
– Used to return one error message from the current list. The first call will not include an error number (just VVWXMLGetErrorMsg). This will return an ErrorNumber to use to get the next message (VVWXMLGetErrorMsg&202 for instance), as will each subsequent call. When all the error messages have been returned, it will return an ErrorNumber of -1.

Dealing with picon images
Server Mode, clip: Kroatien, file: KroatienMovie.mov

http://localhost/VVWXMLMediaCmd?SetValue&cmdalt=1000000&clipid=Kroatien&position=200
– Make a new picon from frame 200 of the clip Kroatien
– result name: KroatienMovie.picon.jpg

http://localhost/VVWXMLMediaCmd?GetValue&cmdalt=1000000&clipid=Kroatien&position=ffffffff
– Return the actual file name of the picon file (char elem 9)
– result name: Kroatien.picon.jpg

http://localhost/VVWXMLMediaCmd?GetValue&cmdalt=1000000&clipid=Kroatien&position=4294967295
– Return the size of the picon file in the Position elements
– result: dwPosition = 7900

http://localhost/VVWXMLMediaCmd?GetValue&cmdalt=1000000&clipid=Kroatien&position=1
– Return the actual bytes of data for the JPEG picon frame in arbID
– result: Not available in HTTP, have to use C/C++

http://localhost/VVWXMLMediaCmd?SetValue&cmdalt=1000000&filename=V:\Media\KroatienMovie.mov&position=100
– Make a new picon from frame 100 without associating it with the clip
– result name: KroatienMovie.picon.jpg
(not normally used, conflicts with VTR tape mode picon)

VTR Tape Mode, Time line 00:00:01:00 Kroatien.mov?

http://localhost/VVWXMLMediaCmd?SetValue&cmdalt=1000000&filename=V:\Media\Kroatien.mov&position=1000
– Make a new picon from the frame at position 1000, default for file
– result name: Kroatien.picon.jpg

http://localhost/VVWXMLMediaCmd?GetValue&cmdalt=1000000&filename=V:\Media\Kroatien.mov&position=ffffffff
– Return the actual file name of the picon file (char elem 9)
– result name: Kroatien.picon.jpg

http://localhost/VVWXMLMediaCmd?GetValue&cmdalt=1000000&filename=V:\Media\Kroatien.mov&position=4294967295
– Return the size of the picon file in the Position elements
– result: dwPosition = 7900

http://localhost/VVWXMLMediaCmd?GetValue&cmdalt=1000000&filename=V:\Media\Kroatien.mov&position=1
– Return the actual bytes of data for the JPEG picon frame in arbID
– result: Not available in HTTP, have to use C/C++

http://localhost/VVWXMLMediaCmd?<mediacmd>
– Allows user to send an arbitrary media cmd. It must be followed by at least 1 parameter.
The first parameter must be be one of the following words
    Stop – Full stop/all stop/e to e
    Pause – Pause on current frame, seek or load
    Play – Play, either at normal speed or shuttle speeds. May also load and seek.
    Record – Record to the disk or tape
    RecStop – Prepare for a record
    Eject – Eject the current tape or media
    Transfer – Transfer between (to or from) an internal channel and an external channel
    Insert – Insert media into the clip bin or time code space
    Blank – Remove media from the clip bin or time code space
    Delete – Delete media from the storage and blank it
    Trim – Alter a clip or time code space edit
    ChanSelect – Change the currently selected channels
    GetState – Get the current channel state
    SetState – Set the current channel state
    GetValue – Get a setup value
    ValueSupported – See if a setup value is supported
    SetValue – Change a setup value
    Error – Report an error
    Terminate – Kill the current operation
    Abort – Abort the current operation
This may be followed by any combination of the following parameters:
    channel=
# the channel number to send the command to
position=
# frame or number to set position to
0:00 time code to set the position to
+# positive offset frame
+1:00 positive offset time code
-# negative offset frame
-1:00 negative offset time code
    start=
# frame or number to set
0:00 time code to set
+# positive offset frame
+1:00 positive offset time code
-# negative offset frame
-1:00 negative offset time code
    end=
# frame or number to set
0:00 time code to set
+# positive offset frame
+1:00 positive offset time code
-# negative offset frame
-1:00 negative offset time code
    speed=
Standard VVW speeds where
65520 = Normal Play
0 = Pause
-65520 = Reverse Play
655200 = Ten times normal play
-32760 = Reverse half speed play
    timems=
# millisecond time to set
    cmdalt=
# to set cmd alt to
    videochannels=
    audiochannels=
    infochannels=
ClipID
ClipID to use as a string
FileName
FileName to use as a string
String
String to place in the Clip ID and File Name area
Flags
Deferred
OverideDeferred
AllIDs
NoClipFiles
NoTCSpaces
IsShuttle
UsingCurrent
UseFrameCount
Fields
Ripple
Trigger
Preview
Invert
Test
NoReturn

– This command will return an XML MediaCmd with the results

Here are a few VVWXMLMediaCmd example commands:

VVWXMLMediaCmd?play
– Normal play
VVWXMLMediaCmd?play&speed=32760
– Play at 50% forward speed
VVWXMLMediaCmd?play&speed=-65520
– Play at 100% reverse play speed
VVWXMLMediaCmd?play&start=1:00&end=4:00&loop
– Play from one second to four seconds in a loop
VVWXMLMediaCmd?pause
– Pause the channel
VVWXMLMediaCmd?stop
– Stop (e to e passthrough) the channel
VVWXMLMediaCmd?pause&position=1:00:00
– Seek to one minute
VVWXMLMediaCmd?record&clipid=newrec&end=5:00
– Record a new file name 'newrec' which will be five seconds long

Please see the supplied HTML files and the generated files for more information.


Pricing for this SDK is offered in the form of a quote, based on the product you are making, its application and market, and projected quantities. All information provided will be treated as confidential.

More great products from Drastic

Image

videoQC will take the media coming into your facility and perform a series of automated tests on video, audio and metadata values against a template, then analyze the audio and video. It includes...

Net-X-Code is a group of IP capture, control, convert and output applications designed to run on one or more servers on your LAN, in the cloud, or as a hybrid....

Image
Image

Drastic's Net-X-Code system includes a partial file restore system, that is available as a standalone server system. The partial file restore system inclu...

 

 

Trademarks, Registered Trademarks, and Copyrights

 

Trademarks, Registered Trademarks, and Copyrights

Drastic Technologies, Ltd. – trademarks specified here.
The Perl Foundation - Perl and the Perl logo are trademarks of The Perl Foundation
All other trademarks are the property of their respective owners.

 

 

 

Image

For more than two decades, Drastic™ has been developing cutting edge digital video solutions for television, post production and sports broadcasting, from real time web delivery to 8K broadcast.

We offer standalone software for the end user or enterprise, integrated solutions for automated workflows, and OEM tools for custom applications or branded devices.

Contact Us

Address:
523 The Queensway, Suite 201
Toronto, ON
M8Y 1J7, Canada

Phone: +1 (416) 255 5636

Email: sales@drastictech.com

Fax: + 1 (416) 255 8780

Follow us on Social Media