def initialize_player(self):
        "initialize  a vlc player which plays locally and stream to the lan"
        self.inst = vlc.Instance()   
        self.p = self.inst.media_player_new() 
        cmd = [self.instream]
        s = "sout=#duplicate{"
        for ip,port in self.destinations:
            s+="dst=rtp{dst=%s,port=%s}," %(ip,port)
        s = s[:-1]
        s+="}"
        cmd.append(s)
        cmd.append("no-sout-rtp-sap")    
        cmd.append("no-sout-standard-sap")
        cmd.append("sout-keep")
        self.med=self.inst.media_new(*cmd)   
        self.med.get_mrl()    
        self.p.set_media(self.med)
        self.initialized = True
initialize  a vlc player which plays locally and stream to the lan
recipes/Python/578556_How_stream_mp3_file_using_vlcpy_simple_TKinter/recipe-578556.py