We consider a video streaming application over P2P networks and introduce the P2P on-line server selection problem. This task is related to the classic K-server problem, known from the theory of online algorithms. The difference is that our problem has a dynamic cost matrix, due to network congestion which may trigger the rerouting of streaming paths. With the assumption that the number of hops of any alternative path from the server node p to the requesting node q is at most times the number of hops of the shortest path from p to q, our dynamic work function algorithm works for the P2P on-line server selection problem with competitive ratio