S
S
swyt2021-12-31 19:07:09
Python
swyt, 2021-12-31 19:07:09

Is it possible to communicate using the vidstream library from different PCs and outside the local network?

It only works for me on one PC. Connecting from another PC does not work, both on the local network and on the other.

Server:

from vidstream import AudioSender
from vidstream import AudioReceiver
import threading
import socket

ip = socket.gethostbyname(socket.gethostname())
print(ip)

receiver = AudioReceiver(f'{ip}', 9999)
receive_thread = threading.Thread(target=receiver.start_server)
receive_thread.start()

while input("") != 'q':
    continue
receiver.stop_server()

Customer:
from vidstream import AudioSender
from vidstream import AudioReceiver
import keyboard
import threading
import socket

sender = AudioSender('ip cервера', 9999)


sender_thread = threading.Thread(target=sender.start_stream)

sender_thread.start()

def print_key_stop():
    sender.stop_stream()

keyboard.add_hotkey("0", lambda: print_key_stop())

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alan Gibizov, 2021-01-01
@phaggi

Next words

Under construction! Not ready to use yet!
github hints that most likely it is impossible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question