Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Blackmagic Design videohub writing software python

  • videohub writing software python

    Posted by Maurice Jansen on July 23, 2012 at 9:45 pm

    hi there all

    i’m trying to write a app in python to build
    a simple totalrecall program for our BM router.
    since it will be used for 3 shows every week with different
    router setup’s.

    i’m just starting programing in python and run into trouble.
    lack of knowledge i guess 😉

    i have it already running the dirty way with the terminal command

    nc 192.168.42.50 9990 < textfile.txt
    textfile.txt contains all route’s in the format described in the manual.
    this works but not all our operators are good in commandline foo 😉

    of coarse i can do it with a applescript too but want to make it in python
    crossplatform

    in python
    reading the setup on connecting to the router
    works ok.
    re sending this to the router works also.

    but rereading the router when route’s have changed
    is going wrong all the time due to polution in the
    input buffer are there any python guru’s here that can help me out.

    see code below

    import socket
    import struct, time
    import os
    from Tkinter import *
    import tkMessageBox

    HOST = “192.168.42.50”
    PORT = 9990
    #make socket and connect to BM router
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((HOST, PORT))
    #fill variables with all router settings
    header = s.recv(4096)
    setup = s.recv(4096)
    labelsin = s.recv(4096)
    labelsuit = s.recv(4096)
    locked = s.recv(4096)
    routes = s.recv(4096)

    def leesuit():
    #read routes out of the BM router
    #garbage = s.recv(4096)
    global routes
    s.send(“VIDEO OUTPUT ROUTING:nrnr”)
    #command to get routes again from the router
    routes = s.recv(4096)
    return

    def schrijfnaar():
    #send routes to the BM router
    #global routes
    s.send(routes)
    #garbage = s.recv(4096)
    print routes
    return

    gui =Tk()
    gui.title(“blackmagic total recall test”)
    gui.geometry(‘400×600+200+200’)
    button1 = Button(gui, text=”Read From MTX” , width=20,command=leesuit)
    button1.pack(padx=15,pady=15)
    button2 = Button(gui, text=”Send to MTX” , width=20,command=schrijfnaar)
    button2.pack(padx=15,pady=15)
    gui.mainloop()

    thanks in front if you can help

    sorry for the indention errors

    kind regards
    maurice

    People saying they don’t make mistake’s often make nothing at all!

    Marco Tommasoni replied 12 years, 1 month ago 3 Members · 2 Replies
  • 2 Replies
  • Daniel Moore

    July 25, 2012 at 12:18 am

    Hi Maurice,

    Your best bet for software development support with Blackmagic products is to
    contact Blackmagic Developer Support at developer@blackmagicdesign.com .
    They should be able to help you out.

    cheers

    Daniel

  • Marco Tommasoni

    April 5, 2014 at 6:30 am

    Hi!

    hello, I know this is an old topic, but did you solve the problem?

    And how?

    Thankyou,
    Marco

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy